/* ========== ESTILOS EXISTENTES ========== */
body {
  font-family: Arial;
  background-color: #0f172a; /* fallback */
  background-image: url('assets/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* efecto épico tipo parallax */
  color: white;
  text-align: center;
  margin: 0;
  padding: 10px;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 20, 0.65); /* ajusta entre 0.5 y 0.75 */
  z-index: -1;
}

button {
  padding: 6px 10px;
  margin: 3px;
  background: #1e293b;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover { background: #334155; }

#inventory, #arenaTeam {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.item {
  border: 2px solid #334155;
  border-radius: 10px;
  padding: 10px;
  margin: 5px;
  width: 170px;
  text-align: center;
  position: relative;
  overflow: visible;
  background: rgba(15, 23, 42, 0.85);
backdrop-filter: blur(4px); /* opcional pero GOD */
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: bold;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}



.weapon img { width: 70px; }

.glow img { filter: drop-shadow(0 0 10px gold); }
.fighter.glow img { filter: drop-shadow(0 0 12px gold); }
.super-glow img { filter: drop-shadow(0 0 20px red) brightness(1.2); }
.ultra-glow img { filter: drop-shadow(0 0 30px red) brightness(1.4); }
.fighter.super-glow img { filter: drop-shadow(0 0 22px red); }
.fighter.ultra-glow img { filter: drop-shadow(0 0 32px red) brightness(1.5); }

/* PARTICULAS */
.particles {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 10;
}

.particle {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  animation: particleAnim 1200ms infinite ease-in-out;
  box-shadow: 0 0 8px currentColor;
}

@keyframes particleAnim {
  0%   { transform: scale(0.2) translate(0, 0); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: scale(0.8) translate(var(--x), var(--y)); opacity: 0; }
}

/* ====================== MASCOTAS ====================== */
.pet-display {
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
  pointer-events: none;
}

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

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

:root {
  --color-comun: #64748b;
  --color-raro: #3b82f6;
  --color-epico: #a855f7;
  --color-legendario: #f59e0b;
}

/* RESPLANDOR EN EL INVENTARIO (Abajo) */
.pet-card.comun .pet-icon-container img, .pet-card.comun .pet-emoji { filter: drop-shadow(0 0 5px var(--color-comun)); }
.pet-card.raro .pet-icon-container img, .pet-card.raro .pet-emoji { filter: drop-shadow(0 0 8px var(--color-raro)); }
.pet-card.epico .pet-icon-container img, .pet-card.epico .pet-emoji { filter: drop-shadow(0 0 12px var(--color-epico)); }
.pet-card.legendario .pet-icon-container img, .pet-card.legendario .pet-emoji { filter: drop-shadow(0 0 15px var(--color-legendario)); }

/* RESPLANDOR CUANDO ESTÁN EQUIPADAS (Arriba) */
.pet-display.comun img, .pet-display.comun span { filter: drop-shadow(0 0 10px var(--color-comun)); }
.pet-display.raro img, .pet-display.raro span { filter: drop-shadow(0 0 15px var(--color-raro)); }
.pet-display.epico img, .pet-display.epico span { filter: drop-shadow(0 0 20px var(--color-epico)); }
.pet-display.legendario img, .pet-display.legendario span { filter: drop-shadow(0 0 25px var(--color-legendario)); }

.pet-display img, .pet-display span {
  animation: petFloatUnified 2s ease-in-out infinite !important;
}

.pet-display img {
  width: 90px !important;
  height: auto !important;
  max-width: 100%;
  filter: drop-shadow(0 0 15px var(--glow, #f59e0b));
  animation: petFloatUnified 2s ease-in-out infinite !important;
}

.pet-display span {
  font-size: 36px !important; 
  display: block;
  animation: petFloatUnified 2s ease-in-out infinite !important;
}

#petInventory {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.pet-card img {
  display: block;
  margin: 0 auto 8px;
  width: 55px;
  height: auto;
}

.pet-icon-container {
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pet-icon-container img {
  width: 75px !important; 
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
}

.pet-card {
  border: 2px solid #334155;
  border-radius: 10px;
  padding: 10px;
  margin: 5px;
  width: 140px;
  text-align: center;
  background: #1e293b;
}

.pet-card.comun      { border-color: #64748b; }
.pet-card.raro       { border-color: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.pet-card.epico      { border-color: #a855f7; box-shadow: 0 0 10px #a855f7; }
.pet-card.legendario { border-color: #f59e0b; box-shadow: 0 0 14px #f59e0b, 0 0 24px rgba(255,150,0,0.4); }

.pet-emoji { font-size: 36px; display: block; margin: 4px 0; }
.pet-bonus { font-size: 0.78em; color: #a3e635; margin: 4px 0; line-height: 1.4; }

#petModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

#petModal.open { display: flex; }

.pet-modal-box {
  background: #1e293b;
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  max-height: 80vh;
  overflow-y: auto;
}

.pet-modal-box h3 { margin-top: 0; color: #fbbf24; }
.pet-modal-box .pet-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0; }

.pet-option {
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100px;
}
.pet-option:hover      { border-color: #f59e0b; }
.pet-option.comun      { border-color: #64748b; }
.pet-option.raro       { border-color: #3b82f6; }
.pet-option.epico      { border-color: #a855f7; }
.pet-option.legendario { border-color: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

.toggle { cursor: pointer; padding: 5px; border: 1px solid #555; margin: 5px; display: inline-block; }
.active { background: #22c55e; }
.success { color: lime; }
.fail { color: red; }

.attributes { font-size: 0.85em; color: #a3e635; margin: 6px 0; line-height: 1.3; }

.health-bar { height: 8px; background: #334155; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.health-bar-inner { height: 100%; background: #22c55e; transition: width 0.4s linear; }

#battleScreen {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #0f172a;
  z-index: 999;
  padding: 15px;
  overflow-y: auto;
}

.battle-container { display: flex; justify-content: space-between; max-width: 1100px; margin: 0 auto; }
.side { width: 48%; text-align: center; }
.fighter { border: 2px solid #334155; border-radius: 10px; padding: 8px; margin: 8px; background: #1e293b; position: relative; overflow: visible; }
.battle-log { max-width: 1100px; margin: 20px auto; background: #1e293b; border-radius: 10px; padding: 12px; height: 220px; overflow-y: auto; text-align: left; font-size: 0.95em; line-height: 1.4; }
.battle-log .success { color: #a3e635; }
.battle-log .fail { color: #f87171; }

.hit { animation: hitFlash 0.25s; }
@keyframes hitFlash { 0% { transform: scale(1); } 50% { transform: scale(1.15) rotate(-1deg); } 100% { transform: scale(1); } }

.damage-number {
  position: absolute;
  color: #ff4444;
  font-weight: bold;
  font-size: 14px;
  pointer-events: none;
  animation: floatDamage 1s ease-out forwards;
}
.crit { color: gold; font-size: 18px; text-shadow: 0 0 10px gold; }
@keyframes floatDamage {
  0%   { opacity: 1; transform: translateY(0px); }
  100% { opacity: 0; transform: translateY(-40px); }
}

@keyframes logoGlow {
  0%   { filter: drop-shadow(0 0 10px orange); }
  50%  { filter: drop-shadow(0 0 25px orange); }
  100% { filter: drop-shadow(0 0 10px orange); }
}

.item img { filter: none; }

.logo {
  width: 250px;
  margin: 10px auto;
  display: block;
  animation: logoGlow 2.5s infinite ease-in-out;
}

.item.comun      { border: 2px solid #64748b; }
.item.raro       { border: 2px solid #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.item.epico      { border: 2px solid #a855f7; box-shadow: 0 0 10px #a855f7; }
.item.legendario { border: 2px solid #f59e0b; box-shadow: 0 0 12px #f59e0b, 0 0 20px rgba(255,150,0,0.5); }

.fighter.comun      { border: 2px solid #64748b; }
.fighter.raro       { border: 2px solid #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.fighter.epico      { border: 2px solid #a855f7; box-shadow: 0 0 10px #a855f7; }
.fighter.legendario { border: 2px solid #f59e0b; box-shadow: 0 0 12px #f59e0b, 0 0 20px rgba(255,150,0,0.5); }

/* Estilos para escudos en inventario */
.shield-card {
  border: 2px solid #334155;
  border-radius: 10px;
  padding: 8px;
  margin: 5px;
  width: 140px;
  text-align: center;
  background: #1e293b;
}
.shield-card.comun      { border-color: #64748b; }
.shield-card.raro       { border-color: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.shield-card.epico      { border-color: #a855f7; box-shadow: 0 0 10px #a855f7; }
.shield-card.legendario { border-color: #f59e0b; box-shadow: 0 0 14px #f59e0b; }

.shield-card img {
  width: 50px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
}

/* Marco visual para items con escudo equipado */
.item.shield-equipped, .fighter.shield-equipped {
  background-image: url('assets/marco1.png');
  background-size: 170% 120%;
  background-repeat: no-repeat;
  background-position: center;
  border: none !important;
  box-shadow: none !important;
  padding: 30px;
  position: relative;
  z-index: 1;
}

/* Asegurar que la imagen del arma siga teniendo su resplandor */
.item.shield-equipped .weapon img,
.fighter.shield-equipped .weapon img {
  filter: inherit; /* ya hereda el drop-shadow de las clases glow */
  position: relative;
  z-index: 2; /* para que esté por encima del fondo */
}

/* Resplandor exterior según la RAREZA del arma (cuando tiene escudo equipado) */
.item.shield-equipped.comun,
.fighter.shield-equipped.comun {
  box-shadow: 0 0 10px 3px #64748b !important;
}
.item.shield-equipped.raro,
.fighter.shield-equipped.raro {
  box-shadow: 0 0 15px 5px #3b82f6 !important;
}
.item.shield-equipped.epico,
.fighter.shield-equipped.epico {
  box-shadow: 0 0 20px 6px #a855f7 !important;
}
.item.shield-equipped.legendario,
.fighter.shield-equipped.legendario {
  box-shadow: 0 0 25px 8px #f59e0b !important;
}


/* RAYOS DORADOS +15 */
.lightning-particle {
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, transparent, gold, transparent);
  pointer-events: none;
  animation: lightningStrike var(--duration) ease-in-out infinite;
  box-shadow: 0 0 6px gold, 0 0 12px #fbbf24;
  border-radius: 2px;
  z-index: 11;
}

@keyframes lightningStrike {
  0%   { opacity: 0; transform: scaleY(0.2) translateY(-20px); }
  10%  { opacity: 1; transform: scaleY(1) translateY(0px); }
  15%  { opacity: 0.3; transform: scaleY(0.8); }
  20%  { opacity: 1; transform: scaleY(1); }
  30%  { opacity: 0; transform: scaleY(1) translateY(10px); }
  100% { opacity: 0; }
}

.stat-icon {
    width: 50px;
    height: 50px;
    vertical-align: middle;
    margin-right: 2px;
}

.toggle-icon {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-right: 4px;
}

.button-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    filter: brightness(0) invert(1); /* si quieres que la imagen sea blanca, opcional */
}


.chest-icon {
    width: 50px;
    height: 50px;
    vertical-align: middle;
    margin-right: 6px;
    filter: drop-shadow(0 0 2px rgba(0,255,255,0.5));
    transition: filter 0.2s;
}

/* Animación de sacudida + brillo al abrir */
@keyframes shakeChest {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}

.chest-opening {
  animation: shakeChest 0.4s ease-in-out;
  filter: brightness(1.5) drop-shadow(0 0 15px cyan);
  transition: filter 0.1s;
}

.inline-icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    margin-left: 2px;
    margin-right: 2px;
}

.log-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
    filter: drop-shadow(0 0 2px gold);
}

.arena-icon {
    width: 45px;
    height: 45px;
    vertical-align: middle;
    margin-right: 6px;
}

.button-icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    margin-right: 4px;
}

#battleScreen {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: #0f172a; /* color de respaldo */
  background-image: url('assets/arenafondo.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 999;
  padding: 15px;
  overflow-y: auto;
}

#battleScreen::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5); /* oscurece un 50% */
  z-index: -1;
}

#sellConfirmModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
#sellConfirmModal.open {
  display: flex;
}

#upgradeModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
#upgradeModal.open {
  display: flex;
}

.modal-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 6px;
}

.god-roll {
  color: gold !important;
  text-shadow: 0 0 4px rgba(255,215,0,0.5);
  font-weight: bold;
}


#stats-container {
    /* 1. Imagen y Posicionamiento */
    background-image: url('assets/marcorecursos.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 1000px auto;      
    
    /* 2. Dimensiones del Contenedor */
    width: 95%;
    max-width: 1000px;
    height: 70px;         
    margin: -10px auto 20px; 
    
    /* 3. Alineación del Contenido */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* 4. Padding y desborde */
    padding-top: 0px;    
    box-sizing: border-box;
    overflow: visible; 
    
    /* 🔥 5. Brillo estático (Neón rojo suave + Sombra 3D) */
    border: none;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5)) 
            drop-shadow(0 15px 15px rgba(0, 0, 0, 0.8));
}

#stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* Ajusta este valor para acercar o alejar los recursos */
    font-size: 1.1rem; /* Reducimos un pelín la fuente para hacer espacio */
    white-space: nowrap; /* Obliga a que todo se mantenga en una sola línea */
    margin: 0 auto;
    padding: 0 40px; /* Margen interno para que no pise los bordes del dibujo del marco */
    width: fit-content; 
}


/* ========== RESPONSIVE (MÓVIL) ========== */
@media (max-width: 768px) {
  body {
    padding: 5px;
  }

  /* Contenedor de recursos (stats) en móvil */
  #stats-container {
    height: auto;
    padding: 10px 5px;
  }

  #stats {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.9rem;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
  }

  /* Inventario y equipo */
  .item, .fighter {
    width: 150px;           /* ligeramente más estrecho */
    padding: 8px;
    margin: 4px;
  }

  .weapon img {
    width: 55px;
  }

  /* Botones */
  button {
    padding: 8px 12px;      /* más grandes para tocar */
    font-size: 0.8rem;
    margin: 2px;
  }

  .button-icon, .inline-icon {
    width: 18px;
    height: 18px;
  }

  /* Modal (ocupa casi toda la pantalla) */
  .pet-modal-box {
    width: 95%;
    padding: 15px;
    max-height: 85vh;
  }

  /* Títulos */
  h2, h3 {
    font-size: 1.2rem;
  }

  /* Mascotas y escudos en inventario */
  .pet-card, .shield-card {
    width: 120px;
  }

  .pet-display img {
    width: 70px !important;
  }

  .pet-display span {
    font-size: 28px !important;
  }

  /* Arena: combatientes en columna en lugar de fila */
  .battle-container {
    flex-direction: column;
    align-items: center;
  }
  .side {
    width: 100%;
  }
  .fighter {
    width: 90%;
    margin: 8px auto;
  }
  .battle-log {
    font-size: 0.8rem;
    height: 180px;
  }
}

#upgradeResultModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}
#upgradeResultModal.open {
  display: flex;
}

.logout-btn {
  background: #dc2626;
  padding: 4px 10px;
  font-size: 0.8rem;
  margin-left: 8px;
}

/* Centrar sección de autenticación */
#auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
}

/* Ajuste responsive */
@media (max-width: 768px) {
  #auth-section {
    margin: 15px auto;
  }
}

#stats-wrapper {
    position: relative;
    width: 100%;
}

#sub-stats-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -50px;

  width: 600px;
  height: 250px;

  background-image: url('assets/marcorecursos2.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  z-index: 20;
  pointer-events: none;

  filter:
    drop-shadow(0 0 4px rgba(255, 0, 0, 0.4))
    drop-shadow(0 6px 10px rgba(0,0,0,0.7));
}

/* Mantén tu #sub-stats-container exactamente como la tienes, solo agrega: */
#sub-stats {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Separa izquierda y derecha */
    width: 100%;
    height: 100%;
    padding: 0 20px; /* Da un poco de aire a los lados */
    box-sizing: border-box;
}

/* El bloque izquierdo mantiene el desplazamiento original */
.sub-stats-left {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 165px; /* ← El mismo valor que tenías antes en #sub-stats */
}

/* El bloque derecho se queda en su sitio */
.sub-stats-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 175px; /* o un valor si quieres separarlo del borde */
}

.cup-icon {
    width: 25px !important;
    height: 25px !important;
}


#extractConfirmModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
#extractConfirmModal.open {
  display: flex;
}


.sockets-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 5px 0;
}
.socket {
  width: 40px;
  height: 40px;
  background: #1e293b;
  border: 1px solid #64748b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: white;
}
.socket.empty {
  background: #0f172a;
  color: #94a3b8;
}
.socket.filled {
  background: #2d3748;
  border-color: #fbbf24;
}
.socket img {
  width: 24px;
  height: 24px;
}




#chestRewardModal .close:hover {
  color: #f59e0b;
}


#chestRewardModal button:hover {
  background: #eab308;
}

/* Para la imagen de la recompensa dentro del modal */
#chestRewardContent img {
  max-width: 80px;
  height: auto;
  display: block;
  margin: 10px auto;
}

/* =========================================
   BANNER: CIMA DEL FORJADO (Corregido)
   ========================================= */
.ranking-banner {
    position: relative;
    background: linear-gradient(180deg, #1e293b 0%, #0b0f19 100%);
    border: 1px solid #334155;
    border-bottom: 2px solid #ef4444;
    border-radius: 4px;
    padding: 6px 16px; /* Un poco de respiro a los costados */
    margin: 8px auto;
    width: max-content; /* LA CLAVE: El ancho se ajusta solo al contenido */
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), inset 0 -2px 5px rgba(239, 68, 68, 0.1);
    transition: all 0.2s ease;
}

.ranking-banner:hover {
    border-bottom: 2px solid #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 -2px 6px rgba(245, 158, 11, 0.2);
}

.banner-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: transparent;
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 50%, #f59e0b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: fireFlow 3s linear infinite;
    text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.5);
}

.banner-content {
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap; /* Mantiene todo en una línea */
}

.banner-rune {
    color: #22d3ee;
    font-size: 0.7rem;
    margin: 0 4px;
    opacity: 0.6;
    text-shadow: 0 0 4px rgba(34, 211, 238, 0.5);
    animation: etherPulse 2s ease-in-out infinite alternate;
}

/* Responsive móvil LIMPIO y sin conflictos */
@media (max-width: 768px) {
    .ranking-banner {
        padding: 4px 10px; /* Reducimos apenitas el relleno en celu */
    }
    .banner-title {
        font-size: 0.6rem; /* Achicamos apenitas la letra */
        letter-spacing: 0.5px;
    }
    .banner-rune {
        font-size: 0.65rem;
    }
}




/* El contenido del modal ya usa .pet-modal-box, que ya tienes estilizado */


/* Asegura que tanto el CP como los puntos tengan el mismo estilo */
#cpValue, #arenaPointsValue {
    font-size: 1rem;
    font-weight: bold;
    color: #fbbf24; /* amarillo dorado */
    text-shadow: 1px 1px 2px black;
    font-family: Arial, sans-serif; /* o la fuente que uses globalmente */
}


/* Contenedor invisible */
.minimal-title-container {
    margin: 20px auto 10px auto;
    text-align: center;
}

/* Estilo base del texto */
.text-only-title {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

/* Variante Arsenal (Dorado/Ámbar) */
.arsenal-text {
    background: linear-gradient(90deg, #f59e0b 0%, #fff9e6 50%, #f59e0b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fireFlow 3s linear infinite;
}

/* Variante Arena (Rojo/Fuego) */
.arena-text {
    background: linear-gradient(90deg, #ef4444 0%, #fca5a5 50%, #ef4444 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fireFlow 3s linear infinite;
}

/* Variante Bestias (Cian/Éter) */
.bestias-text {
    background: linear-gradient(90deg, #22d3ee 0%, #fff 50%, #22d3ee 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fireFlow 3s linear infinite;
}

.pet-counter-minimal {
    font-size: 0.55rem;
    color: #94a3b8;
    margin-top: 2px;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* La animación que hace que el color "fluya" */
@keyframes fireFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.chest-cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chest-cost-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.button-icon-shield {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.item-extra-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 0;
  padding-top: 4px;
  border-top: 1px solid #334155;
  text-align: left;
  font-size: 0.75em;
}

.item-extra-pet {
  color: #fbbf24;
}

.item-extra-shield {
  color: #60a5fa;
}

.item-line-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 1px;
}

.item-line-icon-pet {
  width: 25px;
  height: 25px;
}

.item-line-icon-shield {
  width: 25px;
  height: 25px;
}



/* =========================================================
   MODALES UNIFICADOS — ESTILO ANULKAR
   Pegar al FINAL de style.css
   ========================================================= */

/* 1) Overlay único para TODOS los modales */
#sellConfirmModal,
#bulkSellModal,
#reforgeUnstableModal,
#etherParasiteModal,
#upgradeModal,
#confirmEquipModal,
#gemEquipModal,
#missionsModal,
#rankingModal,
#petModal,
#petFeedModal,
#shieldEquipModal,
#unequipConfirmModal,
#extractConfirmModal,
#chestRewardModal,
#upgradeResultModal,
#nicknameModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  justify-content: center;
  align-items: center;
  padding: 16px;

  background:
    radial-gradient(circle at center, rgba(30, 41, 59, 0.25) 0%, rgba(2, 6, 23, 0.88) 78%);
  backdrop-filter: blur(4px);
}

/* Estados open */
#sellConfirmModal.open,
#bulkSellModal.open,
#reforgeUnstableModal.open,
#etherParasiteModal.open,
#upgradeModal.open,
#confirmEquipModal.open,
#gemEquipModal.open,
#missionsModal.open,
#rankingModal.open,
#petModal.open,
#petFeedModal.open,
#shieldEquipModal.open,
#unequipConfirmModal.open,
#extractConfirmModal.open,
#chestRewardModal.open,
#upgradeResultModal.open,
#nicknameModal.open {
  display: flex;
}

/* 2) Caja interna unificada */
.pet-modal-box,
#chestRewardModal .modal-content {
  position: relative;
  width: min(92vw, 440px);
  max-width: 440px;
  max-height: 82vh;
  overflow-y: auto;

  padding: 24px;
  border-radius: 16px;

  color: #e5edf8;
  text-align: center;

  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.10) 0%, rgba(0, 0, 0, 0) 38%),
    linear-gradient(180deg, rgba(20, 27, 45, 0.98) 0%, rgba(9, 14, 24, 0.98) 100%);

  border: 1px solid rgba(71, 85, 105, 0.90);

  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.08) inset,
    0 0 18px rgba(34, 211, 238, 0.10),
    0 0 28px rgba(168, 85, 247, 0.10),
    0 18px 45px rgba(0, 0, 0, 0.60);

  backdrop-filter: blur(10px);
}

/* Línea interior decorativa */
.pet-modal-box::before,
#chestRewardModal .modal-content::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(34, 211, 238, 0.10);
  border-radius: 10px;
  pointer-events: none;
}

/* Línea superior luminosa */
.pet-modal-box::after,
#chestRewardModal .modal-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(34, 211, 238, 0.55),
    rgba(168, 85, 247, 0.55),
    transparent
  );
  pointer-events: none;
}

/* 3) Títulos */
.pet-modal-box h2,
.pet-modal-box h3,
#chestRewardModal .modal-content h2,
#chestRewardModal .modal-content h3 {
  margin-top: 0;
  margin-bottom: 10px;

  font-family: 'Cinzel', serif;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #f8fafc;

  text-shadow:
    0 0 8px rgba(34, 211, 238, 0.18),
    0 0 12px rgba(168, 85, 247, 0.14);
}

/* 4) Textos internos */
.pet-modal-box p,
.pet-modal-box small,
.pet-modal-box label,
#chestRewardModal .modal-content p,
#chestRewardModal .modal-content small {
  color: #a7b4c8;
}

/* 5) Botones dentro de modales */
.pet-modal-box button,
#chestRewardModal .modal-content button {
  border: 1px solid rgba(71, 85, 105, 0.80);
  border-radius: 10px;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 6px 14px rgba(0,0,0,0.30);

  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    box-shadow 0.15s ease;
}

.pet-modal-box button:hover,
#chestRewardModal .modal-content button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 18px rgba(0,0,0,0.36);
}

/* 6) Botón cerrar X del cofre */
#chestRewardModal .close {
  position: absolute;
  top: 10px;
  right: 14px;
  float: none;

  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #93a4bd;

  transition: color 0.2s ease, transform 0.2s ease;
}

#chestRewardModal .close:hover {
  color: #22d3ee;
  transform: scale(1.08);
}

/* 7) Imagen de recompensa del cofre */
#chestRewardContent img {
  max-width: 80px;
  height: auto;
  display: block;
  margin: 10px auto;
}

/* 8) Scroll interno discreto */
.pet-modal-box::-webkit-scrollbar,
#chestRewardModal .modal-content::-webkit-scrollbar {
  width: 8px;
}

.pet-modal-box::-webkit-scrollbar-track,
#chestRewardModal .modal-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.65);
  border-radius: 10px;
}

.pet-modal-box::-webkit-scrollbar-thumb,
#chestRewardModal .modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34,211,238,0.45), rgba(168,85,247,0.45));
  border-radius: 10px;
}

/* 9) Responsive */
@media (max-width: 640px) {
  .pet-modal-box,
  #chestRewardModal .modal-content {
    width: min(94vw, 420px);
    padding: 20px;
    border-radius: 14px;
  }

  .pet-modal-box h2,
  .pet-modal-box h3,
  #chestRewardModal .modal-content h2,
  #chestRewardModal .modal-content h3 {
    font-size: 1.05rem;
  }
}



.fighter b {
  display: block;
  font-size: 0.78rem !important;
  line-height: 1.05;
  min-height: 2.2em;
  white-space: normal;
  word-break: break-word;
}

.ranking-medal-icon {
  width: 100px;
  height: 50px;
  object-fit: contain;
  vertical-align: middle;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.ranking-medal-icon:hover {
  transform: scale(1.06);
}

.medal-first {
  filter:
    drop-shadow(0 0 4px rgba(255, 215, 120, 0.95))
    drop-shadow(0 0 10px rgba(255, 190, 40, 0.85))
    drop-shadow(0 0 18px rgba(255, 140, 0, 0.55));
}

.medal-second {
  filter:
    drop-shadow(0 0 4px rgba(180, 230, 255, 0.95))
    drop-shadow(0 0 10px rgba(80, 180, 255, 0.8))
    drop-shadow(0 0 18px rgba(34, 211, 238, 0.5));
}

.medal-third {
  filter:
    drop-shadow(0 0 4px rgba(255, 190, 120, 0.9))
    drop-shadow(0 0 10px rgba(205, 120, 40, 0.75))
    drop-shadow(0 0 16px rgba(120, 60, 20, 0.45));
}

.crueldad-line {
  margin: 4px 0 3px;
  font-size: 0.82em;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #f87171;
  text-shadow:
    0 0 4px rgba(239, 68, 68, 0.55),
    0 0 8px rgba(220, 38, 38, 0.45),
    0 0 14px rgba(127, 29, 29, 0.35);
}

.crueldad-line.positive {
  color: #ef4444;
}

.crueldad-line.negative {
  color: #fb7185;
  text-shadow:
    0 0 4px rgba(244, 63, 94, 0.55),
    0 0 8px rgba(190, 24, 93, 0.45),
    0 0 14px rgba(136, 19, 55, 0.35);
}

#arenaTeam .crueldad-line {
  font-size: 0.74em;
  line-height: 1.1;
}

.chest-crueldad-box {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(239, 68, 68, 0.35);
  text-align: center;
}

.chest-crueldad-box.positive,
.chest-crueldad-box.negative {
  box-shadow:
    0 0 10px rgba(239, 68, 68, 0.18),
    inset 0 0 10px rgba(127, 29, 29, 0.18);
}

.chest-crueldad-box.no-crueldad {
  border-color: rgba(100, 116, 139, 0.4);
  box-shadow: inset 0 0 8px rgba(51, 65, 85, 0.25);
}

.chest-crueldad-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #fca5a5;
  text-shadow:
    0 0 4px rgba(239, 68, 68, 0.35),
    0 0 8px rgba(127, 29, 29, 0.25);
}

.chest-crueldad-value {
  font-weight: 900;
  font-size: 1.05rem;
  color: #ef4444;
  margin-bottom: 6px;
  text-shadow:
    0 0 5px rgba(239, 68, 68, 0.55),
    0 0 10px rgba(220, 38, 38, 0.45),
    0 0 16px rgba(127, 29, 29, 0.35);
}

.chest-crueldad-desc {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #cbd5e1;
}

.chest-crueldad-box.no-crueldad .chest-crueldad-title {
  color: #94a3b8;
  text-shadow: none;
}

.chest-crueldad-box.no-crueldad .chest-crueldad-value {
  color: #94a3b8;
  text-shadow: none;
}


.chest-bonus-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(2, 6, 23, 0.92) 100%);
  border: 1px solid rgba(245, 158, 11, 0.28);
  box-shadow:
    inset 0 0 10px rgba(245, 158, 11, 0.08),
    0 0 14px rgba(0, 0, 0, 0.28);
}

.chest-bonus-title {
  margin-bottom: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fbbf24;
  text-transform: uppercase;
  text-shadow:
    0 0 6px rgba(245, 158, 11, 0.25);
}

.chest-bonus-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chest-bonus-line {
  font-size: 0.84rem;
  line-height: 1.3;
  color: #dbeafe;
}

.chest-bonus-empty {
  font-size: 0.8rem;
  color: #94a3b8;
}


/* =========================
   PERGAMINO DE BIENVENIDA
   ========================= */

#welcomeScrollModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1002;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background:
    radial-gradient(circle at center, rgba(20, 26, 38, 0.18) 0%, rgba(2, 6, 23, 0.94) 78%);
  backdrop-filter: blur(4px);
}

#welcomeScrollModal.open {
  display: flex;
}

.welcome-scroll-box {
  position: relative;
  width: min(96vw, 560px);
  height: min(94vh, 980px);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.welcome-scroll-page {
  display: none;
  width: 100%;
  height: 100%;
  background-image: url("assets/lore.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
  position: relative;
}

.welcome-scroll-page.active {
  display: block;
  background-color: transparent;
}

.welcome-scroll-content {
  position: absolute;
  top: 20.0%;
  left: 19.2%;
  right: 19.2%;
  bottom: 15.2%;
  overflow-y: auto;
  text-align: center;
  color: #3a2415;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.38;
  font-size: clamp(0.9rem, 1.35vw, 1.04rem);
  padding: 6px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.welcome-scroll-content::-webkit-scrollbar {
  display: none;
}

.welcome-scroll-title {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: #2b160d;
  text-shadow: 0 1px 0 rgba(255,255,255,0.16);
}

.welcome-scroll-content p {
  margin: 0 0 10px 0;
}

.welcome-scroll-content b {
  color: #2a140b;
}

.welcome-scroll-final {
  margin-top: 14px;
  font-weight: 700;
  font-style: italic;
  color: #2b160d;
}

.welcome-scroll-controls {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.welcome-scroll-controls button {
  min-width: 112px;
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fff8e1;
  font-weight: 700;
  border-radius: 10px;
  padding: 9px 13px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  font-size: 0.9rem;
}

.welcome-scroll-controls button:hover {
  filter: brightness(1.05);
}

/* Tablet */
@media (max-width: 768px) {
  .welcome-scroll-box {
    width: min(97vw, 520px);
    height: min(95vh, 930px);
  }

  .welcome-scroll-content {
    top: 15.8%;
    left: 19.8%;
    right: 19.8%;
    bottom: 15.8%;
    font-size: 0.88rem;
    line-height: 1.34;
    padding: 4px 2px;
  }

  .welcome-scroll-title {
    font-size: 1.08rem;
    margin-bottom: 10px;
  }

  .welcome-scroll-content p {
    margin-bottom: 9px;
  }

  .welcome-scroll-controls button {
    min-width: 104px;
    padding: 8px 11px;
    font-size: 0.86rem;
  }
}

/* Móvil */
@media (max-width: 480px) {
  #welcomeScrollModal {
    padding: 6px;
  }

  .welcome-scroll-box {
    width: 98vw;
    height: 95vh;
    max-height: 95vh;
  }

  .welcome-scroll-content {
    top: 16.8%;
    left: 20.8%;
    right: 20.8%;
    bottom: 16.6%;
    font-size: 0.79rem;
    line-height: 1.28;
    padding: 2px 1px;
  }

  .welcome-scroll-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .welcome-scroll-content p {
    margin-bottom: 8px;
  }

  .welcome-scroll-final {
    margin-top: 10px;
  }

  .welcome-scroll-controls {
    margin-top: 6px;
    gap: 6px;
  }

  .welcome-scroll-controls button {
    min-width: 90px;
    padding: 7px 9px;
    font-size: 0.78rem;
    border-radius: 8px;
  }
}

/* Móvil chico */
@media (max-width: 390px) {
  .welcome-scroll-content {
    top: 17.4%;
    left: 21.4%;
    right: 21.4%;
    bottom: 17%;
    font-size: 0.75rem;
    line-height: 1.24;
  }

  .welcome-scroll-title {
    font-size: 0.9rem;
  }

  .welcome-scroll-controls button {
    min-width: 84px;
    font-size: 0.75rem;
    padding: 6px 8px;
  }
}

/* ===== TOP ACTIONS ===== */
#auth-section {
  margin: 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

#user-info {
  display: inline-flex;
  align-items: center;
}

.top-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.top-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.google-btn {
  background: #4285f4;
  color: white;
}

.install-btn {
  background: #f59e0b;
  color: #111827;
}

.discord-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.discord-btn img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.75))
          drop-shadow(0 0 10px rgba(168, 85, 247, 0.45));
}

.discord-btn:hover {
  transform: scale(1.06);
}

/* móvil */
@media (max-width: 640px) {
  #auth-section {
    gap: 10px;
  }

  .top-action-btn {
    padding: 8px 12px;
    font-size: 0.92rem;
  }

  .discord-btn {
    width: 42px;
    height: 42px;
  }

  .discord-btn img {
    width: 22px;
    height: 22px;
  }
}


.arena-enter-wrapper {
  display: inline-flex;
  vertical-align: middle;
  margin: 3px;
}

#arenaEnterBtn {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: filter 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

#arenaEnterBtnText {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

#arenaEnterBtn:disabled {
  cursor: not-allowed;
  opacity: 1;
}

#arenaEnterBtn.arena-btn-cooldown {
  background: #eab308 !important;
  color: #000 !important;
  filter: saturate(0.72) brightness(0.9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

#arenaEnterBtn.arena-btn-busy {
  background: #eab308 !important;
  color: #000 !important;
  filter: brightness(0.92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.arena-cooldown-text {
  display: none !important;
}

#noRivalsModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  justify-content: center;
  align-items: center;
  padding: 16px;

  background:
    radial-gradient(circle at center, rgba(30, 41, 59, 0.25) 0%, rgba(2, 6, 23, 0.88) 78%);
  backdrop-filter: blur(4px);
}

#noRivalsModal.open {
  display: flex;
}


/* =========================================================
   VIP — PASE DEL VÍNCULO
   ========================================================= */

.discord-btn,
.vip-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.discord-btn img,
.vip-btn img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}

.discord-btn img {
  filter:
    drop-shadow(0 0 4px rgba(168, 85, 247, 0.75))
    drop-shadow(0 0 10px rgba(168, 85, 247, 0.45));
}

.vip-btn img {
  filter:
    drop-shadow(0 0 5px rgba(245, 158, 11, 0.85))
    drop-shadow(0 0 12px rgba(168, 85, 247, 0.45));
}

.discord-btn:hover,
.vip-btn:hover {
  transform: scale(1.06);
}

/* Modal VIP */
#vipInfoModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  justify-content: center;
  align-items: center;
  padding: 16px;

  background:
    radial-gradient(circle at center, rgba(30, 41, 59, 0.25) 0%, rgba(2, 6, 23, 0.88) 78%);
  backdrop-filter: blur(4px);
}

#vipInfoModal.open {
  display: flex;
}

.vip-modal-box {
  width: min(92vw, 520px);
  max-width: 520px;
  text-align: left;
}

.vip-modal-box h3,
.vip-modal-subtitle {
  text-align: center;
}

.vip-modal-subtitle {
  margin-bottom: 14px;
}

.vip-info-card {
  margin: 12px 0;
  padding: 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(9, 14, 24, 0.92) 100%);
  border: 1px solid rgba(71, 85, 105, 0.80);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 8px 20px rgba(0,0,0,0.26);
}

.vip-info-card-title {
  margin-bottom: 10px;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  color: #f8fafc;
  text-align: left;
}

.vip-info-card ul {
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
}

.vip-info-card li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.vip-note-text {
  margin-top: 12px;
  margin-bottom: 4px;
  text-align: center;
  color: #a7b4c8;
}

.vip-status-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.24);
  color: #fde68a;
  text-align: center;
  font-weight: 700;
}

.vip-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Brillo del nick VIP */
.vip-name-glow {
  color: #fde68a !important;
  font-weight: 900 !important;
  text-shadow:
    0 0 5px rgba(245, 158, 11, 0.85),
    0 0 12px rgba(245, 158, 11, 0.55),
    0 0 20px rgba(168, 85, 247, 0.35),
    0 0 28px rgba(34, 211, 238, 0.18);
}

/* Título VIP visible en ranking/batalla */
.vip-title-line,
.ranking-vip-title,
.battle-vip-title {
  margin-top: 3px;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c084fc;
  text-shadow:
    0 0 6px rgba(168, 85, 247, 0.55),
    0 0 12px rgba(34, 211, 238, 0.22);
}

.ranking-vip-title {
  font-size: 0.62rem;
  line-height: 1.1;
}

.battle-vip-title {
  font-size: 0.72rem;
  text-align: center;
}

/* Ranking con nombre + título */
.ranking-name-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ranking-name-text {
  font-weight: bold;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Header usuario */
#headerDisplayName {
  font-weight: 800;
}

/* Responsive */
@media (max-width: 640px) {
  .discord-btn,
  .vip-btn {
    width: 42px;
    height: 42px;
  }

  .discord-btn img,
  .vip-btn img {
    width: 42px;
    height: 42px;
  }

  .vip-modal-box {
    width: min(94vw, 420px);
  }

  .ranking-vip-title {
    font-size: 0.55rem;
  }
}

/* ===== PAYPAL / TIENDA AUTOMÁTICA ===== */
.vip-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.paypal-product-card {
  position: relative;
  padding: 12px;
  min-height: 98px;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.85);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.10), transparent 48%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(7, 10, 18, 0.96));
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 20px rgba(0,0,0,0.22);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.paypal-product-card:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.55);
}

.paypal-product-card.active {
  border-color: rgba(245, 158, 11, 0.82);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.22),
    0 0 18px rgba(245, 158, 11, 0.20),
    0 10px 22px rgba(0,0,0,0.32);
}

.paypal-product-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.paypal-product-card b {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: #f8fafc;
  margin-bottom: 4px;
}

.paypal-product-card small {
  display: block;
  color: #94a3b8;
  font-weight: 800;
}

.paypal-checkout-card {
  border-color: rgba(56, 189, 248, 0.26);
}

.paypal-buttons-container {
  margin-top: 12px;
  min-height: 48px;
}

.paypal-load-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 900;
  color: #06121f;
  background: linear-gradient(180deg, #facc15 0%, #f59e0b 100%);
  border: 1px solid rgba(251, 191, 36, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 8px 18px rgba(0,0,0,0.28);
}

.paypal-payment-status {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.28);
}

.paypal-payment-status.ok {
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.20);
  border-color: rgba(74, 222, 128, 0.30);
}

.paypal-payment-status.fail {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.28);
}

.vip-title-manager {
  border-color: rgba(168, 85, 247, 0.30);
}

.vip-title-muted {
  margin: 0 0 10px;
  color: #a7b4c8;
  line-height: 1.42;
}

.vip-title-select-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.vip-title-select-row select {
  flex: 1;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid rgba(71, 85, 105, 0.90);
  background: rgba(2, 6, 23, 0.74);
  color: #e2e8f0;
  font-weight: 800;
}

.vip-title-select-row button {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 900;
  background: linear-gradient(180deg, #a855f7 0%, #7c3aed 100%);
  border: 1px solid rgba(168, 85, 247, 0.58);
}

@media (max-width: 640px) {
  .vip-store-grid {
    grid-template-columns: 1fr;
  }

  .vip-title-select-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Confirmación para retirar Refuerzo de Campo / Gemas */
.unequip-confirm-preview {
  margin-top: 12px;
}

.unequip-confirm-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 0 14px rgba(34, 211, 238, 0.04);
}

.unequip-confirm-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.28));
}

.unequip-confirm-card b {
  display: block;
  color: #f8fafc;
  margin-bottom: 2px;
}

.unequip-confirm-card small {
  display: inline-block;
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.35;
  margin-right: 4px;
}
/* =========================================================
   RITO DE LIMPIEZA DEL ARSENAL — VENTA MASIVA
   ========================================================= */
.bulk-sell-box {
  width: min(94vw, 760px);
  max-width: 760px;
}

.bulk-sell-toolbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.bulk-sell-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
  margin: 12px 0;
}

.bulk-sell-card {
  display: grid;
  grid-template-columns: 24px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(100, 116, 139, 0.55);
  background:
    radial-gradient(circle at left, rgba(34, 211, 238, 0.08), transparent 35%),
    rgba(15, 23, 42, 0.92);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.bulk-sell-card:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.55);
}

.bulk-sell-card.selected {
  border-color: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.22);
}

.bulk-sell-card.locked {
  opacity: 0.52;
  cursor: not-allowed;
}

.bulk-sell-card.comun { border-left: 3px solid #64748b; }
.bulk-sell-card.raro { border-left: 3px solid #3b82f6; }
.bulk-sell-card.epico { border-left: 3px solid #a855f7; }
.bulk-sell-card.legendario { border-left: 3px solid #f59e0b; }

.bulk-sell-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #22c55e;
}

.bulk-sell-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.bulk-sell-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.bulk-sell-info {
  min-width: 0;
}

.bulk-sell-name {
  color: #f8fafc;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-sell-meta,
.bulk-sell-attrs,
.bulk-sell-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.bulk-sell-meta span {
  font-size: 0.72rem;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.72);
  border-radius: 999px;
  padding: 2px 7px;
}

.bulk-sell-attrs small {
  font-size: 0.72rem;
  color: #a3e635;
}

.bulk-sell-attrs small.bulk-cruelty {
  color: #fb7185;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.26);
  border-radius: 999px;
  padding: 1px 7px;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.35);
}

.bulk-sell-attrs small.bulk-cruelty.positive {
  color: #fca5a5;
}

.bulk-sell-attrs small.bulk-cruelty.negative {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(30, 64, 175, 0.18);
  text-shadow: 0 0 8px rgba(96, 165, 250, 0.28);
}

.bulk-sell-tag {
  font-size: 0.68rem;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.bulk-sell-tag.pet { color: #fbbf24; }
.bulk-sell-tag.shield { color: #60a5fa; }
.bulk-sell-tag.locked { color: #f87171; }

.bulk-sell-price {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 76px;
  color: #fbbf24;
  font-weight: 900;
}

.bulk-sell-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(245, 158, 11, 0.18);
  color: #cbd5e1;
}

.bulk-sell-empty {
  padding: 18px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 620px) {
  .bulk-sell-card {
    grid-template-columns: 24px 46px minmax(0, 1fr);
  }

  .bulk-sell-price {
    grid-column: 3;
    justify-content: flex-start;
    margin-top: -4px;
  }

  .bulk-sell-icon {
    width: 46px;
    height: 46px;
  }

  .bulk-sell-icon img {
    width: 36px;
    height: 36px;
  }
}
/* =========================================================
   MONOLITO GLOBAL — EVENTO COOPERATIVO MVP
   ========================================================= */
#monolithModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at center, rgba(76, 29, 149, 0.25), transparent 42%),
    rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(4px);
}

#monolithModal.open {
  display: flex;
}

.monolith-banner {
  width: min(94vw, 760px);
  margin: 10px auto 2px;
  padding: 10px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background:
    radial-gradient(circle at left, rgba(34, 211, 238, 0.20), transparent 34%),
    radial-gradient(circle at right, rgba(168, 85, 247, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  box-shadow:
    0 0 18px rgba(34, 211, 238, 0.14),
    inset 0 0 18px rgba(168, 85, 247, 0.08);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.monolith-banner:hover {
  transform: translateY(-1px);
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow:
    0 0 22px rgba(34, 211, 238, 0.20),
    0 0 28px rgba(168, 85, 247, 0.14),
    inset 0 0 22px rgba(168, 85, 247, 0.10);
}

.monolith-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.12), transparent);
  animation: monolithSweep 3.6s linear infinite;
}

.monolith-banner.critical {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.20), inset 0 0 18px rgba(239, 68, 68, 0.10);
}

.monolith-banner.destroyed {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.20), inset 0 0 18px rgba(34, 197, 94, 0.10);
}

.monolith-banner-left,
.monolith-banner-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.monolith-banner-left {
  min-width: 0;
  text-align: left;
}

.monolith-banner-right {
  flex-direction: column;
  align-items: flex-end;
  min-width: 165px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.monolith-banner-right button {
  background: #7c3aed;
  border: 1px solid rgba(216, 180, 254, 0.3);
  color: white;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.monolith-banner-icon {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 10px rgba(34, 211, 238, 0.65))
    drop-shadow(0 0 14px rgba(168, 85, 247, 0.35));
  animation: monolithFloat 2.4s ease-in-out infinite;
}

.monolith-banner-kicker {
  font-size: 0.62rem;
  color: #22d3ee;
  letter-spacing: 1.2px;
  font-family: 'Cinzel', serif;
  font-weight: 800;
}

.monolith-banner-title {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  color: #f8fafc;
  font-size: 0.92rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.20);
}

.monolith-banner-subtitle {
  color: #94a3b8;
  font-size: 0.76rem;
  margin-top: 2px;
}

.monolith-mini-hp {
  width: 150px;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.monolith-mini-hp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #a855f7, #22d3ee);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
  transition: width 0.35s ease;
}

.monolith-modal-box {
  width: min(94vw, 560px);
  max-width: 560px;
}

.monolith-modal-subtitle {
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.5;
  margin-top: 0;
}

.monolith-stage {
  position: relative;
  min-height: 255px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  margin: 8px 0 12px;
}

.monolith-stage::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 58%),
    radial-gradient(circle, rgba(168, 85, 247, 0.16), transparent 68%);
  filter: blur(1px);
  animation: monolithAura 2.8s ease-in-out infinite;
}

.monolith-stage.wounded::before {
  background:
    radial-gradient(circle, rgba(168, 85, 247, 0.24), transparent 58%),
    radial-gradient(circle, rgba(239, 68, 68, 0.12), transparent 70%);
}

.monolith-stage.critical::before {
  background:
    radial-gradient(circle, rgba(239, 68, 68, 0.28), transparent 58%),
    radial-gradient(circle, rgba(168, 85, 247, 0.20), transparent 70%);
  animation-duration: 1.4s;
}

.monolith-stage.destroyed::before {
  background:
    radial-gradient(circle, rgba(34, 197, 94, 0.22), transparent 58%),
    radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 70%);
}

.monolith-main-image {
  position: relative;
  z-index: 2;
  width: min(72vw, 270px);
  max-height: 300px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 16px rgba(34, 211, 238, 0.65))
    drop-shadow(0 0 24px rgba(168, 85, 247, 0.35));
  animation: monolithFloat 2.6s ease-in-out infinite;
  transition: filter 0.25s ease, transform 0.25s ease;
}

.monolith-stage.wounded .monolith-main-image {
  filter:
    drop-shadow(0 0 18px rgba(168, 85, 247, 0.72))
    drop-shadow(0 0 28px rgba(239, 68, 68, 0.24));
}

.monolith-stage.critical .monolith-main-image {
  filter:
    drop-shadow(0 0 20px rgba(239, 68, 68, 0.75))
    drop-shadow(0 0 28px rgba(168, 85, 247, 0.45));
  animation: monolithCriticalFloat 1.3s ease-in-out infinite;
}

.monolith-stage.destroyed .monolith-main-image {
  opacity: 0.92;
  filter:
    drop-shadow(0 0 20px rgba(34, 197, 94, 0.65))
    drop-shadow(0 0 28px rgba(34, 211, 238, 0.25));
}

.monolith-hit-effect {
  animation: monolithHit 0.34s ease-out, monolithFloat 2.6s ease-in-out infinite !important;
}

.monolith-destroyed-effect {
  animation: monolithDestroyed 1.1s ease-out forwards !important;
}

.monolith-effect-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.monolith-floating-damage {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  color: #f87171;
  font-weight: 900;
  font-size: 1.5rem;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.85), 0 2px 2px black;
  animation: monolithDamageFloat 0.9s ease-out forwards;
}

.monolith-destruction-burst {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.9), rgba(168, 85, 247, 0.45), transparent 70%);
  animation: monolithBurst 1.1s ease-out forwards;
}

.monolith-status-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.monolith-status-row span {
  font-size: 0.72rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  padding: 4px 8px;
}

.monolith-hp-box,
.monolith-participants-box {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 14px;
  padding: 10px;
  margin-top: 10px;
}

.monolith-hp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.monolith-hp-bar {
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.monolith-hp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #a855f7, #22d3ee);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
  transition: width 0.35s ease;
}

.monolith-box-title {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  color: #fbbf24;
  margin-bottom: 8px;
  letter-spacing: 0.6px;
}

.monolith-participant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.74);
  color: #cbd5e1;
  font-size: 0.82rem;
  margin-top: 5px;
}

.monolith-participant.self {
  border: 1px solid rgba(34, 211, 238, 0.32);
  color: #e0f2fe;
}

.monolith-participant b {
  color: #f87171;
}

.monolith-participant small {
  color: #22c55e;
}

.monolith-participant.empty {
  justify-content: center;
  color: #64748b;
}

.monolith-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.monolith-actions button {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 0.4px;
  padding: 9px 16px;
}

.monolith-actions button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.monolith-note {
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.75);
  border-radius: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.monolith-note.success {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.25);
}

.monolith-note.danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.25);
}

.monolith-empty-state {
  padding: 18px;
  border-radius: 14px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

@keyframes monolithSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

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

@keyframes monolithCriticalFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  35% { transform: translateY(-7px) rotate(-0.6deg); }
  70% { transform: translateY(2px) rotate(0.6deg); }
}

@keyframes monolithAura {
  0%, 100% { transform: scale(0.95); opacity: 0.75; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes monolithHit {
  0% { transform: translateY(0) scale(1); filter: brightness(1.8) drop-shadow(0 0 26px #22d3ee); }
  35% { transform: translateY(-2px) scale(1.05) rotate(-0.8deg); filter: brightness(2.2) drop-shadow(0 0 34px #ef4444); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes monolithDamageFloat {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.8); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -125%) scale(1.15); }
}

@keyframes monolithBurst {
  0% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(7); }
}

@keyframes monolithDestroyed {
  0% { transform: scale(1); filter: brightness(2.2) drop-shadow(0 0 35px #22d3ee); }
  45% { transform: scale(1.08) rotate(-1deg); filter: brightness(2.8) drop-shadow(0 0 45px #a855f7); }
  100% { transform: scale(0.96); filter: brightness(1.15) drop-shadow(0 0 24px #22c55e); }
}

@media (max-width: 680px) {
  .monolith-banner {
    align-items: flex-start;
    flex-direction: column;
  }
  .monolith-banner-right {
    width: 100%;
    align-items: stretch;
  }
  .monolith-mini-hp {
    width: 100%;
  }
  .monolith-banner-title {
    max-width: 72vw;
    font-size: 0.82rem;
  }
  .monolith-banner-icon {
    width: 48px;
    height: 48px;
  }
  .monolith-stage {
    min-height: 225px;
  }
  .monolith-main-image {
    width: min(78vw, 230px);
  }
}


/* =========================================================
   MONOLITO — DESTRUCCIÓN EN PARTÍCULAS + AURA RESIDUAL
   ========================================================= */

.monolith-stage.monolith-stage-destroying::before {
  animation: monolithAuraCollapse 1.25s ease-out forwards !important;
}

.monolith-stage.after-destruction::before {
  opacity: 0.15;
  animation: monolithResidualPulse 2.6s ease-in-out infinite;
}

.monolith-residual-aura {
  position: absolute;
  left: 50%;
  top: 72%;
  width: 210px;
  height: 58px;
  transform: translate(-50%, -50%) scale(0.8);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(34, 211, 238, 0.42), rgba(168, 85, 247, 0.18) 42%, transparent 72%);
  filter: blur(1px);
  box-shadow:
    0 0 26px rgba(34, 211, 238, 0.30),
    0 0 38px rgba(168, 85, 247, 0.18);
}

.monolith-residual-aura.visible {
  opacity: 0.85;
  animation: monolithResidualAura 2.8s ease-in-out infinite;
}

.monolith-stage.after-destruction .monolith-residual-aura.visible {
  opacity: 1;
}

.monolith-after-destruction-hidden {
  opacity: 0 !important;
  transform: scale(0.82) translateY(14px) !important;
  pointer-events: none;
}

.monolith-destruction-flash {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(34, 211, 238, 0.52) 20%, rgba(168, 85, 247, 0.30) 42%, transparent 72%);
  opacity: 0;
  transform: scale(0.2);
  animation: monolithDestructionFlash 0.72s ease-out forwards;
}

.monolith-destruction-burst {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(34, 211, 238, 0.70) 24%, rgba(168, 85, 247, 0.46) 48%, transparent 72%);
  box-shadow:
    0 0 28px rgba(34, 211, 238, 0.90),
    0 0 42px rgba(168, 85, 247, 0.55),
    0 0 60px rgba(239, 68, 68, 0.25);
  animation: monolithBurst 1.05s ease-out forwards;
}

.monolith-destruction-ring {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(34, 211, 238, 0.75);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.35);
  box-shadow:
    0 0 14px rgba(34, 211, 238, 0.75),
    inset 0 0 14px rgba(168, 85, 247, 0.36);
  animation: monolithDestructionRing 1.15s ease-out forwards;
}

.monolith-shard {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 8px;
  height: 18px;
  border-radius: 2px 7px 2px 6px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(51, 65, 85, 0.96) 48%, rgba(34, 211, 238, 0.72));
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow:
    0 0 10px rgba(34, 211, 238, 0.40),
    0 0 18px rgba(168, 85, 247, 0.18);
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  opacity: 0;
  animation: monolithShardScatter 1.35s cubic-bezier(0.12, 0.72, 0.18, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.monolith-shard:nth-child(odd) {
  width: 6px;
  height: 13px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.98), rgba(30, 41, 59, 0.96) 54%, rgba(168, 85, 247, 0.70));
}

.monolith-ether-mote {
  position: absolute;
  left: 50%;
  top: 48%;
  width: var(--size, 5px);
  height: var(--size, 5px);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.95);
  box-shadow:
    0 0 8px rgba(34, 211, 238, 0.95),
    0 0 18px rgba(168, 85, 247, 0.60);
  opacity: 0;
  animation: monolithEtherMote 1.45s ease-out forwards;
  animation-delay: var(--delay, 0ms);
}

.monolith-destroyed-effect {
  animation: monolithShatterFade 1.2s cubic-bezier(0.18, 0.85, 0.21, 1) forwards !important;
}

@keyframes monolithShatterFade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter:
      brightness(2.4)
      drop-shadow(0 0 35px rgba(34, 211, 238, 1))
      drop-shadow(0 0 48px rgba(168, 85, 247, 0.75));
  }
  18% {
    opacity: 1;
    transform: translateY(-5px) scale(1.10) rotate(-1deg);
    filter:
      brightness(3.2)
      drop-shadow(0 0 48px rgba(255, 255, 255, 0.95))
      drop-shadow(0 0 56px rgba(34, 211, 238, 0.9));
  }
  48% {
    opacity: 0.82;
    transform: translateY(4px) scale(0.98) rotate(2deg);
    filter:
      brightness(2.1)
      drop-shadow(0 0 36px rgba(168, 85, 247, 0.75));
  }
  100% {
    opacity: 0;
    transform: translateY(28px) scale(0.72) rotate(4deg);
    filter:
      brightness(0.5)
      drop-shadow(0 0 18px rgba(34, 211, 238, 0.35));
  }
}

@keyframes monolithDestructionFlash {
  0% { opacity: 0; transform: scale(0.15); }
  20% { opacity: 1; transform: scale(0.85); }
  100% { opacity: 0; transform: scale(1.65); }
}

@keyframes monolithDestructionRing {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.25); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(6.4); }
}

@keyframes monolithShardScatter {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(0deg);
  }
  14% { opacity: 1; }
  72% { opacity: 0.92; }
  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)))
      scale(0.35)
      rotate(var(--rot, 180deg));
  }
}

@keyframes monolithEtherMote {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
  }
  18% { opacity: 1; }
  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)))
      scale(1.7);
  }
}

@keyframes monolithAuraCollapse {
  0% { transform: scale(1.04); opacity: 1; }
  40% { transform: scale(1.36); opacity: 0.95; }
  100% { transform: scale(0.55); opacity: 0.12; }
}

@keyframes monolithResidualAura {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0.62;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 1;
  }
}

@keyframes monolithResidualPulse {
  0%, 100% { transform: scale(0.82); opacity: 0.14; }
  50% { transform: scale(1.04); opacity: 0.28; }
}

@media (max-width: 680px) {
  .monolith-residual-aura {
    width: 170px;
    height: 48px;
  }

  .monolith-shard {
    width: 6px;
    height: 14px;
  }
}

/* =========================================================
   DOCTRINAS DEL VÍNCULO — LIBROS DE MONOLITO
   ========================================================= */
.doctrine-text {
  background: linear-gradient(90deg, #a855f7 0%, #f8fafc 50%, #22d3ee 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fireFlow 3s linear infinite;
}

#doctrinesPanel {
  width: min(1100px, 96vw);
  margin: 0 auto 16px;
}

.doctrines-summary {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px auto 12px;
  padding: 10px 12px;
  max-width: 760px;
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(168, 85, 247, 0.16), transparent 50%),
    rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.12);
  color: #e2e8f0;
}

.doctrines-summary small {
  color: #94a3b8;
}

.doctrines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.doctrine-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px;
  text-align: left;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.10), transparent 36%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  border: 1px solid rgba(100, 116, 139, 0.48);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.doctrine-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.14), transparent 42%);
  opacity: 0.65;
}

.doctrine-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), 0 0 18px rgba(34, 211, 238, 0.10);
}

.doctrine-card.active {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow:
    0 0 18px rgba(34, 211, 238, 0.18),
    0 0 26px rgba(168, 85, 247, 0.14),
    0 12px 28px rgba(0, 0, 0, 0.35);
}

.doctrine-card.locked {
  opacity: 0.78;
}

.doctrine-card-head,
.doctrine-desc,
.doctrine-effect,
.doctrine-progress-bar,
.doctrine-meta-row,
.doctrine-actions {
  position: relative;
  z-index: 1;
}

.doctrine-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doctrine-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 1.35rem;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.24));
  flex-shrink: 0;
}

.doctrine-title-wrap {
  min-width: 0;
  flex: 1;
}

.doctrine-name {
  color: #f8fafc;
  font-weight: 900;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.2px;
  line-height: 1.15;
}

.doctrine-level {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.doctrine-active-badge {
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.doctrine-card.active .doctrine-active-badge {
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.16);
  border-color: rgba(34, 211, 238, 0.32);
}

.doctrine-desc {
  margin: 10px 0 8px;
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.45;
}

.doctrine-effect {
  color: #a3e635;
  font-weight: 900;
  font-size: 0.84rem;
  text-shadow: 0 0 8px rgba(163, 230, 53, 0.16);
}

.doctrine-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
  margin: 10px 0;
}

.doctrine-progress-bar > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #22d3ee);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
  transition: width 0.25s ease;
}

.doctrine-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.doctrine-meta-row span {
  color: #cbd5e1;
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.doctrine-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doctrine-actions button {
  flex: 1;
  min-width: 110px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #334155, #1e293b);
}

.doctrine-actions button:first-child {
  background: linear-gradient(180deg, #7c3aed, #5b21b6);
}

.doctrine-actions button.danger {
  background: linear-gradient(180deg, #dc2626, #991b1b);
}

.doctrine-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.2);
}

@media (max-width: 640px) {
  .doctrines-grid {
    grid-template-columns: 1fr;
  }

  .doctrine-card {
    padding: 12px;
  }
}


/* =========================================================
   DOCTRINAS DEL VÍNCULO — IMÁGENES DE CÓDICES
   ========================================================= */

.doctrine-icon {
  width: 74px;
  height: 74px;
  min-width: 74px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.10), rgba(15, 23, 42, 0.70) 70%);
  border: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow:
    inset 0 0 12px rgba(255,255,255,0.03),
    0 0 14px rgba(34, 211, 238, 0.10),
    0 0 20px rgba(168, 85, 247, 0.08);
}

.doctrine-book-visual {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.doctrine-book-img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  display: block;
  filter:
    drop-shadow(0 0 8px rgba(34, 211, 238, 0.38))
    drop-shadow(0 0 13px rgba(168, 85, 247, 0.32));
  transform: translateY(-1px);
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    opacity 0.18s ease;
}

.doctrine-book-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  width: 100%;
  height: 100%;
}

.doctrine-book-emoji {
  font-size: 1.7rem;
  line-height: 1;
}

.doctrine-card:hover .doctrine-book-img {
  transform: translateY(-3px) scale(1.05);
  filter:
    drop-shadow(0 0 10px rgba(34, 211, 238, 0.55))
    drop-shadow(0 0 18px rgba(168, 85, 247, 0.45));
}

.doctrine-card.active .doctrine-icon {
  border-color: rgba(34, 211, 238, 0.50);
  box-shadow:
    inset 0 0 12px rgba(34, 211, 238, 0.08),
    0 0 16px rgba(34, 211, 238, 0.32),
    0 0 26px rgba(168, 85, 247, 0.22);
}

.doctrine-card.active .doctrine-book-img {
  filter:
    drop-shadow(0 0 12px rgba(34, 211, 238, 0.72))
    drop-shadow(0 0 22px rgba(168, 85, 247, 0.48));
}

.doctrine-card.locked .doctrine-book-img {
  opacity: 0.58;
  filter:
    grayscale(0.55)
    brightness(0.72)
    drop-shadow(0 0 7px rgba(71, 85, 105, 0.45));
}

.doctrine-result-book-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px auto 12px;
}

.doctrine-result-book-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 10px rgba(34, 211, 238, 0.50))
    drop-shadow(0 0 18px rgba(168, 85, 247, 0.35));
  animation: doctrineBookFloat 2.4s ease-in-out infinite;
}

@keyframes doctrineBookFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-6px) scale(1.03);
  }
}

/* Recompensas del Monolito con Códices */
.monolith-reward-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.monolith-reward-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 2px 0;
  color: #dbeafe;
  font-size: 0.92rem;
}

.monolith-reward-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.monolith-reward-symbol {
  width: 24px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.monolith-book-reward-row {
  margin-top: 7px;
  padding: 8px 10px;
  border-radius: 12px;
  background:
    radial-gradient(circle at left, rgba(34, 211, 238, 0.12), transparent 58%),
    rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow:
    inset 0 0 10px rgba(34, 211, 238, 0.05),
    0 0 12px rgba(168, 85, 247, 0.12);
}

.monolith-reward-book-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 7px rgba(34, 211, 238, 0.45))
    drop-shadow(0 0 10px rgba(168, 85, 247, 0.28));
}

@media (max-width: 640px) {
  .doctrine-icon {
    width: 62px;
    height: 62px;
    min-width: 62px;
  }

  .doctrine-book-visual {
    width: 66px;
    height: 66px;
  }

  .doctrine-book-img {
    width: 70px;
    height: 70px;
  }

  .doctrine-result-book-img {
    width: 112px;
    height: 112px;
  }

  .monolith-reward-book-icon {
    width: 38px;
    height: 38px;
  }
}

/* =========================================================
   MENSAJE GLOBAL DE ANULKAR
   ========================================================= */

#globalMessageMount {
  width: 100%;
}

.global-message-banner {
  width: min(94vw, 760px);
  margin: 10px auto 4px;
  padding: 11px 14px;
  border-radius: 16px;

  display: flex;
  align-items: center;
  gap: 12px;

  position: relative;
  overflow: hidden;

  border: 1px solid rgba(34, 211, 238, 0.28);
  background:
    radial-gradient(circle at left, rgba(34, 211, 238, 0.20), transparent 36%),
    radial-gradient(circle at right, rgba(168, 85, 247, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.97));

  box-shadow:
    0 0 18px rgba(34, 211, 238, 0.13),
    inset 0 0 18px rgba(168, 85, 247, 0.08);
}

.global-message-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.13), transparent);
  animation: globalMessageSweep 3.8s linear infinite;
}

@keyframes globalMessageSweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.global-message-orb {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;

  display: grid;
  place-items: center;

  border-radius: 999px;
  color: #cffafe;
  font-size: 1.1rem;
  font-weight: 900;

  border: 1px solid rgba(34, 211, 238, 0.36);
  background: rgba(2, 6, 23, 0.62);

  text-shadow: 0 0 12px rgba(34, 211, 238, 0.9);
  box-shadow:
    0 0 14px rgba(34, 211, 238, 0.20),
    inset 0 0 12px rgba(34, 211, 238, 0.08);
}

.global-message-content {
  position: relative;
  z-index: 2;
  min-width: 0;
  text-align: left;
}

.global-message-title {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #f8fafc;
  text-shadow:
    0 0 8px rgba(34, 211, 238, 0.18),
    0 0 12px rgba(168, 85, 247, 0.16);
}

.global-message-body {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 0.84rem;
  line-height: 1.35;
}

.global-message-time {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 0.68rem;
  letter-spacing: 0.4px;
}

.global-message-banner.warning {
  border-color: rgba(245, 158, 11, 0.42);
  background:
    radial-gradient(circle at left, rgba(245, 158, 11, 0.20), transparent 36%),
    linear-gradient(180deg, rgba(30, 20, 5, 0.94), rgba(2, 6, 23, 0.97));
}

.global-message-banner.warning .global-message-orb {
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.45);
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.9);
}

.global-message-banner.gift {
  border-color: rgba(34, 197, 94, 0.38);
  background:
    radial-gradient(circle at left, rgba(34, 197, 94, 0.18), transparent 36%),
    radial-gradient(circle at right, rgba(34, 211, 238, 0.15), transparent 38%),
    linear-gradient(180deg, rgba(5, 24, 18, 0.94), rgba(2, 6, 23, 0.97));
}

.global-message-banner.gift .global-message-orb {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.42);
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.9);
}

.global-message-banner.danger {
  border-color: rgba(239, 68, 68, 0.42);
  background:
    radial-gradient(circle at left, rgba(239, 68, 68, 0.18), transparent 36%),
    radial-gradient(circle at right, rgba(168, 85, 247, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(30, 5, 10, 0.94), rgba(2, 6, 23, 0.97));
}

.global-message-banner.danger .global-message-orb {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.42);
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.9);
}

@media (max-width: 640px) {
  .global-message-banner {
    padding: 10px 11px;
    gap: 9px;
  }

  .global-message-orb {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 0.95rem;
  }

  .global-message-title {
    font-size: 0.72rem;
  }

  .global-message-body {
    font-size: 0.78rem;
  }
}

/* =========================================================
   RITO DE SUSTENTO ÁLMICO — BESTIAS + GEMAS
   ========================================================= */
.pet-display-clickable {
  pointer-events: auto;
  cursor: pointer;
}

.pet-display-clickable:hover img,
.pet-display-clickable:hover span:not(.pet-feed-sigil) {
  transform: translateY(-2px) scale(1.06);
}

.pet-display-sleeping img,
.pet-display-sleeping span:not(.pet-feed-sigil) {
  filter:
    grayscale(0.85)
    brightness(0.58)
    drop-shadow(0 0 9px rgba(148, 163, 184, 0.34)) !important;
  opacity: 0.72;
}

.pet-feed-sigil {
  position: absolute;
  right: 12px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem !important;
  line-height: 1;
  color: #22d3ee;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(34, 211, 238, 0.42);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
  animation: petSustainPulse 1.9s ease-in-out infinite;
}

@keyframes petSustainPulse {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}

.item-extra-pet-sustain {
  cursor: pointer;
  border-radius: 10px;
  padding: 6px;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.item-extra-pet-sustain:hover {
  background: rgba(34, 211, 238, 0.06);
  box-shadow: inset 0 0 10px rgba(34, 211, 238, 0.08);
  transform: translateY(-1px);
}

.pet-sustain-mini {
  margin-top: 7px;
  padding: 7px 8px;
  border-radius: 10px;
  background:
    radial-gradient(circle at left, rgba(34, 211, 238, 0.10), transparent 60%),
    rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(34, 211, 238, 0.15);
}

.pet-sustain-mini.sleeping {
  border-color: rgba(244, 63, 94, 0.32);
  background:
    radial-gradient(circle at left, rgba(244, 63, 94, 0.10), transparent 62%),
    rgba(15, 23, 42, 0.84);
}

.pet-sustain-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.pet-sustain-row b {
  color: #e0f2fe;
  font-size: 0.7rem;
}

.pet-vitality-bar,
.pet-bond-bar {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.14);
  margin-bottom: 6px;
}

.pet-vitality-bar div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #a3e635);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
  transition: width 0.25s ease;
}

.pet-bond-bar div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.36);
  transition: width 0.25s ease;
}

.pet-letargo-note,
.pet-letargo-inline {
  display: block;
  margin-top: 5px;
  color: #fb7185;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(244, 63, 94, 0.28);
}

.pet-feed-box {
  max-width: 560px !important;
}

.pet-feed-subtitle,
.pet-feed-help {
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 6px 0 12px;
}

.pet-feed-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px auto 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.12), transparent 60%),
    rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.18);
}

.pet-feed-hero.sleeping {
  border-color: rgba(244, 63, 94, 0.30);
}

.pet-feed-main-img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 12px rgba(34, 211, 238, 0.38))
    drop-shadow(0 0 18px rgba(168, 85, 247, 0.26));
}

.pet-feed-main-emoji {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.pet-feed-hero-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.pet-feed-hero-info b {
  color: #f8fafc;
  font-family: 'Cinzel', serif;
}

.pet-feed-hero-info small {
  color: #94a3b8;
}

.pet-feed-gem-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.pet-feed-gem-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
}

.pet-feed-gem-option:hover {
  border-color: rgba(34, 211, 238, 0.50);
  background:
    radial-gradient(circle at left, rgba(34, 211, 238, 0.10), transparent 58%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.pet-feed-gem-option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pet-feed-gem-option img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.28));
}

.pet-feed-gem-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pet-feed-gem-option b {
  color: #e2e8f0;
  font-size: 0.82rem;
}

.pet-feed-gem-option small {
  color: #94a3b8;
  font-size: 0.72rem;
}

.pet-feed-empty {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.74);
  border: 1px dashed rgba(148, 163, 184, 0.24);
}

@media (max-width: 640px) {
  .pet-feed-gem-list {
    grid-template-columns: 1fr;
  }

  .pet-feed-hero {
    flex-direction: column;
  }

  .pet-feed-hero-info {
    text-align: center;
  }
}

.pet-display .pet-feed-sigil {
  font-size: 0.72rem !important;
  animation: petSustainPulse 1.9s ease-in-out infinite !important;
  transform: none;
}


/* =========================================================
   TEMPLE DE ARENA — COMPACTO EN HEADER
   ========================================================= */

#auth-section {
  width: 100% !important;
  max-width: 1000px !important;
  margin: 8px auto 4px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

#user-info {
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 1 !important;
  min-width: 0 !important;
}

#installBtn,
#discordBtn,
#vipBtn,
#arenaEnergyPanel {
  flex-shrink: 0 !important;
}

.arena-energy-panel {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
}

.arena-energy-header {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  position: static !important;
  transform: none !important;
}

.arena-energy-compact {
  width: 120px !important;
  height: 34px !important;
  padding: 3px 7px !important;
  box-sizing: border-box !important;

  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;

  border-radius: 11px !important;
  border: 1px solid rgba(34, 211, 238, 0.35) !important;

  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.24), transparent 36%),
    radial-gradient(circle at 86% 16%, rgba(168, 85, 247, 0.22), transparent 40%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.92)) !important;

  box-shadow:
    0 0 8px rgba(34, 211, 238, 0.18),
    0 0 14px rgba(168, 85, 247, 0.13),
    inset 0 0 12px rgba(34, 211, 238, 0.07) !important;

  overflow: hidden !important;
  position: relative !important;
}

.arena-energy-compact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(34, 211, 238, 0.12) 45%,
    transparent 62%
  );
  animation: arenaEnergyShimmer 4.8s ease-in-out infinite;
  pointer-events: none;
}

.arena-energy-compact-icon {
  width: 23px !important;
  height: 23px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 1 !important;

  filter:
    drop-shadow(0 0 5px rgba(34, 211, 238, 0.85))
    drop-shadow(0 0 10px rgba(168, 85, 247, 0.55)) !important;
}

.arena-energy-compact-body {
  min-width: 0 !important;
  flex: 1 !important;
  position: relative !important;
  z-index: 1 !important;
}

.arena-energy-compact-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 5px !important;
  line-height: 1 !important;
}

.arena-energy-compact-row span {
  font-family: 'Cinzel', serif !important;
  font-size: 0.43rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.35px !important;
  color: #bae6fd !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 6px rgba(34, 211, 238, 0.35) !important;
}

.arena-energy-compact-row b {
  font-size: 0.55rem !important;
  color: #e0f2fe !important;
  white-space: nowrap !important;
  min-width: 38px !important;
  text-align: right !important;
  text-shadow: 0 0 6px rgba(34, 211, 238, 0.45) !important;
}

.arena-energy-compact-bar {
  height: 4px !important;
  margin-top: 4px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(71, 85, 105, 0.65) !important;
}

.arena-energy-compact-bar > div {
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #2563eb, #22d3ee, #a855f7) !important;
  box-shadow: 0 0 9px rgba(34, 211, 238, 0.65) !important;
  transition: width 0.35s ease !important;
}

.arena-energy-panel.low .arena-energy-compact {
  border-color: rgba(251, 191, 36, 0.45) !important;
  box-shadow:
    0 0 10px rgba(251, 191, 36, 0.16),
    inset 0 0 12px rgba(251, 191, 36, 0.07) !important;
}

.arena-energy-panel.low .arena-energy-compact-bar > div {
  background: linear-gradient(90deg, #f97316, #facc15) !important;
  box-shadow: 0 0 9px rgba(251, 191, 36, 0.6) !important;
}

.arena-energy-panel.empty .arena-energy-compact {
  border-color: rgba(239, 68, 68, 0.55) !important;
  box-shadow:
    0 0 10px rgba(239, 68, 68, 0.18),
    inset 0 0 12px rgba(239, 68, 68, 0.08) !important;
}

.arena-energy-panel.empty .arena-energy-compact-bar > div {
  background: linear-gradient(90deg, #7f1d1d, #ef4444) !important;
  box-shadow: 0 0 9px rgba(239, 68, 68, 0.52) !important;
}

@keyframes arenaEnergyShimmer {
  0%, 100% {
    transform: translateX(-45%);
    opacity: 0.22;
  }

  50% {
    transform: translateX(45%);
    opacity: 0.75;
  }
}

@media (max-width: 768px) {
  #auth-section {
    max-width: 100% !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 8px auto 4px !important;
  }

  .arena-energy-compact {
    width: 120px !important;
    height: 32px !important;
  }

  .arena-energy-compact-icon {
    width: 21px !important;
    height: 21px !important;
  }

  .arena-energy-compact-row span {
    font-size: 0.4rem !important;
  }

  .arena-energy-compact-row b {
    font-size: 0.52rem !important;
  }
}



/* ====================== TORRE DEL VACÍO ====================== */
.tower-entry-btn {
  background: linear-gradient(135deg, #581c87, #111827 55%, #7f1d1d);
  color: #f8fafc;
  font-weight: 900;
  border: 1px solid rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.24);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tower-modal-box {
  max-width: 760px;
  width: min(94vw, 760px);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.22);
}

.tower-subtitle {
  color: #cbd5e1;
  line-height: 1.5;
  margin-top: -4px;
}

.tower-modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.tower-intro,
.tower-status-card,
.tower-panel,
.tower-log {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 12px;
}

.tower-intro p {
  margin: 7px 0;
  color: #cbd5e1;
}

.tower-status-card b {
  color: #f8fafc;
  font-size: 1rem;
}

.tower-status-card small {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  line-height: 1.4;
}

.tower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  .tower-grid {
    grid-template-columns: 1fr;
  }
}

.tower-panel h4 {
  margin: 0 0 10px;
  color: #fbbf24;
  letter-spacing: 0.03em;
}

.tower-unit-row,
.tower-enemy-row,
.tower-monolith-box {
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
}

.tower-unit-main {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.tower-unit-main b {
  color: #f8fafc;
  white-space: nowrap;
}

.tower-mini-bar,
.tower-boss-bar {
  height: 8px;
  background: rgba(51, 65, 85, 0.9);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 7px;
}

.tower-mini-bar > div,
.tower-boss-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #a3e635);
  transition: width 0.25s ease;
}

.tower-mini-bar.danger > div,
.tower-boss-bar > div {
  background: linear-gradient(90deg, #7c3aed, #ef4444);
}

.tower-enemy-row button,
.tower-monolith-box button,
.tower-actions button {
  margin-top: 8px;
}

.tower-warning {
  margin-top: 8px;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 800;
}

.tower-reward-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tower-reward-list span {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  padding: 5px 9px;
  color: #e2e8f0;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tower-log {
  color: #cbd5e1;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.84rem;
  line-height: 1.5;
}

.tower-empty-note {
  color: #94a3b8;
  font-size: 0.86rem;
}

.tower-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   FIX TORRE DEL VACÍO — Modal centrado + cartas visuales
   ========================================================= */
#towerModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at center, rgba(88, 28, 135, 0.26) 0%, rgba(2, 6, 23, 0.92) 76%);
  backdrop-filter: blur(5px);
}

#towerModal.open {
  display: flex;
}

#towerModal .tower-modal-box {
  position: relative;
  width: min(94vw, 880px);
  max-width: 880px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: 0;
  border-color: rgba(168, 85, 247, 0.58);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.18) inset,
    0 0 28px rgba(168, 85, 247, 0.22),
    0 18px 55px rgba(0, 0, 0, 0.70);
}

#towerModal .tower-grid {
  align-items: stretch;
}

.tower-combat-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.14);
  overflow: visible;
}

.tower-combat-card.comun { border-color: rgba(100, 116, 139, 0.45); }
.tower-combat-card.raro { border-color: rgba(59, 130, 246, 0.55); box-shadow: 0 0 14px rgba(59, 130, 246, 0.12); }
.tower-combat-card.epico { border-color: rgba(168, 85, 247, 0.58); box-shadow: 0 0 16px rgba(168, 85, 247, 0.16); }
.tower-combat-card.legendario { border-color: rgba(245, 158, 11, 0.62); box-shadow: 0 0 18px rgba(245, 158, 11, 0.18); }

.tower-combat-card.fallen {
  opacity: 0.55;
  filter: grayscale(0.5);
}

.tower-card-visual {
  position: relative;
  min-height: 92px;
  height: 92px;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(15, 23, 42, 0.86);
  background-size: 170% 120%;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid rgba(148, 163, 184, 0.12);
  overflow: visible;
}

.tower-card-visual > img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(250, 204, 21, 0.35));
  z-index: 2;
}

.tower-card-visual.enemy {
  background:
    radial-gradient(circle, rgba(168, 85, 247, 0.28), rgba(15, 23, 42, 0.92) 64%);
}

.tower-card-visual.monolith {
  background:
    radial-gradient(circle, rgba(239, 68, 68, 0.24), rgba(88, 28, 135, 0.15) 45%, rgba(15, 23, 42, 0.95) 72%);
}

.tower-card-visual.monolith > img {
  width: 78px;
  height: 78px;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.7));
}

.tower-echo-sigil {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #f0abfc;
  font-size: 2rem;
  font-weight: 900;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.42), rgba(2, 6, 23, 0.95) 70%);
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.32);
}

.tower-pet-badge {
  position: absolute;
  top: -21px;
  left: 50%;
  transform: translateX(-50%);
  width: 54px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}

.tower-pet-badge img {
  max-width: 54px;
  max-height: 48px;
  object-fit: contain;
  animation: petFloatUnified 2s ease-in-out infinite;
}

.tower-pet-badge span {
  font-size: 1.8rem;
  animation: petFloatUnified 2s ease-in-out infinite;
}

.tower-pet-badge.comun img,
.tower-pet-badge.comun span { filter: drop-shadow(0 0 8px var(--color-comun)); }
.tower-pet-badge.raro img,
.tower-pet-badge.raro span { filter: drop-shadow(0 0 10px var(--color-raro)); }
.tower-pet-badge.epico img,
.tower-pet-badge.epico span { filter: drop-shadow(0 0 13px var(--color-epico)); }
.tower-pet-badge.legendario img,
.tower-pet-badge.legendario span { filter: drop-shadow(0 0 15px var(--color-legendario)); }

.tower-shield-badge {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  z-index: 4;
  pointer-events: none;
}

.tower-shield-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.42));
}

.tower-card-info {
  min-width: 0;
}

.tower-card-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 900;
}

.tower-card-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tower-card-name b {
  color: #fbbf24;
  white-space: nowrap;
}

.tower-card-sub {
  color: #94a3b8;
  font-size: 0.76rem;
  margin-top: 2px;
}

.tower-card-hp {
  margin-top: 6px;
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 800;
}

.tower-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.tower-card-stats span {
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  padding: 3px 7px;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
}

.tower-combat-card button {
  margin-top: 9px;
  width: 100%;
  background: linear-gradient(135deg, #7c3aed, #4c1d95);
  font-weight: 900;
}

.tower-monolith-card button {
  background: linear-gradient(135deg, #b91c1c, #581c87);
}

@media (max-width: 560px) {
  .tower-combat-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .tower-card-visual {
    min-height: 78px;
    height: 78px;
  }

  .tower-card-visual > img {
    width: 58px;
    height: 58px;
  }

  .tower-pet-badge {
    width: 46px;
    height: 40px;
    top: -18px;
  }
}

/* ====================== TORRE DEL VACÍO: BALANCE + EFECTOS VIVOS ====================== */
.tower-cooldown-box {
  text-align: center;
  border-color: rgba(168, 85, 247, 0.34);
  background:
    radial-gradient(circle at top, rgba(168, 85, 247, 0.22), transparent 48%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.tower-cooldown-box h3 {
  margin: 0 0 8px;
  color: #f5d0fe;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tower-cooldown-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  margin: 10px auto;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(216, 180, 254, 0.34);
  color: #f8fafc;
  font-weight: 1000;
  font-size: 1.15rem;
  background: rgba(88, 28, 135, 0.30);
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.22);
}

.tower-muted {
  color: #94a3b8;
  font-size: 0.85rem;
}

.tower-card-visual.enemy .tower-echo-sigil {
  animation: towerEchoPulse 1.9s ease-in-out infinite;
}

.tower-enemy-row:hover .tower-echo-sigil {
  animation: towerEchoPulse 0.85s ease-in-out infinite, towerEchoJitter 0.25s linear infinite;
}

.tower-monolith-card {
  isolation: isolate;
  overflow: hidden;
}

.tower-monolith-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.18), transparent 54%);
  opacity: 0.72;
  animation: towerVoidBreath 3.2s ease-in-out infinite;
}

.tower-monolith-visual {
  overflow: hidden;
}

.tower-monolith-aura,
.tower-monolith-crack {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.tower-monolith-aura {
  z-index: 1;
  opacity: 0.72;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.32), transparent 62%);
  animation: towerMonolithAura 2.2s ease-in-out infinite;
}

.tower-monolith-crack {
  z-index: 3;
  opacity: 0;
  background:
    linear-gradient(105deg, transparent 0 44%, rgba(248, 113, 113, 0.65) 45%, transparent 47% 100%),
    linear-gradient(16deg, transparent 0 54%, rgba(251, 191, 36, 0.34) 55%, transparent 57% 100%);
  mix-blend-mode: screen;
}

.tower-monolith-visual > img {
  position: relative;
  z-index: 2;
  transform-origin: 50% 72%;
}

.tower-monolith-stable .tower-monolith-visual > img,
.tower-monolith-visual.tower-monolith-stable > img {
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.72)) saturate(1.08);
}

.tower-monolith-wounded .tower-monolith-visual > img,
.tower-monolith-visual.tower-monolith-wounded > img {
  filter: drop-shadow(0 0 16px rgba(236, 72, 153, 0.76)) saturate(1.22) hue-rotate(18deg);
  animation: towerMonolithPulse 1.7s ease-in-out infinite;
}

.tower-monolith-critical .tower-monolith-visual > img,
.tower-monolith-visual.tower-monolith-critical > img {
  filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.86)) saturate(1.45) hue-rotate(42deg);
  animation: towerMonolithPulse 1s ease-in-out infinite, towerMonolithShake 0.42s linear infinite;
}

.tower-monolith-collapse .tower-monolith-visual > img,
.tower-monolith-visual.tower-monolith-collapse > img {
  filter: drop-shadow(0 0 24px rgba(251, 191, 36, 0.95)) saturate(1.7) hue-rotate(74deg);
  animation: towerMonolithPulse 0.72s ease-in-out infinite, towerMonolithShakeHard 0.28s linear infinite;
}

.tower-monolith-critical .tower-monolith-crack,
.tower-monolith-collapse .tower-monolith-crack {
  opacity: 0.68;
  animation: towerCrackFlicker 0.9s steps(2, end) infinite;
}

.tower-monolith-collapse .tower-monolith-crack {
  opacity: 0.95;
}

.tower-boss-bar-stable > div {
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.tower-boss-bar-wounded > div {
  background: linear-gradient(90deg, #a21caf, #f472b6, #f97316);
}

.tower-boss-bar-critical > div,
.tower-boss-bar-collapse > div {
  background: linear-gradient(90deg, #7f1d1d, #ef4444, #f59e0b);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.46);
  animation: towerBarDanger 0.8s ease-in-out infinite;
}

.tower-monolith-shielded {
  box-shadow:
    inset 0 0 0 1px rgba(56, 189, 248, 0.16),
    0 0 20px rgba(56, 189, 248, 0.12);
}

.tower-warning-red {
  border-color: rgba(248, 113, 113, 0.36);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.24);
}

.tower-log div {
  animation: towerLogEnter 0.24s ease-out both;
}

@keyframes towerVoidBreath {
  0%, 100% { transform: scale(0.96) rotate(0deg); opacity: 0.44; }
  50% { transform: scale(1.06) rotate(8deg); opacity: 0.82; }
}

@keyframes towerEchoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 18px rgba(168, 85, 247, 0.28); }
  50% { transform: scale(1.07); box-shadow: 0 0 28px rgba(216, 180, 254, 0.46); }
}

@keyframes towerEchoJitter {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  25% { transform: translate(1px, -1px) scale(1.06); }
  50% { transform: translate(-1px, 1px) scale(1.04); }
  75% { transform: translate(1px, 1px) scale(1.06); }
}

@keyframes towerMonolithAura {
  0%, 100% { opacity: 0.46; transform: scale(0.94); }
  50% { opacity: 0.92; transform: scale(1.08); }
}

@keyframes towerMonolithPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes towerMonolithShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1.04); }
  25% { transform: translate(1px, -1px) rotate(-1deg) scale(1.05); }
  50% { transform: translate(-1px, 1px) rotate(1deg) scale(1.03); }
  75% { transform: translate(1px, 1px) rotate(0.6deg) scale(1.05); }
}

@keyframes towerMonolithShakeHard {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1.08); }
  20% { transform: translate(2px, -2px) rotate(-2deg) scale(1.1); }
  40% { transform: translate(-2px, 1px) rotate(2deg) scale(1.07); }
  60% { transform: translate(2px, 2px) rotate(1deg) scale(1.1); }
  80% { transform: translate(-1px, -2px) rotate(-1deg) scale(1.08); }
}

@keyframes towerCrackFlicker {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.95; }
}

@keyframes towerBarDanger {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.45); }
}

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


/* ====================== TORRE DEL VACÍO: ASSETS + ATAQUES VISUALES ====================== */
.tower-player-card,
.tower-enemy-card,
.tower-monolith-card {
  transform-origin: center;
  will-change: transform, filter;
}

.tower-player-visual > img {
  filter:
    drop-shadow(0 0 7px rgba(56, 189, 248, 0.38))
    drop-shadow(0 0 10px rgba(168, 85, 247, 0.20));
}

.tower-card-visual.enemy {
  overflow: visible;
  isolation: isolate;
}

.tower-card-visual.enemy::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  z-index: 0;
  background:
    radial-gradient(circle, rgba(168, 85, 247, 0.22), transparent 64%);
  filter: blur(7px);
  animation: towerEnemyAuraBreath 2.7s ease-in-out infinite;
}

.tower-card-visual.enemy > img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  z-index: 2;
  filter:
    drop-shadow(0 0 10px rgba(168, 85, 247, 0.58))
    drop-shadow(0 0 20px rgba(236, 72, 153, 0.20));
  animation: towerEnemyFloat 3.1s ease-in-out infinite;
}

.tower-enemy-elite .tower-card-visual.enemy > img {
  width: 126px;
  height: 126px;
  filter:
    drop-shadow(0 0 13px rgba(236, 72, 153, 0.70))
    drop-shadow(0 0 24px rgba(127, 29, 29, 0.35));
}

.tower-enemy-elite .tower-card-visual.enemy::before {
  background:
    radial-gradient(circle, rgba(239, 68, 68, 0.18), rgba(168, 85, 247, 0.18), transparent 68%);
}

.tower-enemy-echo .tower-card-visual.enemy > img {
  filter:
    drop-shadow(0 0 12px rgba(168, 85, 247, 0.55))
    drop-shadow(0 0 18px rgba(56, 189, 248, 0.16));
}

.tower-monolith-visual > img {
  width: 118px;
  height: 118px;
  object-fit: contain;
}

.tower-damage-float {
  position: absolute;
  left: 50%;
  top: 4px;
  z-index: 30;
  transform: translateX(-50%);
  pointer-events: none;
  padding: 3px 9px;
  border-radius: 999px;
  color: #f8fafc;
  font-weight: 1000;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  animation: towerDamageFloat 0.86s ease-out forwards;
}

.tower-damage-float.player {
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.22);
}

.tower-damage-float.enemy {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.40);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
}

.tower-damage-float.crit {
  color: #fff7ed;
  font-size: 0.95rem;
  border-color: rgba(251, 146, 60, 0.72);
  background: rgba(127, 29, 29, 0.62);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.48);
}

.tower-damage-float.heal {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.48);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.25);
}

.tower-damage-float.block {
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.52);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.28);
}

.tower-attack-lunge {
  animation: towerPlayerLunge 0.52s cubic-bezier(.2,.9,.2,1) both;
}

.tower-enemy-lunge {
  animation: towerEnemyLunge 0.52s cubic-bezier(.2,.9,.2,1) both;
}

.tower-hit-shake {
  animation: towerHitShake 0.58s ease-out both;
}

.tower-crit-hit {
  animation: towerCritHit 0.72s ease-out both;
}

.tower-block-flash {
  animation: towerBlockFlash 0.62s ease-out both;
}

.tower-summon-pulse {
  animation: towerSummonPulse 0.9s ease-out both;
}

.tower-echo-spawn {
  animation: towerEchoSpawn 0.9s ease-out both;
}

.tower-death-fade {
  animation: towerDeathFade 0.62s ease-out both;
}

.tower-monolith-shield-flash {
  animation: towerShieldFlash 0.9s ease-out both;
}

.tower-floor-complete-flash {
  animation: towerFloorCompleteFlash 0.9s ease-out both;
}

.tower-master-blessing-flash {
  animation: towerMasterBlessingFlash 1.25s ease-out both;
}

@keyframes towerEnemyAuraBreath {
  0%, 100% { transform: scale(0.92); opacity: 0.42; }
  50% { transform: scale(1.12); opacity: 0.82; }
}

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

@keyframes towerDamageFloat {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(0.82); }
  16% { opacity: 1; transform: translate(-50%, -8px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -44px) scale(0.92); }
}

@keyframes towerPlayerLunge {
  0%, 100% { transform: translateX(0) scale(1); filter: none; }
  38% { transform: translateX(12px) scale(1.04); filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.42)); }
  58% { transform: translateX(-3px) scale(1.01); }
}

@keyframes towerEnemyLunge {
  0%, 100% { transform: translateX(0) scale(1); filter: none; }
  42% { transform: translateX(-12px) scale(1.05); filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.55)); }
}

@keyframes towerHitShake {
  0%, 100% { transform: translate(0, 0); }
  18% { transform: translate(-5px, 1px); }
  34% { transform: translate(5px, -1px); }
  50% { transform: translate(-3px, 2px); }
  66% { transform: translate(3px, 0); }
}

@keyframes towerCritHit {
  0%, 100% { transform: translate(0, 0) scale(1); filter: none; }
  18% { transform: translate(-7px, 1px) scale(1.04); filter: brightness(1.85) saturate(1.5) drop-shadow(0 0 20px rgba(239, 68, 68, 0.55)); }
  34% { transform: translate(7px, -1px) scale(1.03); }
  50% { transform: translate(-4px, 2px) scale(1.02); }
  70% { filter: brightness(1.25) saturate(1.2); }
}

@keyframes towerBlockFlash {
  0%, 100% { filter: none; transform: scale(1); }
  30% { filter: brightness(1.45) drop-shadow(0 0 20px rgba(56, 189, 248, 0.65)); transform: scale(1.03); }
}

@keyframes towerSummonPulse {
  0%, 100% { filter: none; transform: scale(1); }
  35% { filter: brightness(1.7) saturate(1.45) drop-shadow(0 0 26px rgba(168, 85, 247, 0.75)); transform: scale(1.06); }
  70% { filter: brightness(1.3) saturate(1.2); transform: scale(0.98); }
}

@keyframes towerEchoSpawn {
  0% { opacity: 0; transform: scale(0.58) translateY(16px); filter: blur(5px) brightness(1.9); }
  55% { opacity: 1; transform: scale(1.12) translateY(-4px); filter: blur(0) brightness(1.4) drop-shadow(0 0 22px rgba(168, 85, 247, 0.62)); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: none; }
}

@keyframes towerDeathFade {
  0% { opacity: 1; transform: scale(1); filter: brightness(1.1); }
  65% { opacity: 0.35; transform: scale(0.94) rotate(-1deg); filter: grayscale(0.5) blur(1px); }
  100% { opacity: 0.75; transform: scale(1); }
}

@keyframes towerShieldFlash {
  0%, 100% { box-shadow: inherit; }
  35% {
    box-shadow:
      inset 0 0 0 1px rgba(56, 189, 248, 0.52),
      0 0 30px rgba(56, 189, 248, 0.34),
      0 0 46px rgba(168, 85, 247, 0.18);
  }
}

@keyframes towerFloorCompleteFlash {
  0%, 100% { filter: none; }
  35% { filter: brightness(1.22) saturate(1.18) drop-shadow(0 0 26px rgba(168, 85, 247, 0.38)); }
}

@keyframes towerMasterBlessingFlash {
  0%, 100% { filter: none; }
  22% { filter: brightness(1.5) saturate(1.25) drop-shadow(0 0 28px rgba(251, 191, 36, 0.55)); }
  54% { filter: brightness(1.2) saturate(1.12) drop-shadow(0 0 18px rgba(168, 85, 247, 0.38)); }
}

/* =========================================================
   MONOLITO GLOBAL — EFECTOS INMERSIVOS V2
   Usa las mismas fases visuales que la Torre sin agregar listeners.
   ========================================================= */

.monolith-banner.wounded {
  border-color: rgba(217, 70, 239, 0.46);
  box-shadow:
    0 0 22px rgba(217, 70, 239, 0.18),
    inset 0 0 20px rgba(168, 85, 247, 0.14);
}

.monolith-banner.collapse {
  border-color: rgba(251, 191, 36, 0.62);
  box-shadow:
    0 0 28px rgba(251, 191, 36, 0.18),
    0 0 34px rgba(239, 68, 68, 0.20),
    inset 0 0 24px rgba(239, 68, 68, 0.16);
  animation: globalMonolithBannerDanger 0.72s linear infinite;
}

.monolith-banner-icon.wounded {
  filter:
    drop-shadow(0 0 12px rgba(217, 70, 239, 0.78))
    drop-shadow(0 0 18px rgba(239, 68, 68, 0.22));
}

.monolith-banner-icon.critical {
  filter:
    drop-shadow(0 0 14px rgba(239, 68, 68, 0.80))
    drop-shadow(0 0 18px rgba(168, 85, 247, 0.44));
  animation: monolithCriticalFloat 1.05s ease-in-out infinite;
}

.monolith-banner-icon.collapse {
  filter:
    drop-shadow(0 0 16px rgba(251, 191, 36, 0.82))
    drop-shadow(0 0 22px rgba(239, 68, 68, 0.55));
  animation: globalMonolithCollapseIcon 0.55s linear infinite;
}

.monolith-stage.collapse::before {
  background:
    radial-gradient(circle, rgba(251, 191, 36, 0.24), transparent 45%),
    radial-gradient(circle, rgba(239, 68, 68, 0.34), transparent 58%),
    radial-gradient(circle, rgba(168, 85, 247, 0.22), transparent 72%);
  animation: globalMonolithCollapseAura 0.85s ease-in-out infinite;
}

.monolith-void-aura,
.monolith-crack-overlay,
.monolith-particle-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.monolith-void-aura {
  width: 250px;
  height: 250px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent, rgba(34, 211, 238, 0.20), transparent, rgba(168, 85, 247, 0.22), transparent, rgba(239, 68, 68, 0.18), transparent);
  filter: blur(0.6px);
  opacity: 0.45;
  animation: globalMonolithVoidSpin 7s linear infinite;
}

.monolith-stage.wounded .monolith-void-aura {
  opacity: 0.60;
  animation-duration: 5s;
}

.monolith-stage.critical .monolith-void-aura {
  opacity: 0.75;
  animation-duration: 3.2s;
}

.monolith-stage.collapse .monolith-void-aura {
  opacity: 0.95;
  animation-duration: 1.9s;
  filter: blur(0.4px) brightness(1.18);
}

.monolith-crack-overlay {
  z-index: 3;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    linear-gradient(102deg, transparent 0 38%, rgba(34, 211, 238, 0.28) 39%, transparent 41% 100%),
    linear-gradient(20deg, transparent 0 54%, rgba(248, 113, 113, 0.55) 55%, transparent 57% 100%),
    linear-gradient(150deg, transparent 0 48%, rgba(251, 191, 36, 0.34) 49%, transparent 51% 100%);
}

.monolith-stage.critical .monolith-crack-overlay {
  opacity: 0.58;
  animation: globalMonolithCrackFlicker 0.8s steps(2, end) infinite;
}

.monolith-stage.collapse .monolith-crack-overlay {
  opacity: 0.95;
  animation: globalMonolithCrackFlicker 0.42s steps(2, end) infinite;
}

.monolith-particle-ring {
  z-index: 1;
  opacity: 0;
  background:
    radial-gradient(circle at 18% 58%, rgba(34, 211, 238, 0.85) 0 2px, transparent 3px),
    radial-gradient(circle at 76% 38%, rgba(168, 85, 247, 0.85) 0 2px, transparent 3px),
    radial-gradient(circle at 62% 80%, rgba(248, 113, 113, 0.76) 0 2px, transparent 3px),
    radial-gradient(circle at 32% 25%, rgba(251, 191, 36, 0.70) 0 1.5px, transparent 3px);
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.55));
  animation: globalMonolithParticleOrbit 4.8s linear infinite;
}

.monolith-stage.wounded .monolith-particle-ring,
.monolith-stage.critical .monolith-particle-ring,
.monolith-stage.collapse .monolith-particle-ring {
  opacity: 0.72;
}

.monolith-stage.collapse .monolith-particle-ring {
  opacity: 1;
  animation-duration: 2.1s;
}

.monolith-stage.collapse .monolith-main-image {
  filter:
    brightness(1.18)
    saturate(1.55)
    drop-shadow(0 0 24px rgba(251, 191, 36, 0.78))
    drop-shadow(0 0 30px rgba(239, 68, 68, 0.48));
  animation: globalMonolithCollapseMain 0.55s linear infinite;
}

.monolith-stage.critical .monolith-main-image {
  animation: monolithCriticalFloat 0.95s ease-in-out infinite, globalMonolithMicroShake 0.36s linear infinite;
}

.monolith-hp-fill.wounded {
  background: linear-gradient(90deg, #ef4444, #d946ef, #22d3ee);
}

.monolith-hp-fill.critical {
  background: linear-gradient(90deg, #7f1d1d, #ef4444, #fbbf24);
  animation: globalMonolithHpDanger 0.95s ease-in-out infinite;
}

.monolith-hp-fill.collapse {
  background: linear-gradient(90deg, #450a0a, #dc2626, #fbbf24, #fff7ed);
  animation: globalMonolithHpDanger 0.48s ease-in-out infinite;
}

.monolith-impact-ring {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(34, 211, 238, 0.75);
  transform: translate(-50%, -50%) scale(0.3);
  box-shadow:
    0 0 14px rgba(34, 211, 238, 0.85),
    0 0 22px rgba(168, 85, 247, 0.45),
    inset 0 0 12px rgba(248, 113, 113, 0.25);
  animation: globalMonolithImpactRing 0.72s ease-out forwards;
}

.monolith-impact-slash {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 150px;
  height: 12px;
  border-radius: 999px;
  transform: translate(-50%, -50%) rotate(-22deg) scaleX(0.25);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), rgba(34, 211, 238, 0.88), transparent);
  filter:
    drop-shadow(0 0 12px rgba(34, 211, 238, 0.9))
    drop-shadow(0 0 20px rgba(168, 85, 247, 0.5));
  animation: globalMonolithImpactSlash 0.52s ease-out forwards;
}

@keyframes globalMonolithVoidSpin {
  from { transform: translate(-50%, -50%) rotate(0deg) scale(0.94); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.04); }
  to { transform: translate(-50%, -50%) rotate(360deg) scale(0.94); }
}

@keyframes globalMonolithCrackFlicker {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.85); transform: scale(1.015); }
}

@keyframes globalMonolithParticleOrbit {
  from { transform: rotate(0deg) scale(0.94); }
  50% { transform: rotate(180deg) scale(1.04); }
  to { transform: rotate(360deg) scale(0.94); }
}

@keyframes globalMonolithMicroShake {
  0%, 100% { margin-left: 0; }
  25% { margin-left: -1px; }
  50% { margin-left: 1px; }
  75% { margin-left: -0.5px; }
}

@keyframes globalMonolithCollapseMain {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  20% { transform: translateY(-3px) rotate(-0.9deg) scale(1.025); }
  45% { transform: translateY(2px) rotate(0.9deg) scale(0.995); }
  70% { transform: translateY(-1px) rotate(-0.45deg) scale(1.015); }
}

@keyframes globalMonolithCollapseAura {
  0%, 100% { transform: scale(0.94); opacity: 0.72; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes globalMonolithHpDanger {
  0%, 100% { filter: brightness(1); box-shadow: 0 0 12px rgba(239, 68, 68, 0.52); }
  50% { filter: brightness(1.55); box-shadow: 0 0 22px rgba(251, 191, 36, 0.64); }
}

@keyframes globalMonolithBannerDanger {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  50% { transform: translateX(1px); }
  75% { transform: translateX(-0.5px); }
}

@keyframes globalMonolithCollapseIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-2px) rotate(-1.2deg); }
  50% { transform: translateY(1px) rotate(1deg); }
  75% { transform: translateY(-1px) rotate(-0.6deg); }
}

@keyframes globalMonolithImpactRing {
  0% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.25); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(4.7); }
}

@keyframes globalMonolithImpactSlash {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-22deg) scaleX(0.2); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-22deg) scaleX(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .monolith-void-aura,
  .monolith-particle-ring,
  .monolith-stage.collapse .monolith-main-image,
  .monolith-stage.critical .monolith-main-image,
  .monolith-banner.collapse,
  .monolith-banner-icon.collapse {
    animation: none !important;
  }
}

/* =========================================================
   FIX JEFE5 — MONOLITO GLOBAL: MOVIMIENTO LOW HP + PC GPU
   =========================================================
   Motivo: en algunos navegadores de PC el aura cónica y los
   puntos orbitales podían quedar estáticos por reduced-motion
   o por falta de composición GPU. Estos overrides fuerzan la
   animación visual del Monolito global sin tocar backend/balance.
*/

.monolith-stage .monolith-main-image,
.monolith-stage .monolith-void-aura,
.monolith-stage .monolith-particle-ring,
.monolith-stage .monolith-crack-overlay {
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform, filter, opacity;
}

.monolith-stage .monolith-main-image {
  transform-origin: 50% 72%;
}

.monolith-void-aura {
  transform-origin: 50% 50%;
  animation: globalMonolithVoidSpinFixed 5.8s linear infinite !important;
  animation-play-state: running !important;
}

.monolith-stage.wounded .monolith-void-aura {
  animation-duration: 4.2s !important;
}

.monolith-stage.critical .monolith-void-aura {
  animation-duration: 2.7s !important;
}

.monolith-stage.collapse .monolith-void-aura {
  animation-duration: 1.55s !important;
}

.monolith-particle-ring {
  transform-origin: 50% 50%;
  animation: globalMonolithParticleOrbitFixed 3.8s linear infinite !important;
  animation-play-state: running !important;
}

.monolith-stage.wounded .monolith-particle-ring {
  animation-duration: 3.2s !important;
}

.monolith-stage.critical .monolith-particle-ring {
  animation-duration: 2.35s !important;
}

.monolith-stage.collapse .monolith-particle-ring {
  animation-duration: 1.55s !important;
}

.monolith-stage.wounded .monolith-main-image:not(.monolith-hit-effect):not(.monolith-destroyed-effect):not(.monolith-after-destruction-hidden) {
  animation: globalMonolithWoundedBreathFixed 1.35s ease-in-out infinite !important;
}

.monolith-stage.critical .monolith-main-image:not(.monolith-hit-effect):not(.monolith-destroyed-effect):not(.monolith-after-destruction-hidden) {
  animation: globalMonolithCriticalInstabilityFixed 0.42s linear infinite !important;
}

.monolith-stage.collapse .monolith-main-image:not(.monolith-hit-effect):not(.monolith-destroyed-effect):not(.monolith-after-destruction-hidden) {
  animation: globalMonolithCollapseInstabilityFixed 0.26s linear infinite !important;
}

.monolith-stage.critical .monolith-crack-overlay,
.monolith-stage.collapse .monolith-crack-overlay {
  will-change: opacity, filter, transform;
}

@keyframes globalMonolithVoidSpinFixed {
  0% {
    transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(0.93);
    filter: blur(0.6px) hue-rotate(0deg);
  }
  50% {
    transform: translate3d(-50%, -50%, 0) rotate(180deg) scale(1.06);
    filter: blur(0.4px) hue-rotate(35deg) brightness(1.14);
  }
  100% {
    transform: translate3d(-50%, -50%, 0) rotate(360deg) scale(0.93);
    filter: blur(0.6px) hue-rotate(0deg);
  }
}

@keyframes globalMonolithParticleOrbitFixed {
  0% {
    transform: translateZ(0) rotate(0deg) scale(0.94);
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.55)) hue-rotate(0deg);
  }
  50% {
    transform: translateZ(0) rotate(180deg) scale(1.08);
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.72)) hue-rotate(55deg) brightness(1.22);
  }
  100% {
    transform: translateZ(0) rotate(360deg) scale(0.94);
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.55)) hue-rotate(0deg);
  }
}

@keyframes globalMonolithWoundedBreathFixed {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate3d(0, -5px, 0) rotate(-0.35deg) scale(1.025);
  }
}

@keyframes globalMonolithCriticalInstabilityFixed {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1.035);
  }
  20% {
    transform: translate3d(1px, -2px, 0) rotate(-1.1deg) scale(1.055);
  }
  45% {
    transform: translate3d(-1px, 1px, 0) rotate(0.9deg) scale(1.025);
  }
  70% {
    transform: translate3d(2px, 0, 0) rotate(-0.55deg) scale(1.048);
  }
}

@keyframes globalMonolithCollapseInstabilityFixed {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1.075);
    filter:
      brightness(1.22)
      saturate(1.65)
      drop-shadow(0 0 26px rgba(251, 191, 36, 0.82))
      drop-shadow(0 0 34px rgba(239, 68, 68, 0.56));
  }
  18% {
    transform: translate3d(3px, -3px, 0) rotate(-2deg) scale(1.105);
  }
  38% {
    transform: translate3d(-2px, 2px, 0) rotate(2deg) scale(1.065);
  }
  58% {
    transform: translate3d(2px, 2px, 0) rotate(1deg) scale(1.10);
  }
  78% {
    transform: translate3d(-1px, -3px, 0) rotate(-1.4deg) scale(1.08);
  }
}

/* En PC algunos sistemas tienen reduced-motion activo y congelaban los puntos/rayos.
   Para el Monolito global mantenemos movimiento mínimo porque es feedback de combate. */
@media (prefers-reduced-motion: reduce) {
  .monolith-stage .monolith-void-aura {
    animation: globalMonolithVoidSpinFixed 8s linear infinite !important;
  }

  .monolith-stage .monolith-particle-ring {
    animation: globalMonolithParticleOrbitFixed 6s linear infinite !important;
  }

  .monolith-stage.critical .monolith-main-image:not(.monolith-hit-effect):not(.monolith-destroyed-effect):not(.monolith-after-destruction-hidden) {
    animation: globalMonolithCriticalInstabilityFixed 0.72s linear infinite !important;
  }

  .monolith-stage.collapse .monolith-main-image:not(.monolith-hit-effect):not(.monolith-destroyed-effect):not(.monolith-after-destruction-hidden) {
    animation: globalMonolithCollapseInstabilityFixed 0.48s linear infinite !important;
  }
}

/* =========================================================
   ESTOLAS ÁLMICAS — TELAR DE ÉTER
   ========================================================= */
#game-container {
  position: relative;
}

.stola-npc-anchor {
  position: absolute;
  left: clamp(18px, 8vw, 170px);
  top: 185px;
  width: 165px;
  min-height: 230px;
  z-index: 35;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  opacity: 0.92;
  transition: transform 180ms ease, opacity 180ms ease, filter 180ms ease;
  user-select: none;
}

.stola-npc-anchor:hover,
.stola-npc-anchor:focus-visible {
  opacity: 1;
  transform: translateY(-4px) scale(1.03);
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.8));
  outline: none;
}

.stola-npc-anchor img {
  position: relative;
  z-index: 2;
  width: 150px;
  height: 185px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 14px rgba(168, 85, 247, 0.75))
    drop-shadow(0 0 28px rgba(249, 115, 22, 0.22));
  animation: stolaNpcFloat 3.4s ease-in-out infinite;
}

.stola-npc-glow {
  position: absolute;
  top: 34px;
  width: 120px;
  height: 140px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(168, 85, 247, 0.26), transparent 68%);
  filter: blur(12px);
  pointer-events: none;
}

.stola-npc-label {
  margin-top: -2px;
  padding: 4px 8px;
  border: 1px solid rgba(192, 132, 252, 0.45);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #f5d0fe;
  font-size: 0.72rem;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.8);
}

.stola-npc-whisper {
  margin-top: 6px;
  width: 210px;
  max-width: 42vw;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.25);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(59, 7, 100, 0.6));
  color: #d8b4fe;
  font-size: 0.72rem;
  line-height: 1.25;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.22);
}

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

.item.stola-equipped,
.fighter.stola-equipped {
  margin-top: 34px;
}

.stola-display {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 158px;
  max-width: 94%;
  transform: translateX(-50%);
  z-index: 45;
  pointer-events: none;
}

.stola-display img {
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 0 10px rgba(249, 115, 22, 0.55))
    drop-shadow(0 0 16px rgba(168, 85, 247, 0.30));
}

.item.stola-equipped .pet-display,
.fighter.stola-equipped .pet-display {
  top: -72px;
  width: 66px;
  height: 58px;
  z-index: 55;
}

.item.stola-equipped .pet-display img,
.fighter.stola-equipped .pet-display img {
  width: 56px !important;
}

.item-extra-stola {
  border-color: rgba(192, 132, 252, 0.38);
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.42), rgba(15, 23, 42, 0.74));
  color: #e9d5ff;
}

.item-line-icon-stola {
  filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.85));
}

#stolaNpcModal,
#stolaEquipModal,
#stolaAbsorbModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at center, rgba(88, 28, 135, 0.32), transparent 42%),
    rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(4px);
}

#stolaNpcModal.open,
#stolaEquipModal.open,
#stolaAbsorbModal.open {
  display: flex;
}

.stola-modal-box {
  border-color: rgba(192, 132, 252, 0.5) !important;
  box-shadow:
    0 0 0 1px rgba(249, 115, 22, 0.16),
    0 0 30px rgba(88, 28, 135, 0.42),
    inset 0 0 24px rgba(15, 23, 42, 0.8) !important;
}

.stola-absorb-box {
  width: min(94vw, 680px) !important;
  max-width: 680px !important;
}

.stola-modal-subtitle,
.stola-mini-note,
.stola-empty-note {
  color: #c4b5fd;
  font-size: 0.86rem;
  line-height: 1.35;
}

.stola-lore-box,
.stola-cost-box {
  margin: 10px 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(192, 132, 252, 0.22);
}

.stola-cost-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
  font-weight: 700;
}

.stola-cost-line.ok { color: #86efac; }
.stola-cost-line.missing { color: #fca5a5; }

.stola-main-action,
.stola-ritual-action {
  width: min(100%, 260px);
  margin-top: 8px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.stola-main-action {
  background: linear-gradient(135deg, #7e22ce, #f97316) !important;
}

.stola-ritual-action {
  background: linear-gradient(135deg, #4c1d95, #7c3aed) !important;
}

.stola-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 10px;
}

.stola-card,
.stola-weapon-offer,
.stola-selected-ritual,
.stola-result-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(59, 7, 100, 0.45));
  border: 1px solid rgba(192, 132, 252, 0.25);
  text-align: left;
}

.stola-card img,
.stola-weapon-offer img,
.stola-selected-ritual img,
.stola-result-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.75));
  flex: 0 0 auto;
}

.stola-card-body {
  flex: 1;
  min-width: 0;
}

.stola-card-body b,
.stola-selected-ritual b,
.stola-result-card b,
.stola-weapon-offer b {
  display: block;
  color: #f5d0fe;
}

.stola-card-body small,
.stola-selected-ritual small,
.stola-result-card small,
.stola-weapon-offer small {
  display: inline-block;
  color: #c4b5fd;
  margin-right: 5px;
  font-size: 0.74rem;
}

.stola-bonus-lines small {
  display: inline-block;
  margin: 2px 4px 0 0;
  color: #bef264;
}

.stola-empty-echo {
  color: #94a3b8;
  font-size: 0.76rem;
}

.stola-equipped-note {
  color: #fbbf24 !important;
}

.stola-weapon-offer > div {
  flex: 1;
}

.stola-back-button {
  background: #334155 !important;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .stola-npc-anchor {
    position: relative;
    left: auto;
    top: auto;
    width: min(92vw, 240px);
    min-height: auto;
    margin: 8px auto 14px;
  }

  .stola-npc-anchor img {
    width: 108px;
    height: 128px;
  }

  .stola-npc-whisper {
    width: min(86vw, 280px);
    max-width: 86vw;
  }

  .stola-display {
    width: 190px;
    top: -42px;
  }
}


@media (max-width: 768px) {
  .item.stola-equipped,
  .fighter.stola-equipped {
    margin-top: 30px;
  }

  .stola-display {
    top: -16px;
    width: 148px;
  }

  .item.stola-equipped .pet-display,
  .fighter.stola-equipped .pet-display {
    top: -66px;
    width: 60px;
    height: 54px;
  }

  .item.stola-equipped .pet-display img,
  .fighter.stola-equipped .pet-display img {
    width: 50px !important;
  }
}

@media (max-width: 768px) {
  #sub-stats-container {
    top: 62px;
    width: 430px;
    height: 180px;
  }

  .sub-stats-left {
    margin-left: 118px;
  }

  .sub-stats-right {
    margin-right: 124px;
  }
}

@media (max-width: 480px) {
  #sub-stats-container {
    top: 58px;
    width: 390px;
    height: 165px;
  }

  .sub-stats-left {
    margin-left: 108px;
  }

  .sub-stats-right {
    margin-right: 112px;
  }
}

/* =========================================================
   AJUSTE FINAL — ESTOLA EQUIPADA EN CARD REAL
   ========================================================= */

/* Evita que una card con Estola agrande las demás cards de la fila */
#inventory,
#arenaTeam {
  align-items: flex-start !important;
}

#inventory .item,
#arenaTeam .item,
#arenaTeam .fighter {
  align-self: flex-start !important;
}

/* Card con estola */
.item.shield-equipped.stola-equipped,
.fighter.shield-equipped.stola-equipped {
  margin-top: 78px !important;
  overflow: visible !important;
}

/* Estola encima del marco */
.item.shield-equipped.stola-equipped .stola-display,
.fighter.shield-equipped.stola-equipped .stola-display {
  position: absolute !important;
  z-index: 45 !important;

  top: -30px !important;
  left: 50% !important;

  width: clamp(360px, 265%, 410px) !important;
  max-width: none !important;

  transform: translateX(-50%) !important;
  pointer-events: none !important;
}

.item.shield-equipped.stola-equipped .stola-display img,
.fighter.shield-equipped.stola-equipped .stola-display img {
  width: 100% !important;
  height: auto !important;
  display: block !important;

  filter:
    drop-shadow(0 0 14px rgba(255, 85, 10, 0.55))
    drop-shadow(0 0 24px rgba(130, 40, 255, 0.35)) !important;
}

/* Mascota centrada arriba de la estola */
.item.shield-equipped.stola-equipped .pet-display,
.fighter.shield-equipped.stola-equipped .pet-display {
  position: absolute !important;
  z-index: 55 !important;

  top: -88px !important;
  left: 50% !important;

  width: 95px !important;
  height: 85px !important;

  transform: translateX(-50%) !important;
}

.item.shield-equipped.stola-equipped .pet-display img,
.fighter.shield-equipped.stola-equipped .pet-display img {
  width: 82px !important;
  height: auto !important;
}

/* Mobile */
@media (max-width: 768px) {
  .item.shield-equipped.stola-equipped,
  .fighter.shield-equipped.stola-equipped {
    margin-top: 76px !important;
  }

  .item.shield-equipped.stola-equipped .stola-display,
  .fighter.shield-equipped.stola-equipped .stola-display {
    top: -30px !important;
    width: clamp(350px, 265%, 400px) !important;
  }

  .item.shield-equipped.stola-equipped .pet-display,
  .fighter.shield-equipped.stola-equipped .pet-display {
    top: -86px !important;
    width: 88px !important;
    height: 78px !important;
  }

  .item.shield-equipped.stola-equipped .pet-display img,
  .fighter.shield-equipped.stola-equipped .pet-display img {
    width: 74px !important;
  }
}

#inventory .item,
#arenaTeam .item,
#arenaTeam .fighter {
  align-self: flex-start !important;
}

/* =========================================================
   FIX DEFINITIVO — ESTOLA SIN MOVER LA CARD
   La Estola flota, la tarjeta no baja.
   ========================================================= */

/* El inventario vuelve a comportarse normal */
#inventory,
#arenaTeam {
  align-items: flex-start !important;
}

/* La card con Estola NO debe moverse hacia abajo */
.item.stola-equipped,
.fighter.stola-equipped,
.item.shield-equipped.stola-equipped,
.fighter.shield-equipped.stola-equipped {
  margin-top: 5px !important;
  overflow: visible !important;
}

/* En mobile, respetamos el margen original móvil */
@media (max-width: 768px) {
  .item.stola-equipped,
  .fighter.stola-equipped,
  .item.shield-equipped.stola-equipped,
  .fighter.shield-equipped.stola-equipped {
    margin-top: 4px !important;
  }
}

/* Estola: visual grande, pero sin afectar tamaño/posición de la card */
.item.shield-equipped.stola-equipped .stola-display,
.fighter.shield-equipped.stola-equipped .stola-display {
  position: absolute !important;
  z-index: 45 !important;

  top: -34px !important;
  left: 50% !important;

  width: clamp(350px, 260%, 400px) !important;
  max-width: none !important;

  transform: translateX(-50%) !important;
  pointer-events: none !important;
}

.item.shield-equipped.stola-equipped .stola-display img,
.fighter.shield-equipped.stola-equipped .stola-display img {
  width: 100% !important;
  height: auto !important;
  display: block !important;

  filter:
    drop-shadow(0 0 14px rgba(255, 85, 10, 0.55))
    drop-shadow(0 0 24px rgba(130, 40, 255, 0.35)) !important;
}

/* Mascota centrada arriba de la Estola */
.item.shield-equipped.stola-equipped .pet-display,
.fighter.shield-equipped.stola-equipped .pet-display {
  position: absolute !important;
  z-index: 55 !important;

  top: -90px !important;
  left: 50% !important;

  width: 88px !important;
  height: 78px !important;

  transform: translateX(-50%) !important;
  pointer-events: none !important;
}

.item.shield-equipped.stola-equipped .pet-display img,
.fighter.shield-equipped.stola-equipped .pet-display img {
  width: 74px !important;
  height: auto !important;
}

/* Mobile fino */
@media (max-width: 768px) {
  .item.shield-equipped.stola-equipped .stola-display,
  .fighter.shield-equipped.stola-equipped .stola-display {
    top: -30px !important;
    width: clamp(330px, 255%, 380px) !important;
  }

  .item.shield-equipped.stola-equipped .pet-display,
  .fighter.shield-equipped.stola-equipped .pet-display {
    top: -84px !important;
    width: 82px !important;
    height: 72px !important;
  }

  .item.shield-equipped.stola-equipped .pet-display img,
  .fighter.shield-equipped.stola-equipped .pet-display img {
    width: 68px !important;
  }
}

/* =========================================================
   FIX FINAL — INVENTARIO NORMAL + ESTOLA FLOTANTE
   ========================================================= */

/* El inventario vuelve a comportarse como antes */
#inventory,
#arenaTeam {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: stretch !important;
}

/* Las tarjetas vuelven a estirarse igual dentro de cada fila */
#inventory .item,
#arenaTeam .item,
#arenaTeam .fighter {
  align-self: stretch !important;
}

/* La Estola NO debe mover la tarjeta */
.item.stola-equipped,
.fighter.stola-equipped,
.item.shield-equipped.stola-equipped,
.fighter.shield-equipped.stola-equipped {
  margin-top: 5px !important;
  overflow: visible !important;
}

/* En mobile vuelve al margen normal que ya usabas */
@media (max-width: 768px) {
  .item.stola-equipped,
  .fighter.stola-equipped,
  .item.shield-equipped.stola-equipped,
  .fighter.shield-equipped.stola-equipped {
    margin-top: 4px !important;
  }
}

/* Estola visual: flota encima del marco sin afectar altura */
.item.shield-equipped.stola-equipped .stola-display,
.fighter.shield-equipped.stola-equipped .stola-display {
  position: absolute !important;
  z-index: 45 !important;

  top: -40px !important;
  left: 50% !important;

  width: clamp(375px, 274%, 425px) !important;
  max-width: none !important;

  transform: translateX(-50%) !important;
  pointer-events: none !important;
}

.item.shield-equipped.stola-equipped .stola-display img,
.fighter.shield-equipped.stola-equipped .stola-display img {
  width: 100% !important;
  height: auto !important;
  display: block !important;

  filter:
    drop-shadow(0 0 14px rgba(255, 85, 10, 0.55))
    drop-shadow(0 0 24px rgba(130, 40, 255, 0.35)) !important;
}

/* Mascota centrada arriba de la Estola */
.item.shield-equipped.stola-equipped .pet-display,
.fighter.shield-equipped.stola-equipped .pet-display {
  position: absolute !important;
  z-index: 55 !important;

  top: -90px !important;
  left: 50% !important;

  width: 88px !important;
  height: 78px !important;

  transform: translateX(-50%) !important;
  pointer-events: none !important;
}

.item.shield-equipped.stola-equipped .pet-display img,
.fighter.shield-equipped.stola-equipped .pet-display img {
  width: 74px !important;
  height: auto !important;
}

/* Ajuste mobile */
@media (max-width: 768px) {
  .item.shield-equipped.stola-equipped .stola-display,
  .fighter.shield-equipped.stola-equipped .stola-display {
    top: -30px !important;
    width: clamp(330px, 255%, 380px) !important;
  }

  .item.shield-equipped.stola-equipped .pet-display,
  .fighter.shield-equipped.stola-equipped .pet-display {
    top: -84px !important;
    width: 82px !important;
    height: 72px !important;
  }

  .item.shield-equipped.stola-equipped .pet-display img,
  .fighter.shield-equipped.stola-equipped .pet-display img {
    width: 68px !important;
  }
}






/* =========================================================
   ESTOLA — BOTÓN PREMIUM MINIMALISTA
   ========================================================= */

.stola-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  margin: 4px auto;
  padding: 5px 10px;

  width: auto;
  min-width: 132px;

  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;

  color: #e9d5ff;

  background:
    linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.10), transparent) !important;

  border: 1px solid rgba(192, 132, 252, 0.34);
  border-radius: 999px;

  box-shadow:
    inset 0 0 8px rgba(168, 85, 247, 0.06),
    0 0 8px rgba(168, 85, 247, 0.12);

  text-shadow:
    0 0 6px rgba(168, 85, 247, 0.35);

  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);

  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    color 0.14s ease,
    background 0.14s ease;
}

.stola-link-btn:hover {
  transform: translateY(-1px);

  color: #fff7ed;

  background:
    linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.16), transparent) !important;

  border-color: rgba(249, 115, 22, 0.52);

  box-shadow:
    inset 0 0 10px rgba(249, 115, 22, 0.08),
    0 0 10px rgba(168, 85, 247, 0.22),
    0 0 16px rgba(249, 115, 22, 0.10);

  text-shadow:
    0 0 7px rgba(249, 115, 22, 0.45),
    0 0 12px rgba(168, 85, 247, 0.25);
}

.stola-link-btn:active {
  transform: translateY(0) scale(0.98);
}

.stola-link-symbol {
  font-size: 0.9rem;
  line-height: 1;
  color: #c084fc;

  text-shadow:
    0 0 6px rgba(192, 132, 252, 0.9),
    0 0 10px rgba(249, 115, 22, 0.24);

  animation: stolaLinkSymbolPulse 2.5s ease-in-out infinite;
}

.stola-link-btn-danger {
  color: #f5d0fe;
  border-color: rgba(244, 114, 182, 0.28);

  background:
    linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.08), transparent) !important;
}

.stola-link-btn-danger:hover {
  color: #ffe4e6;
  border-color: rgba(244, 114, 182, 0.52);

  background:
    linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.14), transparent) !important;

  box-shadow:
    inset 0 0 10px rgba(236, 72, 153, 0.08),
    0 0 10px rgba(168, 85, 247, 0.18),
    0 0 16px rgba(236, 72, 153, 0.10);
}

@keyframes stolaLinkSymbolPulse {
  0%, 100% {
    opacity: 0.68;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}


/* =========================================================
   OCULTAR ARSENAL VINCULADO DE LA UI PRINCIPAL
   Se mantiene arenaTeamIds para Arena/CP, pero no se muestra
   debajo de Doctrinas.
   ========================================================= */

#arenaTeam,
.arena-team-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
/* =========================================================
   ÓRDENES DEL VÍNCULO - NPC Y MODAL DE CLANES
   ========================================================= */
.clan-npc-anchor {
  position: absolute;
  top: clamp(138px, 16vw, 198px);
  right: clamp(14px, 7vw, 160px);
  z-index: 6;
  width: clamp(118px, 15vw, 178px);
  cursor: pointer;
  text-align: center;
  user-select: none;
  filter: drop-shadow(0 0 18px rgba(124, 58, 237, 0.42));
  transition: transform 0.22s ease, filter 0.22s ease;
}

.clan-npc-anchor:hover,
.clan-npc-anchor:focus-visible {
  transform: translateY(-3px) scale(1.03);
  filter: drop-shadow(0 0 24px rgba(34, 211, 238, 0.5)) drop-shadow(0 0 18px rgba(245, 158, 11, 0.25));
  outline: none;
}

.clan-npc-anchor img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
}

.clan-npc-glow {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 82%;
  height: 44%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(124, 58, 237, 0.22) 38%, transparent 72%);
  filter: blur(12px);
  animation: clanNpcPulse 3.4s ease-in-out infinite;
  z-index: 1;
}

@keyframes clanNpcPulse {
  0%, 100% { opacity: 0.58; transform: translateX(-50%) scale(0.96); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.clan-npc-label {
  margin-top: -8px;
  padding: 5px 9px;
  display: inline-block;
  color: #fde68a;
  font-weight: 900;
  font-size: clamp(0.72rem, 1.5vw, 0.88rem);
  letter-spacing: 0.03em;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.55), 0 1px 2px #000;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.78));
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  position: relative;
  z-index: 3;
}

.clan-npc-whisper {
  margin: 6px auto 0;
  max-width: 176px;
  padding: 6px 8px;
  border-radius: 10px;
  color: #c4b5fd;
  font-size: 0.7rem;
  line-height: 1.2;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(124, 58, 237, 0.36);
  box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.08), 0 0 16px rgba(124, 58, 237, 0.15);
  position: relative;
  z-index: 3;
}

.clan-modal.open {
  display: flex;
}

.clan-modal-box {
  width: min(960px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(245, 158, 11, 0.34) !important;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(3, 7, 18, 0.98)) !important;
  box-shadow: 0 0 36px rgba(124, 58, 237, 0.24), inset 0 0 30px rgba(245, 158, 11, 0.05);
}

.clan-modal-box h3 {
  color: #facc15;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.36);
  letter-spacing: 0.05em;
}

.clan-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.55);
  background: rgba(30, 41, 59, 0.85);
  color: #fecaca;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
}

.clan-modal-subtitle,
.clan-muted {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.45;
}

.clan-modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clan-lore-panel,
.clan-card,
.clan-order-hero {
  border: 1px solid rgba(124, 58, 237, 0.38);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.92));
  box-shadow: inset 0 0 18px rgba(59, 130, 246, 0.06), 0 0 18px rgba(124, 58, 237, 0.12);
}

.clan-lore-panel {
  padding: 12px 14px;
  color: #e0e7ff;
}

.clan-lore-panel b {
  color: #fde68a;
}

.clan-foundation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.clan-card {
  padding: 14px;
}

.clan-card h4 {
  margin: 0 0 8px;
  color: #fde68a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clan-cost-row,
.clan-bonus-row,
.clan-stat-grid,
.clan-actions-row,
.clan-quick-row,
.clan-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.clan-cost-row span,
.clan-bonus-row span,
.clan-stat-grid span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  font-size: 0.78rem;
}

.clan-cost-row img,
.clan-resource-display img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.clan-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.45);
  background: rgba(2, 6, 23, 0.82);
  color: #e5e7eb;
  outline: none;
}

.clan-input:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.1);
}

.clan-textarea {
  min-height: 68px;
  resize: vertical;
}

.clan-check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #c4b5fd;
  margin: 10px 0;
  font-size: 0.86rem;
}

.clan-main-btn,
.clan-secondary-btn,
.clan-danger-btn,
.clan-quick-row button,
.clan-member-actions button {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.clan-main-btn {
  color: #1f1300;
  background: linear-gradient(135deg, #facc15, #f97316);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.22);
}

.clan-secondary-btn,
.clan-quick-row button,
.clan-member-actions button {
  color: #dbeafe;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.92), rgba(91, 33, 182, 0.92));
  border: 1px solid rgba(147, 197, 253, 0.28);
}

.clan-danger-btn,
.clan-member-actions button.danger {
  color: #fee2e2;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.94), rgba(76, 29, 149, 0.86));
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.clan-main-btn:hover,
.clan-secondary-btn:hover,
.clan-danger-btn:hover,
.clan-quick-row button:hover,
.clan-member-actions button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.clan-main-btn:disabled,
.clan-secondary-btn:disabled,
.clan-danger-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.clan-main-btn.mini,
.clan-secondary-btn.mini,
.clan-danger-btn.mini {
  padding: 6px 8px;
  font-size: 0.76rem;
}

.clan-order-hero {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.clan-emblem {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-weight: 950;
  color: #fde68a;
  letter-spacing: 0.08em;
  background:
    radial-gradient(circle, rgba(250, 204, 21, 0.22), transparent 60%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(76, 29, 149, 0.85));
  border: 1px solid rgba(250, 204, 21, 0.4);
  box-shadow: inset 0 0 16px rgba(250, 204, 21, 0.08), 0 0 18px rgba(124, 58, 237, 0.22);
}

.clan-order-kicker {
  color: #22d3ee;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  font-weight: 900;
}

.clan-order-main h3 {
  margin: 4px 0;
  color: #f8fafc;
}

.clan-order-main h3 span {
  color: #facc15;
  font-size: 0.78em;
}

.clan-order-main p {
  margin: 0 0 8px;
  color: #c4b5fd;
}

.clan-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #cbd5e1;
  font-size: 0.8rem;
  margin-top: 10px;
}

.clan-progress {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.clan-progress.small {
  height: 9px;
}

.clan-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #22d3ee, #facc15);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}

.clan-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.clan-tabs button {
  flex: 1 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
  font-weight: 800;
  cursor: pointer;
}

.clan-tabs button.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(14, 165, 233, 0.8));
  color: #fff;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.25);
}

.clan-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #fde68a;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.clan-section-title span {
  color: #94a3b8;
  font-size: 0.76rem;
  text-transform: none;
}

.clan-mission-grid,
.clan-list-mini {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.clan-mission-card,
.clan-member-row,
.clan-request-row,
.clan-search-result,
.clan-ranking-row,
.clan-resource-display {
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.clan-mission-card.completed {
  border-color: rgba(34, 197, 94, 0.36);
  box-shadow: inset 0 0 12px rgba(34, 197, 94, 0.06);
}

.clan-mission-head,
.clan-member-row,
.clan-request-row,
.clan-search-result,
.clan-ranking-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.clan-mission-head b,
.clan-member-row b,
.clan-search-result b,
.clan-ranking-row span {
  color: #e5e7eb;
}

.clan-mission-head span,
.clan-reward-line,
.clan-search-result small,
.clan-ranking-row small,
.clan-member-row small,
.clan-request-row small {
  display: block;
  color: #94a3b8;
  font-size: 0.78rem;
}

.clan-mission-card p {
  margin: 6px 0;
  color: #a5b4fc;
  font-size: 0.82rem;
}

.clan-reward-line {
  margin: 7px 0;
  color: #fde68a;
}

.clan-member-row strong,
.clan-ranking-row strong {
  color: #facc15;
}

.clan-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.role-master { color: #facc15 !important; }
.role-keeper { color: #38bdf8 !important; }
.role-link { color: #c4b5fd !important; }

.clan-empty-note,
.clan-loading {
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.62);
  color: #94a3b8;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.2);
}

.ranking-clan-tag,
.battle-clan-tag,
.clan-inline-tag {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72em;
  color: #fde68a;
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(250, 204, 21, 0.28);
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.22);
  vertical-align: middle;
}

.battle-clan-tag {
  font-size: 0.62em;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .clan-npc-anchor {
    position: relative;
    top: auto;
    right: auto;
    margin: 10px auto 4px;
    width: min(42vw, 150px);
  }

  .clan-npc-whisper {
    display: none;
  }

  .clan-foundation-grid {
    grid-template-columns: 1fr;
  }

  .clan-order-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .clan-emblem {
    margin: 0 auto;
  }

  .clan-stat-grid,
  .clan-bonus-row,
  .clan-actions-row {
    justify-content: center;
  }
}



/* =========================================================
   FIX MODAL CLANES — CENTRADO Y OCULTO POR DEFECTO
   ========================================================= */

#clanModal,
.clan-modal {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 1300 !important;

  justify-content: center !important;
  align-items: center !important;

  padding: 16px !important;
  box-sizing: border-box !important;

  background:
    radial-gradient(circle at center, rgba(124, 58, 237, 0.28), transparent 44%),
    rgba(2, 6, 23, 0.90) !important;

  backdrop-filter: blur(5px) !important;
}

#clanModal.open,
.clan-modal.open {
  display: flex !important;
}

#clanModal .clan-modal-box,
.clan-modal .clan-modal-box {
  width: min(960px, 94vw) !important;
  max-height: calc(100vh - 32px) !important;
  overflow-y: auto !important;
  margin: 0 auto !important;
}

/* Evita que algún estilo global lo trate como bloque normal */
#clanModal:not(.open),
.clan-modal:not(.open) {
  display: none !important;
}

/* =========================================================
   FILTRO DEL ARSENAL DEL VÍNCULO — MVP
   ========================================================= */

.arsenal-filter-bar {
  width: min(94vw, 760px);
  margin: 8px auto 8px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  border-radius: 16px;
  position: relative;
  overflow: hidden;

  border: 1px solid rgba(34, 211, 238, 0.24);
  background:
    radial-gradient(circle at left, rgba(34, 211, 238, 0.14), transparent 38%),
    radial-gradient(circle at right, rgba(168, 85, 247, 0.14), transparent 40%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.90));

  box-shadow:
    0 0 16px rgba(34, 211, 238, 0.10),
    inset 0 0 14px rgba(168, 85, 247, 0.07);
}

.arsenal-filter-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.12), transparent);
  animation: globalMessageSweep 4.2s linear infinite;
}

.arsenal-filter-btn {
  position: relative;
  z-index: 1;
  min-width: 112px;
  padding: 7px 10px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.90), rgba(15, 23, 42, 0.92));
  color: #cbd5e1;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 6px 14px rgba(0,0,0,0.24);
}

.arsenal-filter-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 18px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(2, 6, 23, 0.60);
  border: 1px solid rgba(34, 211, 238, 0.20);
  font-family: Arial, sans-serif;
  font-size: 0.66rem;
  line-height: 1;
}

.arsenal-filter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.45);
  filter: brightness(1.07);
}

.arsenal-filter-btn.active {
  color: #fff7ed;
  border-color: rgba(250, 204, 21, 0.42);
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.20), transparent 52%),
    linear-gradient(180deg, rgba(124, 58, 237, 0.88), rgba(76, 29, 149, 0.94));
  box-shadow:
    0 0 15px rgba(168, 85, 247, 0.26),
    0 0 22px rgba(34, 211, 238, 0.10),
    inset 0 0 13px rgba(250, 204, 21, 0.07);
}

.arsenal-filter-btn.active span {
  color: #fef3c7;
  border-color: rgba(250, 204, 21, 0.34);
  background: rgba(15, 23, 42, 0.72);
}

.arsenal-filter-hint {
  width: min(94vw, 760px);
  margin: -2px auto 10px;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.arsenal-empty-state {
  width: min(94vw, 620px);
  margin: 8px auto 16px;
  padding: 16px 14px;
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.09), transparent 54%),
    rgba(15, 23, 42, 0.76);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.arsenal-empty-state b {
  color: #e2e8f0;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.4px;
}

.arsenal-empty-state span {
  font-size: 0.86rem;
  line-height: 1.45;
}

#inventory.arsenal-pet-grid {
  align-items: flex-start;
}

.arsenal-pet-card {
  min-height: 210px;
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 54%),
    rgba(15, 23, 42, 0.88) !important;
}

.legacy-pet-inventory-hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .arsenal-filter-bar {
    width: min(96vw, 430px);
    gap: 5px;
    padding: 7px;
    margin-top: 6px;
  }

  .arsenal-filter-btn {
    min-width: calc(50% - 4px);
    flex: 1 1 calc(50% - 4px);
    padding: 7px 6px;
    font-size: 0.64rem;
  }

  .arsenal-filter-btn span {
    min-width: 17px;
    height: 17px;
    font-size: 0.62rem;
    margin-left: 3px;
  }

  .arsenal-filter-hint {
    width: min(94vw, 420px);
    font-size: 0.66rem;
    margin-bottom: 8px;
  }

  .arsenal-empty-state {
    width: min(94vw, 420px);
    padding: 13px 12px;
  }
}

/* =========================================================
   AJUSTE POSICIÓN NPC CLANES — CUSTODIO DE JURAMENTOS
   Mantiene el modal intacto y solo mueve el NPC.
   ========================================================= */

.clan-npc-anchor {
   top: clamp(80px, 7vw, 125px) !important;
  right: clamp(18px, 7vw, 160px) !important;
  width: clamp(118px, 14vw, 172px) !important;
}

@media (max-width: 1200px) {
  .clan-npc-anchor {
    top: clamp(100px, 11vw, 140px) !important;
    right: clamp(10px, 4vw, 70px) !important;
    width: clamp(108px, 14vw, 155px) !important;
  }
}

@media (max-width: 900px) {
  .clan-npc-anchor {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: min(40vw, 142px) !important;
    margin: -4px auto 2px !important;
    transform: translateY(-8px) !important;
  }

  .clan-npc-anchor:hover,
  .clan-npc-anchor:focus-visible {
    transform: translateY(-12px) scale(1.03) !important;
  }
}

@media (max-width: 480px) {
  .clan-npc-anchor {
    width: min(38vw, 132px) !important;
    margin: 0 auto 4px !important;
    transform: translateY(-5px) !important;
  }

  .clan-npc-anchor:hover,
  .clan-npc-anchor:focus-visible {
    transform: translateY(-8px) scale(1.03) !important;
  }
}


/* =========================================================
   MONOLITO GLOBAL — MARCO TRANSPARENTE
   assets/banner.png
   ========================================================= */

.monolith-banner {
  width: min(94vw, 820px) !important;
  min-height: 104px !important;
  padding: 20px 24px !important;

  position: relative !important;
  overflow: visible !important;

  border: none !important;
  border-radius: 18px !important;

  background:
    radial-gradient(circle at left, rgba(168, 85, 247, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.54)) !important;

  box-shadow:
    0 0 20px rgba(168, 85, 247, 0.22),
    0 0 30px rgba(34, 211, 238, 0.10),
    inset 0 0 24px rgba(2, 6, 23, 0.50) !important;
}

/* Marco PNG transparente encima */
.monolith-banner::after {
  content: "";
  position: absolute;
  inset: -10px -14px;
  z-index: 0;
  pointer-events: none;

  background: url("assets/banner.png") center / 100% 100% no-repeat;
}

/* Mantiene el barrido de luz del banner actual */
.monolith-banner::before {
  z-index: 1 !important;
}

/* Contenido por encima del marco/fondo */
.monolith-banner-left,
.monolith-banner-right {
  position: relative !important;
  z-index: 2 !important;
}

.monolith-banner-title,
.monolith-banner-kicker,
.monolith-banner-subtitle,
.monolith-banner-right {
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.95),
    0 0 8px rgba(168, 85, 247, 0.28) !important;
}

/* Mobile */
@media (max-width: 680px) {
  .monolith-banner {
    width: min(94vw, 420px) !important;
    min-height: 126px !important;
    padding: 18px 18px !important;
  }

  .monolith-banner::after {
    inset: -8px -10px;
  }
}

/* =========================================================
   AJUSTE FINAL — MONOLITO CON MARCO TRANSPARENTE LIMPIO
   assets/banner.png
   ========================================================= */

.monolith-banner {
  width: min(94vw, 820px) !important;
  min-height: 96px !important;
  padding: 18px 24px !important;

  position: relative !important;
  overflow: visible !important;

  border: none !important;
  border-radius: 18px !important;

  /* Fondo interno oscuro, SIN azul fuerte */
  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.42) 0%,
      rgba(2, 6, 23, 0.30) 45%,
      rgba(2, 6, 23, 0.42) 100%
    ) !important;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.42),
    inset 0 0 22px rgba(0, 0, 0, 0.38) !important;
}

/* Quita el barrido/brillo azul viejo */
.monolith-banner::before {
  display: none !important;
  content: none !important;
}

/* Marco PNG transparente */
.monolith-banner::after {
  content: "";
  position: absolute;
  inset: -10px -16px;
  z-index: 1;
  pointer-events: none;

  background: url("assets/banner.png") center / 100% 100% no-repeat;
}

/* Contenido arriba del marco */
.monolith-banner-left,
.monolith-banner-right {
  position: relative !important;
  z-index: 2 !important;
}

/* Evita que los estados viejos metan colores raros */
.monolith-banner.destroyed,
.monolith-banner.critical,
.monolith-banner.wounded,
.monolith-banner.collapse {
  border: none !important;
  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.42) 0%,
      rgba(2, 6, 23, 0.30) 45%,
      rgba(2, 6, 23, 0.42) 100%
    ) !important;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.42),
    inset 0 0 22px rgba(0, 0, 0, 0.38) !important;
  animation: none !important;
}

/* Texto más limpio */
.monolith-banner-title {
  color: #f8fafc !important;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.95),
    0 0 8px rgba(168, 85, 247, 0.20) !important;
}

.monolith-banner-kicker {
  color: #67e8f9 !important;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.95),
    0 0 6px rgba(34, 211, 238, 0.45) !important;
}

.monolith-banner-subtitle,
.monolith-banner-right {
  color: #cbd5e1 !important;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.95) !important;
}

/* Botón VER RITO */
.monolith-banner-right button {
  background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%) !important;
  border: 1px solid rgba(216, 180, 254, 0.55) !important;
  box-shadow:
    0 0 10px rgba(168, 85, 247, 0.28),
    0 6px 14px rgba(0, 0, 0, 0.38) !important;
}

/* Mobile */
@media (max-width: 680px) {
  .monolith-banner {
    width: min(94vw, 420px) !important;
    min-height: 118px !important;
    padding: 16px 16px !important;
  }

  .monolith-banner::after {
    inset: -8px -10px;
  }
}

/* =========================================================
   AJUSTE FINAL BANNER MONOLITO — FONDO DENTRO DEL MARCO
   ========================================================= */

/* El contenedor ya no pinta fondo rectangular grande */
.monolith-banner {
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* Fondo translúcido interno, ajustado al interior del marco */
.monolith-banner::before {
  display: block !important;
  content: "" !important;
  position: absolute !important;

  /* Achica el fondo para que no sobresalga del marco */
  inset: 13px 24px !important;

  z-index: 0 !important;
  pointer-events: none !important;
  border-radius: 12px !important;

  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.50) 0%,
      rgba(2, 6, 23, 0.34) 45%,
      rgba(2, 6, 23, 0.50) 100%
    ) !important;

  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.48),
    0 0 14px rgba(0, 0, 0, 0.20) !important;

  animation: none !important;
}

/* Marco transparente */
.monolith-banner::after {
  content: "" !important;
  position: absolute !important;
  inset: -10px -16px !important;
  z-index: 1 !important;
  pointer-events: none !important;

  background: url("assets/banner.png") center / 100% 100% no-repeat !important;
}

/* Contenido arriba del fondo y del marco */
.monolith-banner-left,
.monolith-banner-right {
  position: relative !important;
  z-index: 2 !important;
}

/* Subir un poco solo el botón Ver Rito */
.monolith-banner-right button {
  transform: translateY(-13px) !important;
}

/* Si el hover de botones lo pisa, mantenemos la subida */
.monolith-banner-right button:hover {
  transform: translateY(-6px) !important;
}

/* Mobile */
@media (max-width: 680px) {
  .monolith-banner::before {
    inset: 12px 18px !important;
    border-radius: 11px !important;
  }

  .monolith-banner::after {
    inset: -8px -10px !important;
  }

  .monolith-banner-right button {
    transform: translateY(-3px) !important;
  }

  .monolith-banner-right button:hover {
    transform: translateY(-4px) !important;
  }
}

/* =========================================================
   FIX DEFINITIVO — BANNER MONOLITO SOLO MARCO + FONDO INTERNO
   Borra sombras/fondos viejos de estados y hover
   ========================================================= */

.monolith-banner,
.monolith-banner:hover,
.monolith-banner.wounded,
.monolith-banner.critical,
.monolith-banner.destroyed,
.monolith-banner.collapse,
.monolith-banner.wounded:hover,
.monolith-banner.critical:hover,
.monolith-banner.destroyed:hover,
.monolith-banner.collapse:hover {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  animation: none !important;
  overflow: visible !important;
}

/* Fondo interno único, achicado dentro del marco */
.monolith-banner::before,
.monolith-banner:hover::before,
.monolith-banner.wounded::before,
.monolith-banner.critical::before,
.monolith-banner.destroyed::before,
.monolith-banner.collapse::before {
  display: block !important;
  content: "" !important;
  position: absolute !important;

  /* Ajustá esto si querés más/menos fondo */
  inset: 17px 8px !important;

  z-index: 0 !important;
  pointer-events: none !important;
  border-radius: 10px !important;

  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.32) 0%,
      rgba(2, 6, 23, 0.22) 45%,
      rgba(2, 6, 23, 0.32) 100%
    ) !important;

  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.36) !important;

  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* Marco PNG transparente */
.monolith-banner::after,
.monolith-banner:hover::after,
.monolith-banner.wounded::after,
.monolith-banner.critical::after,
.monolith-banner.destroyed::after,
.monolith-banner.collapse::after {
  content: "" !important;
  position: absolute !important;
  inset: -10px -1px !important;
  z-index: 1 !important;
  pointer-events: none !important;

  background: url("assets/banner.png") center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Contenido siempre arriba */
.monolith-banner-left,
.monolith-banner-right,
.monolith-banner-icon,
.monolith-banner-title,
.monolith-banner-kicker,
.monolith-banner-subtitle,
.monolith-mini-hp {
  position: relative !important;
  z-index: 2 !important;
}

/* Botón Ver Rito un poco más arriba */
.monolith-banner-right button {
  transform: translateY(-13px) !important;
  position: relative !important;
  z-index: 3 !important;
}

.monolith-banner-right button:hover {
  transform: translateY(-14px) !important;
}

/* Mobile */
@media (max-width: 680px) {
  .monolith-banner::before,
  .monolith-banner:hover::before,
  .monolith-banner.wounded::before,
  .monolith-banner.critical::before,
  .monolith-banner.destroyed::before,
  .monolith-banner.collapse::before {
    inset: 16px 24px !important;
    border-radius: 9px !important;
  }

  .monolith-banner::after,
  .monolith-banner:hover::after,
  .monolith-banner.wounded::after,
  .monolith-banner.critical::after,
  .monolith-banner.destroyed::after,
  .monolith-banner.collapse::after {
    inset: -8px -10px !important;
  }

  .monolith-banner-right button {
    transform: translateY(-6px) !important;
  }

  .monolith-banner-right button:hover {
    transform: translateY(-7px) !important;
  }
}


/* =========================================================
   AJUSTE MOBILE FINAL — NPCS SOBRE LA LÍNEA DEL ARSENAL
   Hilandera baja menos, Custodio baja más.
   ========================================================= */

@media (max-width: 900px) {
  /* Hilandera del Éter */
  .stola-npc-anchor {
    margin: 20px auto 10px !important;
    transform: translateY(38px) !important;
  }

  .stola-npc-anchor:hover,
  .stola-npc-anchor:focus-visible {
    transform: translateY(34px) scale(1.03) !important;
  }

  /* Custodio de Juramentos */
  .clan-npc-anchor {
    margin: 24px auto 8px !important;
    transform: translateY(58px) !important;
  }

  .clan-npc-anchor:hover,
  .clan-npc-anchor:focus-visible {
    transform: translateY(54px) scale(1.03) !important;
  }
}

@media (max-width: 480px) {
  /* Celular chico */
  .stola-npc-anchor {
    margin: 16px auto 8px !important;
    transform: translateY(36px) !important;
  }

  .stola-npc-anchor:hover,
  .stola-npc-anchor:focus-visible {
    transform: translateY(32px) scale(1.03) !important;
  }

  .clan-npc-anchor {
    margin: 20px auto 6px !important;
    transform: translateY(62px) !important;
  }

  .clan-npc-anchor:hover,
  .clan-npc-anchor:focus-visible {
    transform: translateY(58px) scale(1.03) !important;
  }
}

/* =========================================================
   FIX MOBILE REAL — NPCS SOBRE LA LÍNEA GRIS DEL ARSENAL
   Usa posición absoluta porque en tu celu no está tomando bien
   el bloque relative/translateY.
   ========================================================= */

@media (hover: none) and (pointer: coarse) {
  .stola-npc-anchor {
    position: absolute !important;
    left: 4vw !important;
    right: auto !important;
    top: 305px !important;
    width: 126px !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 40 !important;
  }

  .stola-npc-anchor:hover,
  .stola-npc-anchor:focus-visible {
    transform: scale(1.03) !important;
  }

  .stola-npc-anchor img {
    width: 112px !important;
    height: 136px !important;
  }

  .stola-npc-label {
    font-size: 0.62rem !important;
    padding: 3px 7px !important;
  }

  .stola-npc-whisper {
    width: 150px !important;
    max-width: 150px !important;
    font-size: 0.58rem !important;
    padding: 6px 7px !important;
  }

  .clan-npc-anchor {
    position: absolute !important;
    right: 4vw !important;
    left: auto !important;
    top: 305px !important;
    width: 126px !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 40 !important;
  }

  .clan-npc-anchor:hover,
  .clan-npc-anchor:focus-visible {
    transform: scale(1.03) !important;
  }

  .clan-npc-anchor img {
    width: 112px !important;
    height: auto !important;
  }

  .clan-npc-label {
    font-size: 0.62rem !important;
    padding: 3px 7px !important;
  }

  .clan-npc-whisper {
    width: 150px !important;
    max-width: 150px !important;
    font-size: 0.58rem !important;
    padding: 6px 7px !important;
  }
}

/* =========================================================
   ARTEFACTOS DEL VÍNCULO + RUNA DE REFORJA INESTABLE
   ========================================================= */
#inventory.artifact-grid,
#inventory[data-inventory-filter="artifacts"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.artifact-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 10px;
  min-height: 150px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.12), transparent 34%),
    radial-gradient(circle at 80% 15%, rgba(168, 85, 247, 0.13), transparent 40%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.95));
  box-shadow: inset 0 0 18px rgba(34, 211, 238, 0.04), 0 10px 24px rgba(0, 0, 0, 0.28);
  text-align: left;
}

.artifact-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, transparent, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.13), transparent);
  opacity: 0.55;
  pointer-events: none;
}

.artifact-card.raro { border-color: rgba(59, 130, 246, 0.45); }
.artifact-card.epico { border-color: rgba(168, 85, 247, 0.55); box-shadow: 0 0 16px rgba(168, 85, 247, 0.16), inset 0 0 18px rgba(34, 211, 238, 0.05); }
.artifact-card.legendario { border-color: rgba(245, 158, 11, 0.6); box-shadow: 0 0 18px rgba(245, 158, 11, 0.18), inset 0 0 22px rgba(168, 85, 247, 0.06); }

.artifact-icon-wrap {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 0 18px rgba(34, 211, 238, 0.07);
}

.artifact-icon-wrap img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.55));
}

.artifact-qty {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 30px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #f8fafc;
  background: linear-gradient(135deg, #7c3aed, #0891b2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.artifact-info {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.artifact-info b {
  display: block;
  color: #f8fafc;
  font-size: 0.95rem;
  line-height: 1.15;
  margin-bottom: 3px;
}

.artifact-kind,
.artifact-progress-label {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  margin-bottom: 5px;
}

.artifact-info p {
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0;
}

.artifact-progress {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 3px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.artifact-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #a855f7, #f97316);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.45);
}

.artifact-action-btn {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
  background: linear-gradient(135deg, #7c3aed, #0e7490);
}

.artifact-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.reforge-modal-box {
  width: min(94vw, 760px);
  max-width: 760px;
}

.reforge-modal-text {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-top: 0;
}

.reforge-weapon-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
  margin: 10px 0;
}

.reforge-weapon-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(100, 116, 139, 0.55);
  background:
    radial-gradient(circle at left, rgba(168, 85, 247, 0.1), transparent 36%),
    rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
}

.reforge-weapon-option:hover,
.reforge-weapon-option.selected {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.16);
  transform: translateY(-1px);
}

.reforge-weapon-option img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.38));
}

.reforge-weapon-option b {
  display: block;
  color: #f8fafc;
  margin-bottom: 2px;
}

.reforge-weapon-option small,
.reforge-cruelty {
  display: block;
  color: #cbd5e1;
  font-size: 0.73rem;
  line-height: 1.35;
}

.reforge-cruelty.positive { color: #fca5a5; }
.reforge-cruelty.negative { color: #93c5fd; }
.reforge-cruelty.neutral { color: #94a3b8; }

.reforge-preview {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(168, 85, 247, 0.25);
  text-align: left;
}

.reforge-warning {
  color: #fde68a;
  font-size: 0.83rem;
  line-height: 1.45;
  margin-bottom: 10px;
}

.reforge-before-after {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.reforge-before-after > div {
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.13);
}

.reforge-before-after b {
  display: block;
  color: #f8fafc;
  margin-bottom: 6px;
}

.reforge-before-after span {
  display: inline-block;
  margin: 2px 4px 2px 0;
  color: #a3e635;
  font-size: 0.78rem;
}

.reforge-after span {
  color: #67e8f9;
}

.reforge-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.reforge-empty {
  padding: 18px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 620px) {
  #inventory.artifact-grid,
  #inventory[data-inventory-filter="artifacts"] {
    grid-template-columns: 1fr;
  }

  .artifact-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .artifact-icon-wrap {
    width: 62px;
    height: 62px;
  }

  .artifact-icon-wrap img {
    width: 54px;
    height: 54px;
  }
}


/* ====================== PARÁSITO DE ÉTER ====================== */
.ether-parasite-mount {
  width: 100%;
  max-width: 1500px;
  margin: 7px auto 10px;
  min-height: clamp(24px, 5.2vw, 78px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.ether-divider-idle {
  position: relative;
  width: min(96vw, 1500px);
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(51, 65, 85, 0.88), transparent);
  box-shadow:
    0 0 8px rgba(56, 189, 248, 0.14),
    0 0 14px rgba(168, 85, 247, 0.10);
}

.ether-divider-idle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.45), rgba(34, 211, 238, 0.18), transparent);
  opacity: 0.22;
  animation: etherIdleSweep 6.2s infinite ease-in-out;
}

.ether-divider-idle::after {
  content: "";
  position: absolute;
  inset: 3px 9%;
  border-radius: inherit;
  background:
    radial-gradient(circle at 32% 50%, rgba(34, 211, 238, 0.24), transparent 20%),
    radial-gradient(circle at 68% 50%, rgba(168, 85, 247, 0.22), transparent 24%);
  opacity: 0.28;
  animation: etherIdleBreath 4.6s infinite ease-in-out;
}

@keyframes etherIdleSweep {
  0% { transform: translateX(-72%); opacity: 0; }
  45% { opacity: 0.25; }
  100% { transform: translateX(72%); opacity: 0; }
}

@keyframes etherIdleBreath {
  0%, 100% { opacity: 0.18; filter: blur(0); }
  50% { opacity: 0.42; filter: blur(1px); }
}

.ether-parasite-banner {
  position: relative;
  display: block;
  width: min(96vw, 1450px);
  height: clamp(46px, 5.4vw, 82px);
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 0 13px rgba(168, 85, 247, 0.22));
  transition: transform .18s ease, filter .18s ease;
}

.ether-parasite-banner:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.36));
}

.ether-parasite-banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.ether-parasite-banner-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 22%;
  text-align: center;
  pointer-events: none;
  text-shadow:
    0 2px 4px #020617,
    0 0 10px rgba(168, 85, 247, 0.65),
    0 0 18px rgba(34, 211, 238, 0.18);
}

.ether-parasite-banner-text strong {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.74rem, 1.45vw, 1.32rem);
  line-height: 1.05;
  letter-spacing: .065em;
  color: #f8f2ff;
  text-transform: uppercase;
}

.ether-parasite-banner-text span {
  margin-top: 2px;
  font-size: clamp(0.56rem, 1.02vw, .92rem);
  color: #a5f3fc;
  font-weight: 700;
}

.ether-parasite-banner.phase-5 {
  animation: parasiteCriticalPulse 1.25s infinite ease-in-out;
}

@keyframes parasiteCriticalPulse {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.32));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(236, 72, 153, 0.55));
    transform: scale(1.006);
  }
}

.ether-parasite-modal-box {
  width: min(94vw, 560px);
  max-width: 560px;
  border-color: rgba(168, 85, 247, 0.72);
}

.ether-parasite-modal-phase {
  position: relative;
  min-height: 64px;
  border: 1px solid rgba(168, 85, 247, 0.34);
  border-radius: 14px;
  overflow: hidden;
  margin: 12px 0;
  background: rgba(2, 6, 23, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ether-parasite-modal-phase img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.08);
}

.ether-parasite-modal-phase > div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-shadow: 0 2px 4px #000, 0 0 10px rgba(168,85,247,.65);
}

.ether-parasite-modal-phase b {
  font-family: 'Cinzel', serif;
  color: #f5f3ff;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ether-parasite-modal-phase span {
  color: #a5f3fc;
  font-weight: 800;
}

.ether-parasite-meter-wrap {
  margin: 14px 0;
}

.ether-parasite-meter-top {
  display: flex;
  justify-content: space-between;
  color: #c4b5fd;
  font-size: .86rem;
  margin-bottom: 6px;
}

.ether-parasite-meter-top b { color: #f8fafc; }

.ether-parasite-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(71, 85, 105, .72);
}

.ether-parasite-meter > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #22d3ee);
  box-shadow: 0 0 12px rgba(168,85,247,.56);
  transition: width .35s ease;
}

.ether-parasite-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.ether-parasite-info-grid > div,
.ether-parasite-lore-box,
.ether-parasite-loot-box,
.ether-parasite-empty-modal,
.ether-parasite-claim-result {
  border: 1px solid rgba(71, 85, 105, .6);
  border-radius: 12px;
  background: rgba(2, 6, 23, .42);
  padding: 10px;
}

.ether-parasite-info-grid span,
.ether-parasite-loot-box span {
  display: block;
  color: #94a3b8;
  font-size: .78rem;
}

.ether-parasite-info-grid b,
.ether-parasite-loot-box b {
  color: #f8fafc;
}

.ether-parasite-lore-box {
  color: #c4b5fd;
  font-size: .88rem;
  line-height: 1.42;
}

.ether-parasite-loot-box span,
.ether-parasite-claim-result {
  margin-top: 5px;
  color: #a7f3d0;
  font-weight: 800;
}

.ether-parasite-modal-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

#claimEtherParasiteBtn {
  background: linear-gradient(135deg, #7c3aed, #a855f7, #0891b2);
  color: #fff;
  font-weight: 900;
}

#claimEtherParasiteBtn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .ether-parasite-mount {
    margin: 4px auto 7px;
    min-height: 42px;
  }

  .ether-parasite-banner {
    width: 100%;
    height: 48px;
  }

  .ether-parasite-banner-text {
    padding: 0 20%;
  }

  .ether-parasite-banner-text strong {
    font-size: .64rem;
    letter-spacing: .035em;
  }

  .ether-parasite-banner-text span {
    font-size: .52rem;
  }

  .ether-divider-idle {
    height: 8px;
  }

  .ether-parasite-info-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ALTAR DE LAS ALMAS DESCARTADAS
   ========================================================= */
.alter-hidden-fix { display:none; }

.altaR-note { color: inherit; }

.altar-entry-card {
  width: min(94vw, 760px);
  min-height: 126px;
  margin: 8px auto 14px;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-basis: 100%;
  cursor: pointer;
  border: 1px solid rgba(168, 85, 247, 0.42);
  background:
    radial-gradient(circle at 25% 20%, rgba(34, 211, 238, 0.18), transparent 38%),
    radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.20), transparent 45%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.94));
  box-shadow:
    0 0 24px rgba(168, 85, 247, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.35),
    inset 0 0 18px rgba(34, 211, 238, 0.06);
}

.altar-entry-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.14), transparent);
  animation: globalMessageSweep 4.8s linear infinite;
}

.altar-entry-card:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.58);
  filter: brightness(1.06);
}

.altar-entry-glow {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  left: 7%;
  top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.28), transparent 66%);
  filter: blur(6px);
  pointer-events: none;
}

.altar-entry-img {
  width: 118px;
  height: 112px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 0 13px rgba(168, 85, 247, 0.55))
    drop-shadow(0 0 18px rgba(34, 211, 238, 0.18));
}

.altar-entry-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  min-width: 0;
}

.altar-entry-kicker {
  color: #67e8f9;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Cinzel', serif;
  font-weight: 900;
}

.altar-entry-copy b {
  color: #f8fafc;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.98rem, 3.8vw, 1.28rem);
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.42);
}

.altar-entry-copy small {
  color: #cbd5e1;
  font-size: 0.82rem;
}

.altar-entry-shards {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(2, 6, 23, 0.54);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 0.78rem;
  font-weight: 700;
}

.altar-entry-shards img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.altar-modal-box {
  max-width: 780px !important;
  width: min(94vw, 780px);
  position: relative;
}

.altar-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
}

.altar-modal-subtitle {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.45;
  margin: -4px auto 12px;
  max-width: 660px;
}

.altar-modal-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.altar-modal-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(168, 85, 247, 0.25);
  background:
    radial-gradient(circle at left, rgba(168, 85, 247, 0.15), transparent 48%),
    rgba(2, 6, 23, 0.42);
  text-align: left;
}

.altar-modal-hero img {
  width: 102px;
  height: 98px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.55));
  flex-shrink: 0;
}

.altar-modal-hero span {
  display: block;
  color: #e9d5ff;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.altar-modal-hero p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.45;
}

.altar-resource-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.26);
  color: #e0f2fe;
  box-shadow: inset 0 0 12px rgba(34, 211, 238, 0.07);
}

.altar-resource-pill img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.altar-resource-pill b {
  color: #fef3c7;
}

.altar-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.altar-tabs button {
  min-width: 150px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  background: rgba(15, 23, 42, 0.88);
  color: #cbd5e1;
  font-family: 'Cinzel', serif;
  font-weight: 900;
}

.altar-tabs button.active {
  color: #fff7ed;
  border-color: rgba(250, 204, 21, 0.42);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.95), rgba(76, 29, 149, 0.95));
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.26);
}

.altar-tab-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.altar-warning,
.altar-empty,
.altar-cost-missing {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.70);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 0.84rem;
  line-height: 1.45;
}

.altar-cost-missing {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.28);
}

.altar-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
  color: #cbd5e1;
}

.altar-summary-row b {
  color: #fef3c7;
}

.altar-weapon-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding: 2px;
}

.altar-weapon-option {
  width: 100%;
  margin: 0;
  padding: 9px;
  min-height: 76px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.82));
}

.altar-weapon-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.40);
}

.altar-weapon-option.selected {
  border-color: rgba(250, 204, 21, 0.62);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.12), inset 0 0 12px rgba(168, 85, 247, 0.12);
}

.altar-weapon-option.disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.altar-weapon-option img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 3px;
}

.altar-weapon-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.altar-weapon-info b {
  color: #e2e8f0;
  font-size: 0.86rem;
}

.altar-weapon-info small {
  color: #93c5fd;
  font-size: 0.78rem;
}

.altar-weapon-bonuses {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.altar-bonus-title {
  width: 100%;
  color: #c084fc;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.altar-bonus-chip,
.altar-bonus-empty {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.68rem;
  line-height: 1.15;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.altar-bonus-chip {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.10);
}

.altar-bonus-empty {
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.62);
}

.altar-bonus-chip.cruelty.positive {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.22);
}

.altar-bonus-chip.cruelty.negative {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(96, 165, 250, 0.22);
}

.altar-weapon-info em {
  color: #fca5a5;
  font-style: normal;
  font-size: 0.72rem;
  line-height: 1.25;
}

.altar-ascend-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.altar-ascend-preview div {
  padding: 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.50);
  border: 1px solid rgba(34, 211, 238, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.altar-ascend-preview span {
  color: #94a3b8;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.altar-ascend-preview b {
  color: #fef3c7;
  font-size: 0.88rem;
}

.altar-main-action {
  width: min(100%, 420px);
  margin: 4px auto 0;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  background: linear-gradient(180deg, #7c3aed, #4c1d95) !important;
  border: 1px solid rgba(250, 204, 21, 0.25);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.22);
}

.altar-main-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.altar-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
}

.altar-result img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.45));
}

.altar-result b {
  color: #fef3c7;
}

.altar-result span {
  color: #94a3b8;
}

@media (max-width: 768px) {
  .altar-entry-card {
    min-height: 112px;
    padding: 10px;
    gap: 9px;
  }

  .altar-entry-img {
    width: 86px;
    height: 86px;
  }

  .altar-entry-copy small {
    font-size: 0.76rem;
  }

  .altar-entry-shards {
    font-size: 0.72rem;
  }

  .altar-modal-hero {
    align-items: center;
    padding: 10px;
  }

  .altar-modal-hero img {
    width: 82px;
    height: 82px;
  }

  .altar-weapon-list {
    grid-template-columns: 1fr;
    max-height: 340px;
  }

  .altar-ascend-preview {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   FIX MODAL ALTAR — que no aparezca al fondo de la página
   ========================================================= */

#altarModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at center, rgba(30, 41, 59, 0.25) 0%, rgba(2, 6, 23, 0.88) 78%);
  backdrop-filter: blur(4px);
}

#altarModal.open {
  display: flex;
}

#altarModal .altar-modal-box {
  max-height: 88vh;
  overflow-y: auto;
}

/* =========================================================
   MERCADO DE RELIQUIAS
   ========================================================= */
.market-npc-anchor {
  position: absolute;
  top: -250px;
  right: 11%;
  z-index: 32;
  width: 132px;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  user-select: none;
  outline: none;
  animation: marketNpcFloat 4.8s ease-in-out infinite;
}

.market-npc-anchor:hover,
.market-npc-anchor:focus-visible {
  transform: translateY(-4px) scale(1.035);
}

.market-npc-anchor img {
  width: 128px;
  height: 150px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter:
    drop-shadow(0 0 12px rgba(168, 85, 247, 0.72))
    drop-shadow(0 0 22px rgba(56, 189, 248, 0.22));
}

.market-npc-glow {
  position: absolute;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, rgba(168, 85, 247, 0.34) 0%, rgba(59, 130, 246, 0.18) 38%, transparent 72%);
  filter: blur(6px);
  animation: marketNpcGlow 2.8s ease-in-out infinite;
}

.market-npc-label,
.market-npc-whisper {
  position: relative;
  z-index: 3;
  max-width: 170px;
  text-align: center;
  border: 1px solid rgba(168, 85, 247, 0.42);
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.22);
}

.market-npc-label {
  margin-top: -4px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fef3c7;
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.34);
}

.market-npc-whisper {
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 9px;
  color: #c4b5fd;
  font-size: 0.58rem;
  line-height: 1.15;
}

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

@keyframes marketNpcGlow {
  0%, 100% { opacity: 0.58; transform: translateX(-50%) scale(0.92); }
  50% { opacity: 0.95; transform: translateX(-50%) scale(1.08); }
}

#marketplaceModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1002;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.24) 0%, rgba(2, 6, 23, 0.9) 78%);
  backdrop-filter: blur(4px);
}

#marketplaceModal.open {
  display: flex;
}

.marketplace-modal-box {
  position: relative;
  width: min(760px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  border-color: rgba(168, 85, 247, 0.44) !important;
  box-shadow:
    0 0 34px rgba(124, 58, 237, 0.28),
    inset 0 0 28px rgba(15, 23, 42, 0.75);
}

.marketplace-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  background: rgba(15, 23, 42, 0.78);
  color: #e9d5ff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.marketplace-modal-subtitle {
  color: #b9a7d7;
  font-size: 0.86rem;
  line-height: 1.45;
  margin-top: -6px;
}

.marketplace-modal-hero {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.32);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(76, 29, 149, 0.24)),
    radial-gradient(circle at 20% 40%, rgba(168, 85, 247, 0.18), transparent 54%);
}

.marketplace-modal-hero img {
  width: 80px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.65));
}

.marketplace-modal-hero span {
  display: block;
  color: #fde68a;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marketplace-modal-hero p {
  margin: 4px 0 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.35;
}

.marketplace-tabs,
.marketplace-filter-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0;
}

.marketplace-tabs button,
.marketplace-filter-row button,
.marketplace-card-actions button,
.marketplace-price-box button {
  border: 1px solid rgba(168, 85, 247, 0.34);
  background: linear-gradient(180deg, rgba(88, 28, 135, 0.92), rgba(49, 46, 129, 0.92));
  color: #f8fafc;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.22);
}

.marketplace-tabs button.active,
.marketplace-filter-row button.active {
  background: linear-gradient(180deg, #a855f7, #6d28d9);
  color: #fff;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.46);
}

.marketplace-tabs button:disabled,
.marketplace-filter-row button:disabled,
.marketplace-card-actions button:disabled,
.marketplace-price-box button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.marketplace-note,
.marketplace-empty,
.marketplace-locked {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  color: #cbd5e1;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 0.86rem;
  text-align: center;
}

.marketplace-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.marketplace-locked img {
  width: 110px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.55));
}

.marketplace-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.marketplace-card {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.26);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.7));
  box-shadow: inset 0 0 18px rgba(15, 23, 42, 0.8);
}

.marketplace-card > img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.marketplace-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.marketplace-card-info b {
  color: #f8fafc;
  font-size: 0.96rem;
}

.marketplace-card-info small,
.marketplace-card-info span,
.marketplace-attrs {
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1.25;
}

.marketplace-attrs {
  color: #86efac;
}

.marketplace-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  min-width: 118px;
}

.marketplace-card-actions b {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fde68a;
  white-space: nowrap;
}

.marketplace-card-actions b img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.marketplace-sell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: start;
}

.marketplace-select-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.marketplace-select-list button {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 9px;
  align-items: center;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.64);
  color: #e2e8f0;
  padding: 8px;
  cursor: pointer;
}

.marketplace-select-list button.selected {
  border-color: rgba(168, 85, 247, 0.72);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.24);
}

.marketplace-select-list button.disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.marketplace-select-list img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.marketplace-select-list span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.marketplace-select-list small {
  color: #94a3b8;
  font-size: 0.74rem;
}

.marketplace-price-box {
  position: sticky;
  top: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.26);
  background: rgba(15, 23, 42, 0.72);
  text-align: left;
}

.marketplace-price-box b {
  color: #fde68a;
}

.marketplace-price-box small {
  color: #94a3b8;
  line-height: 1.25;
}

.marketplace-price-box input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(168, 85, 247, 0.32);
  background: rgba(2, 6, 23, 0.72);
  color: #f8fafc;
  padding: 10px;
}

@media (max-width: 720px) {
  .market-npc-anchor {
    top: -250px;
    right: 5%;
    width: 92px;
    min-height: 118px;
  }

  .market-npc-anchor img {
    width: 92px;
    height: 110px;
  }

  .market-npc-label {
    font-size: 0.54rem;
    padding: 2px 6px;
  }

  .market-npc-whisper {
    display: none;
  }

  .marketplace-card {
    grid-template-columns: 52px 1fr;
  }

  .marketplace-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .marketplace-sell-grid {
    grid-template-columns: 1fr;
  }

  .marketplace-price-box {
    position: static;
  }
}

/* =========================================================
   Órdenes: separar Actividad semanal y Núcleos ofrendados
   ========================================================= */
.clan-member-metrics {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.25;
}

.clan-member-metrics b {
  color: #f8fafc;
  font-weight: 800;
}

.clan-member-metrics.compact {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
}

.clan-member-row.compact .clan-member-metrics.compact {
  justify-content: flex-start;
}

/* =========================================================
   MERCADO DE RELIQUIAS — diseño tipo registro/cristal
   ========================================================= */
.marketplace-modal-box {
  width: min(1060px, 96vw);
}

.marketplace-crystal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.marketplace-table-panel,
.marketplace-detail-panel {
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.84), rgba(30, 27, 75, 0.58)),
    radial-gradient(circle at 20% 0%, rgba(168, 85, 247, 0.16), transparent 52%);
  box-shadow:
    inset 0 0 22px rgba(2, 6, 23, 0.86),
    0 0 18px rgba(124, 58, 237, 0.16);
  overflow: hidden;
}

.marketplace-table-head,
.marketplace-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) 84px minmax(88px, 0.8fr) 92px;
  gap: 8px;
  align-items: center;
}

.marketplace-table-head {
  padding: 9px 12px;
  color: #fde68a;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.86);
  border-bottom: 1px solid rgba(168, 85, 247, 0.24);
}

.marketplace-table {
  display: grid;
  max-height: 430px;
  overflow-y: auto;
}

.marketplace-row {
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.11);
  background: rgba(15, 23, 42, 0.38);
  color: #dbeafe;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.marketplace-row:hover,
.marketplace-row.selected {
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.52), rgba(15, 23, 42, 0.38));
  box-shadow: inset 3px 0 0 rgba(168, 85, 247, 0.86);
}

.marketplace-row.own {
  opacity: 0.86;
}

.marketplace-row-name {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.marketplace-row-name img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.marketplace-row-name b,
.marketplace-row-name small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-row-name b {
  color: #f8fafc;
  font-size: 0.84rem;
}

.marketplace-row-name small,
.marketplace-row span {
  color: #94a3b8;
  font-size: 0.72rem;
}

.marketplace-row-price {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  color: #fde68a !important;
  font-weight: 900;
  white-space: nowrap;
}

.marketplace-row-price img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.marketplace-detail-panel {
  min-height: 360px;
  padding: 10px;
}

.marketplace-detail-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.marketplace-detail-img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 18px;
  padding: 8px;
  background: radial-gradient(circle, rgba(88, 28, 135, 0.28), rgba(2, 6, 23, 0.42));
  border: 1px solid rgba(168, 85, 247, 0.28);
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.3));
}

.marketplace-detail-card h4 {
  margin: 0;
  color: #f8fafc;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
}

.marketplace-detail-meta,
.marketplace-detail-section {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 0.78rem;
}

.marketplace-detail-section b {
  color: #fde68a;
}

.marketplace-positive {
  color: #fb7185 !important;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.35);
}

.marketplace-negative {
  color: #93c5fd !important;
}

.marketplace-detail-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fde68a;
  font-size: 1rem;
  font-weight: 900;
}

.marketplace-detail-price img {
  width: 20px;
  height: 20px;
}

.marketplace-detail-actions {
  width: 100%;
  align-items: stretch;
}

.marketplace-detail-empty {
  height: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marketplace-sell-detail-box > img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  justify-self: center;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.38));
}

.marketplace-price-box label {
  color: #c4b5fd;
  font-size: 0.72rem;
  font-weight: 800;
}

@media (max-width: 820px) {
  .marketplace-modal-box {
    width: min(96vw, 760px);
  }

  .marketplace-crystal-grid {
    grid-template-columns: 1fr;
  }

  .marketplace-table-head,
  .marketplace-row {
    grid-template-columns: minmax(160px, 1fr) 66px 72px 74px;
    gap: 5px;
  }

  .marketplace-table-head {
    font-size: 0.56rem;
    padding: 8px;
  }

  .marketplace-row {
    padding: 7px 8px;
  }

  .marketplace-row-name {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
  }

  .marketplace-row-name img {
    width: 32px;
    height: 32px;
  }

  .marketplace-row-name b {
    font-size: 0.76rem;
  }

  .marketplace-row-name small,
  .marketplace-row span {
    font-size: 0.62rem;
  }

  .marketplace-detail-panel {
    min-height: 0;
  }

  .marketplace-detail-img {
    width: 88px;
    height: 88px;
  }
}

/* =========================================================
   MERCADO DE RELIQUIAS — rediseño registro lateral Anulkar
   ========================================================= */
#marketplaceModal {
  padding: 10px;
  background:
    radial-gradient(circle at 50% 18%, rgba(124, 58, 237, 0.18) 0%, transparent 34%),
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.14) 0%, transparent 28%),
    rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(6px);
}

#marketplaceModal .marketplace-modal-box {
  width: min(1040px, 97vw);
  max-width: 1040px;
  max-height: 92vh;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid rgba(245, 158, 11, 0.36) !important;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(13, 18, 32, 0.98), rgba(3, 8, 18, 0.99)),
    radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.16), transparent 48%);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.10) inset,
    0 0 0 7px rgba(2, 6, 23, 0.58) inset,
    0 0 34px rgba(168, 85, 247, 0.25),
    0 24px 80px rgba(0, 0, 0, 0.72);
}

#marketplaceModal .marketplace-modal-box > h3,
#marketplaceModal .marketplace-modal-subtitle {
  display: none;
}

#marketplaceModal .marketplace-modal-close {
  top: 18px;
  right: 18px;
  z-index: 12;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #fecaca;
  font-size: 1.55rem;
  box-shadow: 0 0 18px rgba(2, 6, 23, 0.68);
}

.marketplace-modal-content {
  display: grid;
  gap: 12px;
}

#marketplaceModal .marketplace-modal-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 250px) minmax(0, 1fr);
  gap: 0;
  min-height: 152px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82) 42%, rgba(6, 12, 28, 0.96)),
    radial-gradient(circle at 24% 44%, rgba(168, 85, 247, 0.30), transparent 38%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.84));
  box-shadow:
    inset 0 0 30px rgba(2, 6, 23, 0.86),
    0 0 18px rgba(124, 58, 237, 0.16);
}

#marketplaceModal .marketplace-modal-hero::before,
#marketplaceModal .marketplace-modal-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

#marketplaceModal .marketplace-modal-hero::before {
  inset: 9px;
  border: 1px solid rgba(34, 211, 238, 0.10);
  border-radius: 12px;
}

#marketplaceModal .marketplace-modal-hero::after {
  left: 32%;
  right: 10%;
  top: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.45), rgba(168, 85, 247, 0.34), transparent);
}

.marketplace-hero-portrait {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 152px;
  overflow: hidden;
  background:
    radial-gradient(circle at 58% 52%, rgba(168, 85, 247, 0.35), transparent 38%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(2, 6, 23, 0.72));
}

.marketplace-hero-portrait::after {
  content: "";
  position: absolute;
  inset: auto 12% 8px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.36), transparent 68%);
  filter: blur(3px);
}

#marketplaceModal .marketplace-modal-hero img {
  position: relative;
  z-index: 1;
  width: min(220px, 100%);
  height: 158px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.58));
}

.marketplace-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px 58px 22px 24px;
  text-align: center;
}

#marketplaceModal .marketplace-modal-hero span {
  display: block;
  color: #f8d77a;
  font-family: 'Cinzel', serif;
  font-size: clamp(1.55rem, 5.1vw, 3.1rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: none;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 16px rgba(245, 158, 11, 0.20);
}

#marketplaceModal .marketplace-modal-hero p {
  max-width: 560px;
  margin: 0 auto;
  color: #d8d0e7;
  font-size: clamp(0.86rem, 2.2vw, 1.08rem);
  line-height: 1.35;
}

.marketplace-hero-copy small {
  color: #c89543;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.marketplace-tab-content {
  min-height: 0;
}

.marketplace-trade-layout {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.marketplace-side-panel,
.marketplace-registry-panel {
  border: 1px solid rgba(245, 158, 11, 0.20);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(3, 10, 24, 0.94), rgba(2, 6, 23, 0.97)),
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.11), transparent 46%);
  box-shadow:
    inset 0 0 28px rgba(2, 6, 23, 0.88),
    0 0 18px rgba(14, 165, 233, 0.08);
}

.marketplace-side-panel {
  display: flex;
  flex-direction: column;
  min-height: 510px;
  padding: 12px;
}

.marketplace-side-tabs,
.marketplace-side-filters {
  display: grid;
  gap: 9px;
}

.marketplace-side-tab,
.marketplace-side-filter,
.marketplace-side-refresh,
.marketplace-detail-actions button,
.marketplace-price-box button {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 11px 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(3, 7, 18, 0.92));
  color: #cbd5e1;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 14px rgba(2, 6, 23, 0.72);
}

.marketplace-side-tab b,
.marketplace-side-filter b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-side-tab span,
.marketplace-side-filter span {
  color: #9ca3af;
  text-align: center;
  filter: drop-shadow(0 0 8px rgba(147, 197, 253, 0.14));
}

.marketplace-side-filter em {
  color: #94a3b8;
  font-style: normal;
  font-size: 0.8rem;
}

.marketplace-side-tab.active,
.marketplace-side-filter.active,
.marketplace-side-refresh {
  border-color: rgba(168, 85, 247, 0.62);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.78), rgba(49, 46, 129, 0.88)),
    radial-gradient(circle at 16% 0%, rgba(34, 211, 238, 0.20), transparent 45%);
  color: #ffffff;
  box-shadow:
    inset 0 0 18px rgba(2, 6, 23, 0.64),
    0 0 18px rgba(124, 58, 237, 0.30);
}

.marketplace-side-tab.active span,
.marketplace-side-filter.active span {
  color: #e9d5ff;
}

.marketplace-side-filter.disabled,
.marketplace-side-tab:disabled,
.marketplace-side-filter:disabled,
.marketplace-side-refresh:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.marketplace-side-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.13);
}

.marketplace-side-title {
  margin-bottom: 10px;
  color: #f8d77a;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.marketplace-side-refresh {
  grid-template-columns: 1fr;
  justify-items: center;
  margin-top: auto;
  text-align: center;
  color: #dbeafe;
}

.marketplace-side-note,
.marketplace-side-empty {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  background: rgba(15, 23, 42, 0.52);
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.marketplace-registry-panel {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  padding: 0;
}

.marketplace-registry-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: end;
  gap: 10px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.17);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.80), rgba(2, 6, 23, 0.44)),
    radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.12), transparent 44%);
}

.marketplace-registry-title b {
  display: block;
  color: #f8d77a;
  font-family: 'Cinzel', serif;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marketplace-registry-title small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 0.72rem;
}

.marketplace-registry-title > span {
  color: #cbd5e1;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}

#marketplaceModal .marketplace-table {
  display: grid;
  max-height: 442px;
  overflow-y: auto;
  padding: 8px 12px 12px;
  scrollbar-width: thin;
}

#marketplaceModal .marketplace-table::-webkit-scrollbar,
#marketplaceModal .marketplace-select-list::-webkit-scrollbar,
#marketplaceModal .marketplace-detail-flyout::-webkit-scrollbar {
  width: 7px;
}

#marketplaceModal .marketplace-table::-webkit-scrollbar-thumb,
#marketplaceModal .marketplace-select-list::-webkit-scrollbar-thumb,
#marketplaceModal .marketplace-detail-flyout::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.42);
  border-radius: 999px;
}

#marketplaceModal .marketplace-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 0;
  background: rgba(2, 8, 20, 0.28);
  color: #dbeafe;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

#marketplaceModal .marketplace-row:hover,
#marketplaceModal .marketplace-row.selected {
  transform: translateX(2px);
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.58), rgba(2, 8, 20, 0.24));
  box-shadow:
    inset 3px 0 0 rgba(168, 85, 247, 0.92),
    0 0 16px rgba(168, 85, 247, 0.20);
}

#marketplaceModal .marketplace-row.own {
  opacity: 0.82;
}

#marketplaceModal .marketplace-row-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

#marketplaceModal .marketplace-row-name b,
#marketplaceModal .marketplace-row-name small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#marketplaceModal .marketplace-row-name b {
  color: #f3e8ff;
  font-family: 'Cinzel', serif;
  font-size: 0.97rem;
  letter-spacing: 0.01em;
}

#marketplaceModal .marketplace-row-name small {
  color: #8fa2bd;
  font-size: 0.68rem;
}

#marketplaceModal .marketplace-row-price {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  color: #f8d77a !important;
  font-weight: 900;
  white-space: nowrap;
}

#marketplaceModal .marketplace-row-price img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.marketplace-registry-panel.has-detail .marketplace-row.selected {
  color: #e9d5ff;
}

.marketplace-detail-flyout {
  position: absolute;
  z-index: 6;
  right: 12px;
  top: 72px;
  width: min(360px, calc(100% - 36px));
  max-height: calc(100% - 88px);
  overflow-y: auto;
  border-radius: 16px;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.72), 0 0 28px rgba(168, 85, 247, 0.28);
}

#marketplaceModal .marketplace-detail-card {
  position: relative;
  display: grid;
  gap: 10px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(11, 14, 26, 0.98), rgba(2, 6, 23, 0.99)),
    radial-gradient(circle at 20% 0%, rgba(168, 85, 247, 0.18), transparent 38%);
  text-align: left;
}

.marketplace-detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px !important;
  height: 32px;
  display: grid !important;
  place-items: center;
  padding: 0 !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.82) !important;
  color: #fde68a !important;
  font-size: 1.2rem;
  cursor: pointer;
}

.marketplace-detail-heading {
  padding-right: 34px;
}

#marketplaceModal .marketplace-detail-card h4 {
  margin: 0;
  color: #d946ef;
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  line-height: 1.1;
  text-align: left;
  text-shadow: 0 0 10px rgba(217, 70, 239, 0.24);
}

.marketplace-detail-heading small {
  display: block;
  margin-top: 4px;
  color: #c4b5fd;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.marketplace-detail-main {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

#marketplaceModal .marketplace-detail-img,
#marketplaceModal .marketplace-sell-detail-box > img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  border-radius: 12px;
  padding: 8px;
  background: radial-gradient(circle, rgba(88, 28, 135, 0.34), rgba(2, 6, 23, 0.56));
  border: 1px solid rgba(168, 85, 247, 0.34);
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.35));
}

#marketplaceModal .marketplace-detail-meta,
#marketplaceModal .marketplace-detail-section {
  width: auto;
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  background: rgba(15, 23, 42, 0.54);
  color: #cbd5e1;
  font-size: 0.76rem;
  line-height: 1.32;
  text-align: left;
}

#marketplaceModal .marketplace-detail-section b,
#marketplaceModal .marketplace-detail-price span {
  color: #f8d77a;
  font-family: 'Cinzel', serif;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#marketplaceModal .marketplace-detail-section strong,
#marketplaceModal .marketplace-detail-meta strong {
  color: #86efac;
}

#marketplaceModal .marketplace-positive {
  color: #fb7185 !important;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.35);
}

#marketplaceModal .marketplace-negative {
  color: #93c5fd !important;
}

#marketplaceModal .marketplace-detail-price {
  display: grid;
  gap: 3px;
  color: #f8d77a;
}

#marketplaceModal .marketplace-detail-price b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f8d77a;
  font-size: 1.35rem;
  font-weight: 900;
}

#marketplaceModal .marketplace-detail-price img {
  width: 20px;
  height: 20px;
}

#marketplaceModal .marketplace-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

#marketplaceModal .marketplace-detail-actions button,
#marketplaceModal .marketplace-price-box button {
  display: block;
  text-align: center;
  padding: 11px 12px;
  border-radius: 10px;
}

#marketplaceModal .marketplace-buy-action,
#marketplaceModal .marketplace-price-box button {
  border-color: rgba(168, 85, 247, 0.62) !important;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.92), rgba(68, 38, 125, 0.94)) !important;
  color: #fff7ed !important;
}

#marketplaceModal .marketplace-close-action {
  border-color: rgba(59, 130, 246, 0.30) !important;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
  color: #dbeafe !important;
}

#marketplaceModal .marketplace-sell-panel {
  padding-bottom: 12px;
}

#marketplaceModal .marketplace-sell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px;
  padding: 12px;
  align-items: start;
}

#marketplaceModal .marketplace-select-list {
  display: grid;
  gap: 0;
  max-height: 440px;
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 12px;
  background: rgba(2, 8, 20, 0.28);
  padding: 0;
}

#marketplaceModal .marketplace-select-list button {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 0;
  background: transparent;
  color: #dbeafe;
  text-align: left;
}

#marketplaceModal .marketplace-select-list button.selected {
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.56), rgba(2, 8, 20, 0.20));
  box-shadow: inset 3px 0 0 rgba(168, 85, 247, 0.9);
}

#marketplaceModal .marketplace-select-list button.disabled {
  opacity: 0.52;
}

#marketplaceModal .marketplace-select-list span {
  display: grid;
  gap: 3px;
}

#marketplaceModal .marketplace-select-list b {
  color: #f3e8ff;
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
}

#marketplaceModal .marketplace-select-list small {
  color: #8fa2bd;
  font-size: 0.69rem;
}

#marketplaceModal .marketplace-price-box {
  position: sticky;
  top: 0;
  display: grid;
  gap: 9px;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(3, 8, 18, 0.84);
  text-align: left;
}

#marketplaceModal .marketplace-price-box b {
  color: #f8d77a;
  font-family: 'Cinzel', serif;
}

#marketplaceModal .marketplace-price-box small,
#marketplaceModal .marketplace-price-box label {
  color: #9ca3af;
  font-size: 0.72rem;
  line-height: 1.25;
}

#marketplaceModal .marketplace-price-box input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(168, 85, 247, 0.32);
  background: rgba(2, 6, 23, 0.78);
  color: #f8fafc;
  padding: 10px;
}

#marketplaceModal .marketplace-empty,
#marketplaceModal .marketplace-locked {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.56);
  color: #cbd5e1;
  padding: 14px;
  margin: 8px;
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 860px) {
  #marketplaceModal .marketplace-modal-box {
    max-height: 94vh;
    padding: 9px;
  }

  #marketplaceModal .marketplace-modal-hero {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 126px;
  }

  .marketplace-hero-portrait {
    min-height: 126px;
  }

  #marketplaceModal .marketplace-modal-hero img {
    height: 130px;
    width: 132px;
  }

  .marketplace-hero-copy {
    padding: 18px 44px 18px 12px;
    text-align: left;
  }

  .marketplace-hero-copy small {
    letter-spacing: 0.13em;
  }

  .marketplace-trade-layout {
    grid-template-columns: 1fr;
  }

  .marketplace-side-panel {
    min-height: 0;
  }

  .marketplace-side-tabs,
  .marketplace-side-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .marketplace-side-filter,
  .marketplace-side-tab {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 9px 7px;
    text-align: center;
    font-size: 0.78rem;
  }

  .marketplace-side-filter em {
    display: none;
  }

  .marketplace-side-refresh {
    margin-top: 10px;
  }

  .marketplace-registry-panel {
    min-height: 430px;
  }

  #marketplaceModal .marketplace-table {
    max-height: 390px;
  }

  .marketplace-detail-flyout {
    position: fixed;
    inset: 14px;
    width: auto;
    max-height: calc(100vh - 28px);
    z-index: 1100;
  }
}

@media (max-width: 540px) {
  #marketplaceModal {
    padding: 5px;
  }

  #marketplaceModal .marketplace-modal-box {
    width: 98vw;
    border-radius: 14px;
  }

  #marketplaceModal .marketplace-modal-close {
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
  }

  #marketplaceModal .marketplace-modal-hero {
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 112px;
  }

  .marketplace-hero-portrait {
    min-height: 112px;
  }

  #marketplaceModal .marketplace-modal-hero img {
    width: 98px;
    height: 112px;
  }

  .marketplace-hero-copy {
    padding: 14px 38px 14px 8px;
  }

  #marketplaceModal .marketplace-modal-hero p {
    font-size: 0.74rem;
  }

  .marketplace-hero-copy small {
    display: none;
  }

  .marketplace-side-tabs,
  .marketplace-side-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketplace-registry-title {
    grid-template-columns: minmax(0, 1fr) 82px;
    padding: 12px;
  }

  .marketplace-registry-title b {
    font-size: 0.83rem;
  }

  #marketplaceModal .marketplace-row {
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 8px;
    padding: 10px 8px;
  }

  #marketplaceModal .marketplace-row-name b {
    font-size: 0.82rem;
  }

  #marketplaceModal .marketplace-row-name small {
    font-size: 0.60rem;
  }

  #marketplaceModal .marketplace-row-price {
    font-size: 0.76rem;
  }

  #marketplaceModal .marketplace-sell-grid {
    grid-template-columns: 1fr;
  }

  #marketplaceModal .marketplace-price-box {
    position: static;
  }

  .marketplace-detail-main {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  #marketplaceModal .marketplace-detail-img,
  #marketplaceModal .marketplace-sell-detail-box > img {
    width: 82px;
    height: 82px;
  }
}

/* =========================================================
   ARENA DEL VÍNCULO — UI de batalla visual v2
   ========================================================= */
#battleScreen.arena-battle-screen {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  overflow-y: auto;
  z-index: 999;
  color: #e5e7eb;
  background-color: #050812;
  background-image:
    radial-gradient(circle at 50% 20%, rgba(168, 85, 247, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72)),
    url('assets/arenafondo.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#battleScreen.arena-battle-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 17%, rgba(251, 191, 36, 0.08), transparent 22%),
    radial-gradient(circle at 30% 45%, rgba(34, 211, 238, 0.08), transparent 28%),
    radial-gradient(circle at 70% 47%, rgba(248, 113, 113, 0.08), transparent 28%),
    rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(1px);
}

.arena-battle-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 22px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.20), transparent 45%);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.10) inset,
    0 0 35px rgba(124, 58, 237, 0.23),
    0 22px 60px rgba(0, 0, 0, 0.70);
}

.arena-battle-header {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.92));
  overflow: hidden;
}

.arena-battle-header::after {
  content: "";
  position: absolute;
  inset: -40% auto auto 48%;
  width: 180px;
  height: 180px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.24), transparent 65%);
  pointer-events: none;
}

.arena-battle-header-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.34), rgba(15, 23, 42, 0.74));
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 22px rgba(124, 58, 237, 0.38);
}

.arena-battle-header-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.45));
}

.arena-battle-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: #38bdf8;
  text-transform: uppercase;
  font-weight: 900;
}

.arena-battle-title-wrap h1 {
  margin: 2px 0 0;
  color: #f8d77a;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.45rem, 4vw, 2.45rem);
  line-height: 1;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.28);
}

.arena-battle-title-wrap p {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.35;
}

.arena-battle-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  padding: 0;
  font-size: 1.8rem;
  line-height: 1;
  color: #fecaca;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(248, 113, 113, 0.32);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.16);
}

.arena-battle-result-title {
  margin: 12px auto 10px;
  text-align: center;
  transform-origin: center;
  animation: arenaResultReveal 0.62s cubic-bezier(.2, .9, .2, 1) both;
}

.arena-battle-result-title.is-hidden {
  display: none;
}

.arena-battle-result-title span {
  display: block;
  color: #f7d774;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.1rem, 9vw, 4.75rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.55), 0 0 34px rgba(245, 158, 11, 0.32);
}

.arena-battle-result-title small {
  display: block;
  margin-top: 3px;
  color: #cbd5e1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.arena-battle-result-title.result-defeat span {
  color: #fb7185;
  text-shadow: 0 0 14px rgba(248, 113, 113, 0.55), 0 0 34px rgba(127, 29, 29, 0.48);
}

.arena-battle-result-title.result-draw span {
  color: #c4b5fd;
  text-shadow: 0 0 14px rgba(167, 139, 250, 0.55), 0 0 34px rgba(59, 130, 246, 0.28);
}

#battleScreen .battle-container.arena-battle-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  max-width: none;
  margin: 12px 0;
  min-height: 280px;
}

.arena-side {
  width: auto !important;
  min-width: 0;
  text-align: center;
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.62), rgba(15, 23, 42, 0.84));
  padding: 10px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.38);
}

.arena-side-player {
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.38), 0 0 18px rgba(34, 197, 94, 0.09);
}

.arena-side-rival {
  border-color: rgba(248, 113, 113, 0.28);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.38), 0 0 18px rgba(248, 113, 113, 0.09);
}

.arena-side-label {
  color: #f8d77a;
  font-family: Georgia, 'Times New Roman', serif;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 900;
  margin-bottom: 6px;
}

.arena-side-name {
  width: 100%;
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 800;
}

.arena-side-name.player-name { color: #a3e635; }
.arena-side-name.rival-name { color: #fb7185; }

.arena-team-grid,
.arena-fighter-grid-inner {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 9px;
}

.arena-fighter-card.fighter,
.arena-fighter-card {
  position: relative;
  flex: 1 1 138px;
  max-width: 170px;
  min-width: 128px;
  margin: 0 !important;
  padding: 8px !important;
  border-radius: 16px !important;
  background-color: rgba(15, 23, 42, 0.86) !important;
  background-size: 100% 100%;
  overflow: visible;
  isolation: isolate;
  transition: transform 0.22s ease, filter 0.22s ease, opacity 0.22s ease;
}

.arena-fighter-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 10%, rgba(168, 85, 247, 0.17), transparent 60%);
  opacity: 0.86;
  pointer-events: none;
  z-index: -1;
}

.arena-card-rarity {
  color: #c4b5fd;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
  margin-bottom: 3px;
}

.arena-card-weapon {
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.arena-card-weapon img,
.arena-fighter-card .weapon img {
  width: 72px !important;
  max-height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.48));
}

.arena-card-name {
  display: block;
  min-height: 2.4em;
  color: #f8fafc;
  font-size: 0.82rem !important;
  line-height: 1.15;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.24);
}

.arena-card-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
  margin: 5px 0;
}

.arena-card-stats span {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  font-size: 0.64rem;
  line-height: 1.1;
}

.arena-hp-bar.health-bar {
  height: 9px;
  margin: 6px 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.10);
  background: rgba(2, 6, 23, 0.88);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.65);
}

.arena-hp-bar .health-bar-inner {
  background: linear-gradient(90deg, #7c3aed, #22d3ee, #a3e635);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.45);
  transition: width 0.42s cubic-bezier(.2, .85, .25, 1);
}

.battle-hp-text {
  display: block;
  color: #dbeafe;
  font-size: 0.72rem;
}

.arena-battle-center {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, 0.20);
  background:
    radial-gradient(circle at 50% 42%, rgba(251, 191, 36, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.54), rgba(15, 23, 42, 0.80));
  overflow: hidden;
}

.arena-vs-emblem {
  color: #f8d77a;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 900;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.52), 0 0 32px rgba(124, 58, 237, 0.36);
  animation: arenaVsPulse 2.3s ease-in-out infinite;
}

.arena-center-event {
  width: min(210px, 92%);
  min-height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.62);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.42);
  text-align: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.arena-center-event-kicker {
  color: #94a3b8;
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 900;
}

.arena-center-event strong {
  color: #f8fafc;
  font-size: 1.12rem;
  line-height: 1.05;
}

.arena-center-event small {
  color: #cbd5e1;
  font-size: 0.68rem;
  line-height: 1.2;
}

.arena-center-event.event-crit {
  border-color: rgba(248, 113, 113, 0.74);
  box-shadow: 0 0 30px rgba(248, 113, 113, 0.30), inset 0 0 18px rgba(127, 29, 29, 0.32);
  transform: scale(1.05);
}
.arena-center-event.event-crit .arena-center-event-kicker,
.arena-center-event.event-crit strong { color: #fb7185; text-shadow: 0 0 12px rgba(248, 113, 113, 0.65); }

.arena-center-event.event-lifesteal {
  border-color: rgba(74, 222, 128, 0.72);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.26), inset 0 0 18px rgba(20, 83, 45, 0.32);
}
.arena-center-event.event-lifesteal .arena-center-event-kicker,
.arena-center-event.event-lifesteal strong { color: #86efac; text-shadow: 0 0 12px rgba(34, 197, 94, 0.65); }

.arena-center-event.event-block {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.24), inset 0 0 18px rgba(8, 47, 73, 0.32);
}
.arena-center-event.event-block .arena-center-event-kicker,
.arena-center-event.event-block strong { color: #7dd3fc; text-shadow: 0 0 12px rgba(56, 189, 248, 0.65); }

.arena-center-event.event-death,
.arena-center-event.event-defeat {
  border-color: rgba(244, 63, 94, 0.68);
  box-shadow: 0 0 30px rgba(127, 29, 29, 0.34), inset 0 0 18px rgba(127, 29, 29, 0.32);
}

.arena-center-event.event-victory {
  border-color: rgba(251, 191, 36, 0.78);
  box-shadow: 0 0 34px rgba(251, 191, 36, 0.28), inset 0 0 18px rgba(113, 63, 18, 0.28);
}

.arena-battle-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.arena-floating-number {
  position: absolute;
  z-index: 25;
  color: #fb7185;
  font-weight: 1000;
  font-size: 1.2rem;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.95), 0 0 12px rgba(248, 113, 113, 0.55);
  animation: arenaFloatDamage 1.05s ease-out forwards;
}

.arena-floating-number.crit {
  color: #fbbf24;
  font-size: 1.48rem;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.95), 0 0 18px rgba(251, 191, 36, 0.85), 0 0 24px rgba(248, 113, 113, 0.55);
}

.arena-floating-number.heal {
  color: #86efac;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.95), 0 0 18px rgba(34, 197, 94, 0.72);
}

.arena-life-particle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #dcfce7 0%, #86efac 38%, rgba(34, 197, 94, 0.0) 72%);
  box-shadow: 0 0 11px #22c55e, 0 0 22px rgba(34, 197, 94, 0.72);
  animation: arenaLifeParticle 0.82s cubic-bezier(.2, .85, .2, 1) forwards;
}

.arena-life-tether {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(34,197,94,0), rgba(134,239,172,0.95), rgba(34,197,94,0));
  filter: drop-shadow(0 0 8px #22c55e);
  animation: arenaLifeTether 0.48s ease-out forwards;
}

.arena-fighter-card.hit { animation: arenaHitShake 0.32s ease both; }
.arena-fighter-card.crit-hit { animation: arenaCritShake 0.42s ease both; }
.arena-fighter-card.life-restored { box-shadow: 0 0 24px rgba(34, 197, 94, 0.48), inset 0 0 18px rgba(20, 83, 45, 0.22) !important; }
.arena-fighter-card.blocked-shield::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 20px;
  border: 2px solid rgba(56, 189, 248, 0.95);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.70), inset 0 0 18px rgba(56, 189, 248, 0.24);
  animation: arenaShieldPulse 0.66s ease-out forwards;
  pointer-events: none;
}

.arena-fighter-card.fallen {
  opacity: 0.52;
  filter: grayscale(0.8) brightness(0.66);
  transform: scale(0.97);
}

.arena-fighter-card.fallen::after {
  content: "CAÍDA";
  position: absolute;
  inset: auto 10px 46px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.72);
  border: 1px solid rgba(248, 113, 113, 0.4);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.arena-battle-panel {
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.26);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.70), rgba(15, 23, 42, 0.82));
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.38);
}

.arena-panel-title {
  padding: 10px 12px 0;
  color: #f8d77a;
  font-family: Georgia, 'Times New Roman', serif;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
}

.battle-log.arena-battle-log {
  max-width: none;
  height: 230px;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.34);
  font-size: 0.88rem;
  line-height: 1.35;
}

.arena-log-row {
  display: block;
  margin: 5px 0;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.arena-log-sep {
  margin: 9px 0 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  text-align: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.arena-log-muted { color: #94a3b8; }
.arena-log-crit { color: #fbbf24; font-weight: 900; text-shadow: 0 0 8px rgba(251, 191, 36, 0.45); }
.arena-log-block { color: #7dd3fc; font-weight: 900; }
.arena-log-start { color: #f8d77a; font-weight: 900; }

.arena-battle-rewards {
  margin-top: 12px;
  border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.90), rgba(2, 6, 23, 0.82));
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.09), inset 0 0 24px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  animation: arenaRewardReveal 0.42s ease both;
}

.arena-battle-rewards.is-hidden { display: none; }

.arena-reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  padding: 10px;
}

.arena-reward-card {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 88px;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(2, 6, 23, 0.58);
}

.arena-reward-card.mini { min-height: 78px; }

.arena-reward-card img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.42));
}

.arena-reward-card span {
  color: #f8d77a;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
}

.arena-reward-card small {
  color: #cbd5e1;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.arena-order-crest {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #f8d77a !important;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.48), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(251, 191, 36, 0.32);
  font-size: 1.25rem !important;
}

.arena-rank-strip {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.arena-rank-strip span { color: #94a3b8; }
.arena-rank-strip strong { color: #f8d77a; }
.arena-rank-bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.15);
  overflow: hidden;
}
.arena-rank-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #22d3ee, #f8d77a);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.55);
}

.arena-battle-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 0 2px;
}

.arena-btn {
  min-width: 150px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 11px 16px;
  color: #e5e7eb;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.arena-btn.primary {
  background: linear-gradient(135deg, #312e81, #7c3aed, #1d4ed8);
  border-color: rgba(196, 181, 253, 0.42);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.28);
}

.arena-btn.secondary {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-color: rgba(125, 211, 252, 0.26);
}

.arena-x10-echo-stack {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 215px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.28);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.24), rgba(2, 6, 23, 0.55));
}

.arena-echo-sigil {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #c4b5fd;
  font-size: 3rem;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.34), rgba(2, 6, 23, 0.9));
  border: 1px solid rgba(196, 181, 253, 0.32);
  box-shadow: 0 0 28px rgba(124, 58, 237, 0.38);
}

.arena-x10-echo-stack strong { color: #f8d77a; font-size: 1.2rem; }
.arena-x10-echo-stack small { color: #cbd5e1; }

@keyframes arenaVsPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.07); filter: brightness(1.28); }
}

@keyframes arenaFloatDamage {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.75); }
  16% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -54px) scale(1); }
}

@keyframes arenaLifeParticle {
  0% { opacity: 0; transform: translate(0, 0) scale(0.55); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.25); }
}

@keyframes arenaLifeTether {
  0% { opacity: 0; transform: scaleX(0) rotate(var(--rot, 0deg)); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: scaleX(1) rotate(var(--rot, 0deg)); }
}

@keyframes arenaHitShake {
  0% { transform: translateX(0) scale(1); }
  35% { transform: translateX(-4px) scale(1.035); }
  70% { transform: translateX(4px) scale(1.015); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes arenaCritShake {
  0% { transform: translateX(0) scale(1); filter: brightness(1); }
  20% { transform: translateX(-7px) rotate(-1deg) scale(1.06); filter: brightness(1.55); }
  55% { transform: translateX(6px) rotate(1deg) scale(1.03); }
  100% { transform: translateX(0) scale(1); filter: brightness(1); }
}

@keyframes arenaShieldPulse {
  0% { opacity: 0; transform: scale(0.82); }
  25% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.18); }
}

@keyframes arenaResultReveal {
  0% { opacity: 0; transform: translateY(-10px) scale(0.92); filter: blur(5px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes arenaRewardReveal {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  #battleScreen.arena-battle-screen { padding: 6px; }
  .arena-battle-shell { border-radius: 16px; padding: 8px; }
  .arena-battle-header { grid-template-columns: auto 1fr auto; padding: 9px; gap: 8px; }
  .arena-battle-header-orb { width: 46px; height: 46px; border-radius: 14px; }
  .arena-battle-header-icon { width: 38px; height: 38px; }
  .arena-battle-title-wrap h1 { font-size: 1.35rem; }
  .arena-battle-title-wrap p { font-size: 0.72rem; }
  .arena-battle-kicker { font-size: 0.58rem; letter-spacing: 0.16em; }
  .arena-battle-close { width: 36px; height: 36px; border-radius: 12px; }

  #battleScreen .battle-container.arena-battle-stage {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .arena-battle-center {
    min-height: 118px;
    order: 2;
  }
  .arena-side-player { order: 1; }
  .arena-side-rival { order: 3; }

  .arena-vs-emblem { font-size: 2.5rem; }
  .arena-center-event { min-height: 74px; width: min(320px, 94%); }
  .arena-center-event strong { font-size: 1rem; }

  .arena-fighter-grid-inner {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  .arena-fighter-card.fighter,
  .arena-fighter-card {
    width: auto !important;
    min-width: 0;
    max-width: none;
    flex-basis: auto;
    padding: 6px !important;
    border-radius: 13px !important;
  }

  .arena-card-weapon { height: 58px; }
  .arena-card-weapon img,
  .arena-fighter-card .weapon img { width: 54px !important; max-height: 58px; }
  .arena-card-rarity { font-size: 0.52rem; }
  .arena-card-name { font-size: 0.68rem !important; min-height: 2.1em; }
  .arena-card-stats { display: none; }
  .battle-hp-text { font-size: 0.62rem; }
  .arena-hp-bar.health-bar { height: 7px; }

  .battle-log.arena-battle-log {
    height: 190px;
    font-size: 0.76rem;
    padding: 7px;
  }
  .arena-log-row { padding: 6px 7px; margin: 4px 0; }

  .arena-reward-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; gap: 7px; }
  .arena-reward-card { min-height: 76px; padding: 8px 5px; }
  .arena-reward-card img { width: 31px; height: 31px; }
  .arena-reward-card span { font-size: 1.12rem; }
  .arena-rank-strip { grid-template-columns: 1fr auto; }
  .arena-rank-bar { grid-column: 1 / -1; }
  .arena-btn { min-width: 135px; font-size: 0.72rem; padding: 10px 12px; }
}

@media (max-width: 430px) {
  .arena-fighter-grid-inner { gap: 5px; }
  .arena-card-weapon { height: 52px; }
  .arena-card-weapon img,
  .arena-fighter-card .weapon img { width: 48px !important; max-height: 52px; }
  .arena-card-name { font-size: 0.62rem !important; }
  .arena-battle-result-title span { font-size: 2rem; }
  .arena-reward-grid { grid-template-columns: 1fr 1fr; }
}


/* ==========================================================
   ARENA DEL VÍNCULO — Escena abierta v2
   Mantiene el fondo real de la Arena como protagonista:
   fuera la caja pesada del modal, dentro paneles flotantes legibles.
   ========================================================== */

#battleScreen.arena-battle-screen {
  padding: clamp(8px, 1.2vw, 18px);
  background-color: #020617;
  background-image:
    radial-gradient(circle at 50% 14%, rgba(251, 191, 36, 0.10), transparent 18%),
    radial-gradient(circle at 26% 36%, rgba(124, 58, 237, 0.18), transparent 28%),
    radial-gradient(circle at 76% 42%, rgba(220, 38, 38, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.28) 42%, rgba(2, 6, 23, 0.55)),
    url('assets/arenafondo.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#battleScreen.arena-battle-screen::before {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.55), transparent 16%, transparent 84%, rgba(2, 6, 23, 0.55)),
    radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.34) 74%),
    radial-gradient(circle at 50% 18%, rgba(168, 85, 247, 0.12), transparent 34%);
  backdrop-filter: none;
}

#battleScreen .arena-battle-shell {
  width: min(1280px, 96vw);
  min-height: calc(100vh - clamp(16px, 2.4vw, 36px));
  margin: 0 auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#battleScreen .arena-battle-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(15, 23, 42, 0.00) 0%, rgba(15, 23, 42, 0.18) 54%, rgba(2, 6, 23, 0.70) 100%);
}

#battleScreen .arena-battle-header,
#battleScreen .arena-side,
#battleScreen .arena-battle-center,
#battleScreen .arena-battle-panel,
#battleScreen .arena-battle-rewards {
  backdrop-filter: blur(5px) saturate(1.12);
  -webkit-backdrop-filter: blur(5px) saturate(1.12);
}

#battleScreen .arena-battle-header {
  overflow: visible;
  margin: 0 auto 10px;
  width: min(100%, 1040px);
  border-radius: 20px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.68), rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.68));
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.10) inset,
    0 10px 34px rgba(0, 0, 0, 0.44),
    0 0 38px rgba(124, 58, 237, 0.18);
}

#battleScreen .arena-battle-header::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.22), transparent);
  opacity: 0.28;
}

#battleScreen .arena-battle-header::after {
  opacity: 0.78;
}

#battleScreen .arena-battle-title-wrap h1 {
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.95),
    0 0 18px rgba(251, 191, 36, 0.36),
    0 0 34px rgba(124, 58, 237, 0.28);
}

#battleScreen .arena-battle-stage {
  position: relative;
  margin: 10px 0 8px;
}

#battleScreen .arena-battle-stage::before {
  content: "";
  position: absolute;
  inset: 8% 22%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(251, 191, 36, 0.12), transparent 28%),
    radial-gradient(ellipse at center, rgba(124, 58, 237, 0.16), transparent 58%);
  filter: blur(14px);
  opacity: 0.82;
}

#battleScreen .arena-side,
#battleScreen .arena-battle-center {
  position: relative;
  z-index: 1;
}

#battleScreen .arena-side {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.52)),
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08), transparent 58%);
  border-color: rgba(99, 102, 241, 0.18);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.20),
    0 14px 42px rgba(0, 0, 0, 0.32);
}

#battleScreen .arena-side-player {
  border-color: rgba(34, 197, 94, 0.26);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.20),
    0 0 26px rgba(34, 197, 94, 0.09),
    0 14px 42px rgba(0, 0, 0, 0.32);
}

#battleScreen .arena-side-rival {
  border-color: rgba(248, 113, 113, 0.28);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.20),
    0 0 26px rgba(248, 113, 113, 0.10),
    0 14px 42px rgba(0, 0, 0, 0.32);
}

#battleScreen .arena-side-label,
#battleScreen .arena-panel-title {
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.95),
    0 0 12px rgba(251, 191, 36, 0.36);
}

#battleScreen .arena-battle-center {
  background:
    radial-gradient(circle at 50% 38%, rgba(251, 191, 36, 0.18), transparent 33%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.46));
  border-color: rgba(251, 191, 36, 0.18);
  box-shadow:
    0 0 36px rgba(251, 191, 36, 0.08),
    0 14px 42px rgba(0, 0, 0, 0.30);
}

#battleScreen .arena-vs-emblem {
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.38));
}

#battleScreen .arena-center-event {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.46), rgba(15, 23, 42, 0.54));
  border-color: rgba(148, 163, 184, 0.14);
}

#battleScreen .arena-fighter-card.fighter,
#battleScreen .arena-fighter-card {
  background-color: rgba(15, 23, 42, 0.76) !important;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(124, 58, 237, 0.10);
}

#battleScreen .arena-battle-panel {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.62));
  border-color: rgba(125, 211, 252, 0.20);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.20),
    0 12px 38px rgba(0, 0, 0, 0.34);
}

#battleScreen .battle-log.arena-battle-log {
  background: rgba(2, 6, 23, 0.34);
  border-top-color: rgba(248, 250, 252, 0.10);
  scrollbar-color: rgba(125, 211, 252, 0.68) rgba(2, 6, 23, 0.30);
}

#battleScreen .arena-log-row {
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(148, 163, 184, 0.09);
}

#battleScreen .arena-battle-rewards {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.54), rgba(2, 6, 23, 0.66));
  box-shadow:
    0 0 22px rgba(251, 191, 36, 0.08),
    inset 0 0 24px rgba(0, 0, 0, 0.22),
    0 12px 38px rgba(0, 0, 0, 0.32);
}

#battleScreen .arena-reward-card {
  background: rgba(2, 6, 23, 0.42);
}

#battleScreen .arena-battle-actions {
  padding: 12px 0 8px;
}

#battleScreen .arena-exit-btn {
  min-width: 190px;
  border-color: rgba(125, 211, 252, 0.34);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.78));
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.10),
    0 10px 26px rgba(0, 0, 0, 0.34);
}

#battleScreen .arena-life-particle {
  width: 8px;
  height: 8px;
  box-shadow:
    0 0 13px #22c55e,
    0 0 26px rgba(34, 197, 94, 0.82),
    0 0 40px rgba(134, 239, 172, 0.36);
}

#battleScreen .arena-life-tether {
  height: 3px;
  background: linear-gradient(90deg, rgba(34,197,94,0), rgba(220,252,231,0.96), rgba(34,197,94,0));
}

@media (max-width: 860px) {
  #battleScreen.arena-battle-screen {
    padding: 6px;
    background-attachment: scroll;
  }

  #battleScreen .arena-battle-shell {
    width: 100%;
    min-height: calc(100vh - 12px);
  }

  #battleScreen .arena-battle-header {
    width: 100%;
    margin-bottom: 8px;
    background:
      linear-gradient(90deg, rgba(2, 6, 23, 0.76), rgba(15, 23, 42, 0.66), rgba(2, 6, 23, 0.76));
  }

  #battleScreen .arena-side,
  #battleScreen .arena-battle-center,
  #battleScreen .arena-battle-panel,
  #battleScreen .arena-battle-rewards {
    backdrop-filter: blur(3px) saturate(1.05);
    -webkit-backdrop-filter: blur(3px) saturate(1.05);
  }

  #battleScreen .arena-side {
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0.44), rgba(2, 6, 23, 0.70)),
      radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.07), transparent 58%);
  }

  #battleScreen .arena-battle-center {
    background:
      radial-gradient(circle at 50% 38%, rgba(251, 191, 36, 0.18), transparent 33%),
      linear-gradient(180deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.64));
  }

  #battleScreen .arena-battle-panel,
  #battleScreen .arena-battle-rewards {
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.74));
  }

  #battleScreen .arena-exit-btn {
    width: min(100%, 240px);
  }
}


/* ========== ARENA VISUAL POLISH V2: impactos, robo de vida y sellos ========== */
#battleScreen .arena-battle-shell {
  background:
    linear-gradient(180deg, rgba(7, 12, 26, 0.52), rgba(2, 6, 23, 0.42)),
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.16), transparent 46%);
  backdrop-filter: blur(2px) saturate(1.06);
}

#battleScreen .arena-battle-header,
#battleScreen .arena-side,
#battleScreen .arena-battle-center,
#battleScreen .arena-battle-panel,
#battleScreen .arena-battle-rewards {
  backdrop-filter: blur(5px) saturate(1.08);
}

#battleScreen .arena-battle-stage::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(251, 191, 36, 0.12), transparent 18%),
    linear-gradient(90deg, rgba(34,197,94,0.06), transparent 32%, transparent 68%, rgba(248,113,113,0.06));
  opacity: 0.72;
  transition: opacity 0.18s ease, filter 0.18s ease;
}

#battleScreen .arena-side,
#battleScreen .arena-battle-center,
#battleScreen .arena-battle-fx-layer {
  z-index: 1;
}

#battleScreen .arena-stage-hit::before { filter: brightness(1.45); opacity: 0.95; }
#battleScreen .arena-stage-crit::before { filter: brightness(1.85) saturate(1.35); opacity: 1; }
#battleScreen .arena-stage-block::before { filter: hue-rotate(115deg) brightness(1.65); opacity: 1; }
#battleScreen .arena-stage-life::before { filter: hue-rotate(65deg) brightness(1.65); opacity: 1; }
#battleScreen .arena-stage-death::before { filter: hue-rotate(-80deg) brightness(0.82) saturate(1.45); opacity: 1; }

#battleScreen .arena-center-event.event-hit {
  border-color: rgba(251, 191, 36, 0.48);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.18), inset 0 0 18px rgba(113, 63, 18, 0.20);
}
#battleScreen .arena-center-event.event-hit .arena-center-event-kicker,
#battleScreen .arena-center-event.event-hit strong {
  color: #f8d77a;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.52);
}
#battleScreen .arena-center-event.event-round,
#battleScreen .arena-center-event.event-draw {
  border-color: rgba(196, 181, 253, 0.46);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.18), inset 0 0 18px rgba(30, 41, 59, 0.28);
}
#battleScreen .arena-center-event.event-round strong,
#battleScreen .arena-center-event.event-draw strong { color: #c4b5fd; }

#battleScreen .arena-fighter-card.attack-windup {
  transform: translateY(-4px) scale(1.035);
  filter: brightness(1.22) saturate(1.1);
}

#battleScreen .arena-fighter-card.life-siphon-arrival {
  animation: arenaLifeArrival 0.72s ease-out both;
}

#battleScreen .arena-impact-slash {
  position: absolute;
  height: 3px;
  border-radius: 999px;
  transform-origin: left center;
  transform: rotate(var(--rot, 0deg)) scaleX(0.08);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(248,250,252,0.95), rgba(251,191,36,0.72), rgba(255,255,255,0));
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.85));
  animation: arenaImpactSlash 0.44s cubic-bezier(.2,.9,.2,1) forwards;
  pointer-events: none;
  z-index: 28;
}
#battleScreen .arena-impact-slash.crit {
  height: 5px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(254,202,202,0.98), rgba(251,191,36,0.96), rgba(239,68,68,0.68), rgba(255,255,255,0));
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.95)) drop-shadow(0 0 18px rgba(248, 113, 113, 0.68));
  animation-duration: 0.52s;
}
#battleScreen .arena-impact-slash.block {
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(186,230,253,0.95), rgba(56,189,248,0.88), rgba(255,255,255,0));
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.88));
}

#battleScreen .arena-impact-shock {
  position: absolute;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.48), inset 0 0 18px rgba(251, 191, 36, 0.20);
  animation: arenaImpactShock 0.48s ease-out forwards;
  pointer-events: none;
  z-index: 29;
}
#battleScreen .arena-impact-shock.crit {
  width: 48px;
  height: 48px;
  margin-left: -24px;
  margin-top: -24px;
  border-color: rgba(248, 113, 113, 0.86);
  box-shadow: 0 0 20px rgba(248, 113, 113, 0.74), inset 0 0 22px rgba(251, 191, 36, 0.30);
}
#battleScreen .arena-impact-shock.block {
  border-color: rgba(56, 189, 248, 0.92);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.74), inset 0 0 22px rgba(56, 189, 248, 0.30);
}

#battleScreen .arena-crit-burst {
  position: absolute;
  width: 88px;
  height: 88px;
  margin-left: -44px;
  margin-top: -44px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(254, 249, 195, 0.96) 0%, rgba(251, 191, 36, 0.56) 22%, rgba(248, 113, 113, 0.30) 42%, transparent 70%);
  mix-blend-mode: screen;
  animation: arenaCritBurst 0.62s ease-out forwards;
  pointer-events: none;
  z-index: 30;
}
#battleScreen .arena-crit-shard {
  position: absolute;
  width: 22px;
  height: 4px;
  margin-left: -11px;
  margin-top: -2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(254, 249, 195, 0), #fef3c7, #fb7185, rgba(254, 249, 195, 0));
  box-shadow: 0 0 11px rgba(251, 191, 36, 0.84), 0 0 18px rgba(248, 113, 113, 0.54);
  transform: rotate(var(--rot, 0deg));
  animation: arenaCritShard 0.68s ease-out forwards;
  pointer-events: none;
  z-index: 31;
}

#battleScreen .arena-block-wave {
  position: absolute;
  width: 92px;
  height: 92px;
  margin-left: -46px;
  margin-top: -46px;
  border-radius: 50%;
  border: 2px solid rgba(125, 211, 252, 0.96);
  background: radial-gradient(circle, rgba(56,189,248,0.20), transparent 62%);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.58), inset 0 0 22px rgba(56, 189, 248, 0.22);
  animation: arenaBlockWave 0.68s ease-out forwards;
  pointer-events: none;
  z-index: 30;
}
#battleScreen .arena-block-rune {
  position: absolute;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: -19px;
  margin-top: -19px;
  color: #bae6fd;
  font-size: 1.3rem;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.92);
  animation: arenaBlockRune 0.68s ease-out forwards;
  pointer-events: none;
  z-index: 31;
}

#battleScreen .arena-death-veil {
  position: absolute;
  width: 108px;
  height: 108px;
  margin-left: -54px;
  margin-top: -54px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(88, 28, 135, 0.46) 36%, rgba(127, 29, 29, 0.28) 56%, transparent 74%);
  box-shadow: 0 0 28px rgba(88, 28, 135, 0.48), inset 0 0 30px rgba(0, 0, 0, 0.58);
  animation: arenaDeathVeil 0.92s ease-out forwards;
  pointer-events: none;
  z-index: 29;
}
#battleScreen .arena-soul-fragment {
  position: absolute;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  margin-top: -3px;
  border-radius: 50%;
  background: radial-gradient(circle, #ddd6fe, #a855f7 42%, rgba(168,85,247,0) 78%);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.9);
  animation: arenaSoulFragment 0.94s ease-out forwards;
  pointer-events: none;
  z-index: 30;
}

#battleScreen .arena-life-particle.arc {
  width: 9px;
  height: 9px;
  background: radial-gradient(circle, #f0fdf4 0%, #86efac 34%, #22c55e 58%, rgba(34, 197, 94, 0.0) 76%);
  box-shadow: 0 0 14px #22c55e, 0 0 28px rgba(34, 197, 94, 0.78);
  animation-name: arenaLifeParticleArc;
  z-index: 32;
}
#battleScreen .arena-life-tether.enhanced {
  height: 3px;
  background: linear-gradient(90deg, rgba(34,197,94,0), rgba(220,252,231,0.98), rgba(34,197,94,0.75), rgba(34,197,94,0));
  filter: drop-shadow(0 0 9px #22c55e) drop-shadow(0 0 18px rgba(34, 197, 94, 0.68));
  animation-duration: 0.68s;
  z-index: 31;
}

#battleScreen .arena-floating-number {
  letter-spacing: 0.02em;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.95));
}
#battleScreen .arena-floating-number.heal {
  font-size: 1.32rem;
}
#battleScreen .arena-floating-number.crit {
  font-size: 1.62rem;
}

#battleScreen .arena-final-seal {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(42vw, 420px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 22;
  opacity: 0;
  background: radial-gradient(circle, rgba(251,191,36,0.32), rgba(124,58,237,0.16) 42%, transparent 70%);
  border: 1px solid rgba(251,191,36,0.34);
  box-shadow: 0 0 50px rgba(251,191,36,0.24), inset 0 0 38px rgba(124,58,237,0.20);
  animation: arenaFinalSeal 1.05s ease-out forwards;
}
#battleScreen .arena-final-seal.defeat {
  background: radial-gradient(circle, rgba(248,113,113,0.22), rgba(88,28,135,0.18) 42%, transparent 70%);
  border-color: rgba(248,113,113,0.34);
  box-shadow: 0 0 50px rgba(248,113,113,0.20), inset 0 0 38px rgba(88,28,135,0.20);
}
#battleScreen .arena-final-seal.draw {
  background: radial-gradient(circle, rgba(196,181,253,0.22), rgba(56,189,248,0.12) 42%, transparent 70%);
  border-color: rgba(196,181,253,0.32);
}

#battleScreen .arena-log-row {
  animation: arenaLogEntry 0.22s ease-out both;
}

@keyframes arenaImpactSlash {
  0% { opacity: 0; transform: rotate(var(--rot, 0deg)) scaleX(0.08); }
  18% { opacity: 1; }
  82% { opacity: 0.92; transform: rotate(var(--rot, 0deg)) scaleX(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--rot, 0deg)) scaleX(0.18); }
}

@keyframes arenaImpactShock {
  0% { opacity: 0; transform: scale(0.35) rotate(0deg); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.72) rotate(18deg); }
}

@keyframes arenaCritBurst {
  0% { opacity: 0; transform: scale(0.28); filter: blur(0); }
  18% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1.75); filter: blur(4px); }
}

@keyframes arenaCritShard {
  0% { opacity: 0; transform: translate(0, 0) rotate(var(--rot, 0deg)) scaleX(0.4); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)) rotate(var(--rot, 0deg)) scaleX(1.18); }
}

@keyframes arenaBlockWave {
  0% { opacity: 0; transform: scale(0.45); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.42); }
}

@keyframes arenaBlockRune {
  0% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  25% { opacity: 1; transform: scale(1.05) rotate(45deg); }
  100% { opacity: 0; transform: scale(1.32) rotate(135deg); }
}

@keyframes arenaDeathVeil {
  0% { opacity: 0; transform: scale(0.58); filter: blur(0); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.55); filter: blur(7px); }
}

@keyframes arenaSoulFragment {
  0% { opacity: 0; transform: translate(0, 0) scale(0.62); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(1.18); }
}

@keyframes arenaLifeParticleArc {
  0% { opacity: 0; transform: translate(0, 0) scale(0.45); }
  12% { opacity: 1; }
  54% { opacity: 0.98; transform: translate(var(--mx), var(--my)) scale(1.1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.62); }
}

@keyframes arenaLifeArrival {
  0% { filter: brightness(1); box-shadow: inherit; }
  38% { filter: brightness(1.45) saturate(1.25); box-shadow: 0 0 34px rgba(34,197,94,0.62), inset 0 0 24px rgba(20,83,45,0.28); }
  100% { filter: brightness(1); }
}

@keyframes arenaFinalSeal {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.56) rotate(0deg); filter: blur(2px); }
  18% { opacity: 0.72; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25) rotate(48deg); filter: blur(7px); }
}

@keyframes arenaLogEntry {
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  #battleScreen .arena-impact-slash { height: 2px; }
  #battleScreen .arena-impact-shock { width: 28px; height: 28px; margin-left: -14px; margin-top: -14px; }
  #battleScreen .arena-crit-burst { width: 68px; height: 68px; margin-left: -34px; margin-top: -34px; }
  #battleScreen .arena-block-wave { width: 72px; height: 72px; margin-left: -36px; margin-top: -36px; }
  #battleScreen .arena-final-seal { width: min(76vw, 310px); }
}
