/* CSS ÉPICO PARA GENSHIN IMPACT */
/* ===== CONTENEDOR PRINCIPAL ===== */
.genshin-section {
  background: rgba(20, 20, 30, 0.8);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 0 30px rgba(100, 150, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  overflow: hidden;
  position: relative;
}

.genshin-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff9c34, #ff3d3d, #a162e8, #5a9cf8, #47cfff);
}

/* ===== CABECERA ESTILO GENSHIN ===== */
.section-header {
  text-align: center;
  margin-bottom: 15px;
  position: relative;
}


.section-title {
  font-family: 'GenshinFont', sans-serif;
  color: #ffeb3b;
  text-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
  letter-spacing: 1px;
  margin: 0;
  font-size: 1.8rem;
  position: relative;
  display: inline-block;
}

.elemental-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 235, 59, 0.7), transparent);
  margin: 10px auto;
  width: 70%;
}

/* ===== CONTENEDOR DE PERSONAJES ===== */
.scroll-personajes {
  height: calc(100% - 90px); /* Calcula espacio entre header y footer */
  overflow-y: auto;
  padding-right: 8px;
}


/* Estilo de la barra de scroll */
.scroll-personajes::-webkit-scrollbar {
  width: 6px;
}

.scroll-personajes::-webkit-scrollbar-thumb {
  background: linear-gradient(#ff9c34, #a162e8);
  border-radius: 10px;
}

/* ===== GRID DE PERSONAJES ===== */
#personajes-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  padding: 5px;
}

/* ===== TARJETAS DE PERSONAJES EPICAS ===== */
.personaje-card {
  background: linear-gradient(145deg, #2a2a3a, #1e1e2a);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.personaje-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  transform: rotate(30deg);
  transition: all 0.5s ease;
  opacity: 0;
}

.personaje-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 215, 0, 0.3);
}

.personaje-card:hover::before {
  opacity: 1;
  animation: shine 1.5s infinite;
}

@keyframes shine {
  0% { transform: rotate(30deg) translate(-10%, -10%); }
  100% { transform: rotate(30deg) translate(10%, 10%); }
}

.personaje-card.seleccionado {
  border: 2px solid #ffeb3b;
  box-shadow: 0 0 20px rgba(255, 235, 59, 0.5);
  animation: pulse-gold 1.5s infinite;
}

@keyframes pulse-gold {
  0% { box-shadow: 0 0 10px rgba(255, 235, 59, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 235, 59, 0.8); }
  100% { box-shadow: 0 0 10px rgba(255, 235, 59, 0.5); }
}

/* ===== IMAGEN DEL PERSONAJE ===== */
.personaje-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a25;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.personaje-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.personaje-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.personaje-card:hover .personaje-img {
  transform: scale(1.1);
}

/* ===== NOMBRE DEL PERSONAJE ===== */
.personaje-nombre {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin: 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 1;
}

/* ===== EFECTO DE VISIÓN ===== */
.vision-effect {
  height: 3px;
  background: linear-gradient(90deg, #ff9c34, #ff3d3d, #a162e8, #5a9cf8, #47cfff);
  margin-top: 20px;
  border-radius: 3px;
  animation: vision-glow 4s infinite alternate;
}

.etiqueta-nuevo {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(45deg, #ffe600, #ff9900);
  color: #000;
  font-weight: bold;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  box-shadow: 0 0 5px #ffc107;
  z-index: 5;
  pointer-events: none;
  animation: aparecerNuevo 0.5s ease-out;
}

@keyframes aparecerNuevo {
  0%   { opacity: 0; transform: scale(0.8) translateY(-10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes vision-glow {
  0% { opacity: 0.5; }
  100% { opacity: 1; box-shadow: 0 0 10px rgba(100, 200, 255, 0.7); }
}

/* ===== RESPONSIVE ===== */
@media (min-width: 576px) {
  #personajes-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

@media (min-width: 768px) {
  #personajes-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .section-title { font-size: 2rem; }
}