/* ======================================================
   SLIDER ANIMES · OPMYA 2026
   ====================================================== */

.anime-slider{
  position: relative;
  margin: 0;
}

/* ===== CABECERA ===== */

.anime-slider__header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 6px;
}

/* ===== BARRA CARGA ===== */

.anime-slider__progress{
  height:3px;
  width:100%;
  background:linear-gradient(
    90deg,
    var(--accent),
    rgba(255,255,255,.1),
    var(--accent)
  );
  background-size:200% 100%;
  animation: loadbar 1.2s linear infinite;
  margin-bottom:10px;
}

@keyframes loadbar{
  from{ background-position:0 0; }
  to{ background-position:200% 0; }
}

/* ===== VIEWPORT ===== */

.anime-slider__viewport{
  position: relative;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  padding: 20px 52px 40px 52px;
  margin-bottom: 5px;
  margin-left: 25px;
  margin-right: 25px;
}

/* ocultar scrollbar feo */
.anime-slider__viewport::-webkit-scrollbar{
  height:8px;
}
.anime-slider__viewport::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.25);
  border-radius:10px;
}


/* ===== TRACK ===== */

.anime-slider__track{
  display:flex;
  gap:16px;
}

/* ===== FLECHAS LATERALES ===== */

.anime-slider__nav{
  pointer-events:none;
}

.slider-btn{
  pointer-events:auto;
  position:absolute;
  top: 19%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border-radius:50%;
  border:2px solid var(--accent);
  background:rgba(0,0,0,.55);
  color:var(--accent);
  font-size:22px;
  cursor:pointer;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:center;
  backdrop-filter: blur(6px);
  transition:background .2s ease, transform .15s ease;
}

.slider-btn:hover{
  background:var(--accent);
  color:#000;
  transform:translateY(-50%) scale(1.08);
}

.slider-btn.prev{ left:6px; }
.slider-btn.next{ right:6px; }

/* ===== CARD ===== */

.anime-card{
  min-width:160px;
  max-width:160px;
  color:inherit;
  text-decoration:none;
  scroll-snap-align:start;
}

/* ===== MEDIA ===== */

.anime-card__media{
  position:relative;
}

.anime-card__media img{
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:14px;
}

/* ===== BADGE ===== */

.anime-badge{
  position:absolute;
  top:8px;
  left:8px;
  padding:4px 8px;
  font-size:11px;
  border-radius:8px;
  background:#000;
  color:#fff;
}

/* ===== FLAGS ===== */

.anime-card__flags{
  position:absolute;
  bottom:8px;
  left:8px;
  display:flex;
  gap:4px;
}

.anime-card__flags img{
  width:22px;
  height:14px;
  border-radius:3px;
}

/* ===== STATS ===== */

.anime-card__stats{
  font-size:12px;
  margin-top:4px;
  color:var(--accent);
  text-align:center;
}

/* ===== INFO ===== */

.anime-card__info{
  margin-top:2px;
  text-align:center;
  font-size:13px;
}

/* ======================================================
   RESPONSIVE
   ====================================================== */

@media (max-width: 768px){
   

  .slider-btn{
    width:36px;
    height:36px;
    font-size:18px;
  }
}

@media (max-width: 480px){
   

  .anime-card{
    min-width:140px;
    max-width:140px;
  }


}

/* ======================================================
   EFECTOS VISUALES POR TIPO
   ====================================================== */

/* ===== MANGA: Blanco y negro ===== */
.anime-card.type-manga .anime-card__media img{
  filter: grayscale(100%) contrast(1.05);
  transition: filter .25s ease;
}

/* Al hover vuelve un poco el color */
.anime-card.type-manga:hover .anime-card__media img{
  filter: grayscale(30%) contrast(1.1);
}

/* ===== PELÍCULA: Marco dorado ===== */
.anime-card.type-pelicula .anime-card__media img{
  box-shadow:
    0 0 0 2px #d4af37,
    0 0 12px rgba(212,175,55,.45);
}

/* ======================================================
   HOVER GLOBAL (ILUMINAR CARD)
   ====================================================== */

.anime-card{
  transition:
    transform .18s ease,
    box-shadow .2s ease,
    filter .2s ease;
}

/* Iluminación clara al pasar por encima */
.anime-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 5px 5px white;
  border-radius: 15px;
  background: #ffffff17;
  color: white;
}

/* Refuerzo visual del poster */
.anime-card:hover .anime-card__media img{
  box-shadow:
    0 0 0 2px var(--accent),
    0 0 18px rgba(0,255,120,.35);
}

/* En móvil: sin efectos agresivos */
@media (max-width: 768px){
  .anime-card:hover{
    transform: none;
    box-shadow: none;
  }

  .anime-card:hover .anime-card__media img{
    box-shadow: none;
  }
}


/* ======================================================
   BADGES POR TIPO (RECUPERAR COLORES)
   ====================================================== */

.anime-badge.anime{
  background: linear-gradient(135deg, #00d2ff, #3a7bd5);
  color: #fff;
  border: 1px solid white;
}

.anime-badge.manga{
  background: linear-gradient(135deg, #555, #222);
  color: #fff;
  border: 1px solid white;
}

.anime-badge.pelicula{
  background: linear-gradient(135deg, #f7c948, #d4af37);
  color: #000;
  font-weight: 700;
  border: 1px solid white;
}

/* ======================================================
   FIX BADGES (NO TAPADOS POR LA IMAGEN)
   ====================================================== */

.anime-card__media img{
  position: relative;
  z-index: 1;
}

.anime-badge{
  position: absolute;
  z-index: 3;
}

/* ======================================================
   ESTADO VACÍO · ESTRENOS
   ====================================================== */

.anime-slider__empty {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0px 0px 20px 0px;
  width: 97%;
  margin-top: 250px;
}

@media (max-width: 1059px){
   .anime-slider__empty {
     margin: 0 auto;
   }
}

.empty-estrenos {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;

  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(100, 255, 100, 0.35);
  border-radius: 16px;

  color:#FF5D43;
  font-size: 16px;
  font-weight: 500;
  margin-top: -300px;
}

/* responsive */
@media (max-width: 768px) {
  .empty-estrenos {
    margin-top: -60px;
  }
}

.empty-estrenos__icon {
  font-size: 26px;
  opacity: 0.9;
}

.empty-estrenos__text {
  line-height: 1.4;
}

/* ======================================================
   PANEL RANKING
====================================================== */

.panel-ranking {
  padding: 20px 24px 28px;
}

/* título centrado */
.panel-ranking .panel-title {
  text-align: center;
  margin-bottom: 18px;
  font-size: 22px;
  color: var(--accent);
}

/* wrapper para centrar tabla */
.ranking-wrap {
  display: flex;
  justify-content: center;
}

/* ===== TABLA ===== */

.ranking {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  font-size: 15px;
}

/* cabecera */
.ranking thead th {
  padding: 10px 12px;
  text-align: left;
  color: #baffba;
  border-bottom: 2px solid rgba(100,255,100,.35);
  font-weight: 600;
}

/* filas */
.ranking tbody tr {
  transition: background .2s ease, transform .15s ease;
}

.ranking tbody tr:hover {
  background: rgba(255,255,255,.05);
  transform: scale(1.01);
}

/* celdas */
.ranking td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ===== COLUMNAS ===== */

.rank-pos {
  width: 40px;
  text-align: center;
  font-weight: 700;
  color: var(--accent);
}

/* Ocultar número original SOLO para top 3 */
.ranking tbody tr:nth-child(-n+3) .rank-pos {
  font-size: 0;
}

/* 🥇 ORO */
.ranking tbody tr:nth-child(1) .rank-pos::before {
  content: "🥇";
  font-size: 60px;
}

/* 🥈 PLATA */
.ranking tbody tr:nth-child(2) .rank-pos::before {
  content: "🥈";
  font-size: 50px;
}

/* 🥉 BRONCE */
.ranking tbody tr:nth-child(3) .rank-pos::before {
  content: "🥉";
  font-size: 40px;
}


.rank-anime {
  font-weight: 600;
}

.rank-genre {
  color: #9bdc9b;
  font-size: 14px;
}

.rank-visits {
  text-align: right;
  font-weight: 700;
  color: #ffffff;
}

/* responsive */
@media (max-width: 768px) {
  .ranking {
    font-size: 14px;
  }
}

/* ===== ESTRELLAS BASE (ESCRITORIO) ===== */

.rating .star-icon{
  width:40px;
  height:40px;
  fill:#666;
  transition: fill .15s ease, transform .15s ease;
  cursor: pointer;
}

.rating .star.active .star-icon{
  fill: gold;
}

.rating .star.active .star-icon:hover{
  cursor: pointer;
}
.rating .star:hover .star-icon{
  fill: white;
}

/* ======================================================
   RANKING MODO MÓVIL COMPLETO
====================================================== */

@media (max-width: 768px){

  #estrenos_panel{
    margin-top: 0px;
  }

  .rating .star-icon{
    width:40px;
    height:40px;
  }

  /* Quitar cabecera clásica */
  .ranking thead{
    display:none;
  }

  /* Cada fila se convierte en tarjeta */
  .ranking tbody tr{
    display:block;
    width:100%;
    margin-bottom:18px;
    padding:16px;
    border-radius:16px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
  }

  /* Celdas como bloques */
  .ranking td{
    display:block;
    width:100%;
    padding:6px 0;
    border:none;
    text-align: center;
  }

  /* Posición arriba */
  .rank-pos{
    font-size:18px;
    font-weight:800;
    margin-bottom:4px;
  }

  /* Nombre grande */
  .rank-anime{
    font-size:18px;
    font-weight:700;
    margin-bottom:6px;
  }

  /* Género + visitas juntos arriba de estrellas */
  .rank-genre,
  .rank-visits{
    display:inline-block;
    font-size:14px;
    margin-right:14px;
    margin-bottom:6px;
  }

  .rank-visits{
    font-weight:700;
    color:#fff;
  }

  /* Forzar que aparezcan antes de las estrellas */
  .rank-genre{
    order:2;
  }

  .rank-genre:before { content: "Género: ";}
  .rank-visits:before { content: "Visitas: ";}

  /* Bloque rating separado */
  .rating{
    margin-top:8px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
  }

  .rating .star{
    margin-right:4px;
  }
  .stars{
    margin: 0 auto;
  }

  /* Texto de votos debajo */
  .rating-value{
    font-size:15px;
    margin: 6px auto 0 auto;
  }

}


.ranking-img{
    width:100%;
    max-width:600px;
    height:auto;
    display:block;
    margin:0 auto 20px auto;
} { content: "Género: ";}
  .rank-visits:before { content: "Visitas: ";}

  /* Bloque rating separado */
  .rating{
    margin-top:8px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
  }

  .rating .star{
    margin-right:4px;
  }
  .stars{
    margin: 0 auto;
  }

  /* Texto de votos debajo */
  .rating-value{
    font-size:15px;
    margin: 6px auto 0 auto;
  }

}


.ranking-img{
    width:100%;
    max-width:600px;
    height:auto;
    display:block;
    margin:0 auto 20px auto;
}