/***************************************************************************************
    RESETEO Y BASE
****************************************************************************************/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #f4f4f4;
  color: #333;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/***************************************************************************************
    HEADER Y NAVEGACIÓN PRINCIPAL
****************************************************************************************/

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #8c52ff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 60px;
  transition: height 0.3s ease;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.logo img:hover {
  transform: rotateY(360deg);
}

/***************************************************************************************
    MENÚ DE NAVEGACIÓN (DESKTOP)
****************************************************************************************/

.menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  position: relative;
}

.nav-links li {
  position: relative;
}

.nav-links li a {
  padding: 8px 15px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links li a:hover {
  background-color: #fff;
  color: #8c52ff;
}

/***************************************************************************************
    DROPDOWN MENUS
****************************************************************************************/

.dropdown-menu,
.dropdown-submenu {
  display: none;
  position: absolute;
  background-color: #ffffff;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  top: 100%;
  left: 0;
  list-style: none;
  padding: 5px 0;
  z-index: 10;
}

.dropdown:hover > .dropdown-menu {
  display: block;
}

.dropdown-menu li:hover > .dropdown-submenu {
  display: block;
}

.dropdown-menu li {
  padding: 5px 20px;
}

.dropdown-submenu {
  top: 0;
  left: 100%;
}

.dropdown-menu li a {
  text-decoration: none;
  color: #333;
}

.dropdown-menu li a:hover {
  background-color: #8c52ff;
  color: white;
}

.dropdown-menu li,
.dropdown-submenu li,
.nav-links li {
  list-style: none;
}

/***************************************************************************************
    BUSCADOR (HEADER)
****************************************************************************************/

.search-bar {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 200px;
}

.search-bar input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 8px;
  border: 2px solid #ccc;
  outline: none;
  box-sizing: border-box;
  text-align: left;
}

.search-bar input:focus {
  border-color: #8c52ff;
}

.suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  max-height: 120px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.suggestion-item {
  padding: 4px 8px;
  cursor: pointer;
  color: #333;
  transition: background-color 0.2s ease;
}

.suggestion-item:hover {
  background-color: #8c52ff;
  color: #fff;
}

/***************************************************************************************
    MENÚ HAMBURGUESA (MOBILE)
****************************************************************************************/

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger .bar {
  width: 25px;
  height: 4px;
  background-color: #fff;
}

/***************************************************************************************
    MENÚ CON LOGOS EN SUBMENÚ
****************************************************************************************/

.menu-logo {
  height: 40px;
  width: auto;
  margin: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 5px;
}

.submenu-logo {
  height: 30px;
  width: auto;
  margin: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 5px;
}

.menu-logo:hover,
.submenu-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px #8c52ff;
}

.dropdown-menu li a.logo-item:hover,
.nav-links li a.logo-item:hover {
  background-color: transparent;
}

.dropdown-menu img,
.dropdown-submenu img {
  margin: 5px auto;
  display: block;
}

/***************************************************************************************
    SELECCIÓN DE IDIOMA
****************************************************************************************/

.language-selector {
  position: relative;
  display: inline-block;
}

#lang-btn {
  border: none;
  background: none;
  font-weight: bold;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  padding: 5px;
  transition: color 0.2s ease;
}

#lang-btn:hover {
  color: #8c52ff;
}

.lang-menu {
  display: none;
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  padding: 5px;
}

.lang-menu li {
  list-style: none;
  padding: 5px;
}

.lang-menu li a {
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  padding: 5px;
  display: block;
  transition: color 0.2s ease;
}

.lang-menu li a:hover {
  color: #8c52ff;
}

.language-selector:hover .lang-menu {
  display: block;
}

/***************************************************************************************
    BANNERS DE SECCIONES
****************************************************************************************/

/* Compensación del header fijo */
.ps5-page,
.anime-page {
  padding-top: 80px;
}

/* Estilos base de cabeceras con banner */
.cine-header,
.ps2-header,
.ps5-header,
.switch-header,
.xboxone-header,
.anime-header {
  position: relative;
  text-align: center;
  padding: 2rem;
  background-size: cover;
  background-color: #8c52ff;
  color: white;
}

/* Overlay púrpura */
.cine-header::after,
.ps2-header::after,
.ps5-header::after,
.switch-header::after,
.xboxone-header::after,
.anime-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(128, 0, 128, 0.3);
  z-index: 1;
}

/* Asegurar que el texto queda por encima del overlay */
.cine-header h1, .cine-header p,
.ps2-header h1, .ps2-header p,
.ps5-header h1, .ps5-header p,
.switch-header h1, .switch-header p,
.xboxone-header h1, .xboxone-header p,
.anime-header h1, .anime-header p {
  position: relative;
  z-index: 2;
}

/* Tamaños de tipografía */
.cine-header h1,
.ps2-header h1,
.ps5-header h1,
.switch-header h1,
.xboxone-header h1,
.anime-header h1 {
  font-size: 2.5rem;
  margin: 0;
}

.cine-header p,
.ps2-header p,
.ps5-header p,
.switch-header p,
.xboxone-header p,
.anime-header p {
  font-size: 1.2rem;
  margin: 10px 0;
}

/* Imágenes de fondo por sección */
.ps5-header {
  background: url("/assets/personajesps5.jpg") no-repeat center center;
}
.xboxone-header {
  background: url("/assets/xbox-banner.webp") no-repeat center center;
}
.ps2-header {
  background: url("/assets/banner-ps2.webp") no-repeat center center;
}
.switch-header {
  background: url("/assets/switch-baanner.webp") no-repeat center center;
}
.cine-header {
  background: url("/assets/pelis.jpg") no-repeat center center;
}
.anime-header {
  background: url("/assets/anime/anime.jpg") no-repeat center center; /* <-- pon tu imagen */
}



/***************************************************************************************
    FILTROS Y TABLA DE CINE
****************************************************************************************/

.filters {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.games-list {
  width: 90%;
  margin: 20px auto;
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px; /* Para que quepan las columnas cómodas */
}

table td,
table th {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
}

table th {
  background-color: #8c52ff;
  color: white;
  font-weight: bold;
}

table tr:hover {
  background-color: #f3f3f3;
}

/* Título con póster */
.poster-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.poster-thumb {
  width: 200px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
}

.poster-title {
  font-weight: bold;
  font-size: 1rem;
  color: #8c52ff;
}

/* NUEVO: Redactores en tabla (badges) */
.redactores-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.redactor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #f0e9ff;
  color: #5b2cd3;
  border: 1px solid #d9c9ff;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.redactor-badge img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}

/***************************************************************************************
    MOVIES CARDS (RESPONSIVE)
****************************************************************************************/

.movies-cards {
  display: none; /* Oculto en desktop */
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 20px;
}

.movie-card {
  background-color: #8c52ff;
  color: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 350px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Ajuste específico para estrellas dentro de las movie-cards (responsive) */
.movies-cards .movie-card .star-rating .star {
  font-size: 18px;
  color: white;
}

.movies-cards .movie-card .star-rating .star.filled {
  color: gold;
}

.movies-cards .movie-card .star-rating .star.half-filled {
  background: linear-gradient(90deg, gold 50%, white 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.movie-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-poster {
  width: 100%;
  height: auto;
  display: block;
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin-bottom: 10px;
}

.movie-info p {
  font-size: 0.95rem;
  margin-bottom: 5px;
}

/* NUEVO: Redactores en card (nombres + avatares) */
.card-redactores {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.card-redactores .avatars {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-redactores .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  object-fit: cover;
}

.card-redactores .names {
  font-weight: 600;
}

/* Efecto 3D + flotante + resplandor neon */
.movie-card {
  transition: transform 1s cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 1s cubic-bezier(0.25, 0.1, 0.25, 1);
  transform: perspective(1000px) scale(1) translateY(0);
}

@keyframes floatCard {
  0% {
    transform: perspective(1000px) scale(1.06) translateY(-4px);
  }
  50% {
    transform: perspective(1000px) scale(1.06) translateY(-14px);
  }
  100% {
    transform: perspective(1000px) scale(1.06) translateY(-4px);
  }
}

.movie-card.active-card {
  animation: floatCard 6s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(140, 82, 255, 0.5), 0 0 35px rgba(140, 82, 255, 0.2);
  z-index: 5;
}

/***************************************************************************************
    ESTRELLAS
****************************************************************************************/

.star-rating {
  display: flex;
}

.star {
  color: #ddd;
  font-size: 20px;
}

.star.filled {
  color: #8c52ff;
}

.star.half-filled {
  background: linear-gradient(90deg, #8c52ff 50%, #ddd 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/***************************************************************************************
    FOOTER
****************************************************************************************/

footer {
  background-color: #8c52ff;
  color: white;
  padding: 40px 20px;
  text-align: center;
  font-family: "Arial", sans-serif;
  box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.2);
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: auto;
}

footer a {
  color: #f4f4f9;
  text-decoration: dotted;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo img {
  height: 60px;
  margin-bottom: 15px;
  opacity: 0.9;
}

.footer-socials {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 25px;
}

.footer-socials img {
  width: 30px;
  transition: transform 0.1s ease, opacity 0.3s ease;
}

.footer-socials a:hover img {
  transform: scale(1.2);
  opacity: 0.7;
}

.footer-bottom {
  font-size: 14px;
  opacity: 0.8;
}

/***************************************************************************************
    ELEMENTOS GENÉRICOS
****************************************************************************************/

section {
  margin: 40px 0;
}

input[type="text"] {
  padding: 10px;
  width: 250px;
  border-radius: 5px;
  border: 1px solid #ddd;
}

button {
  padding: 10px 20px;
  border: none;
  background-color: #8c52ff;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #7e4ccd;
}

.oculto {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/***************************************************************************************
    RESPONSIVE
****************************************************************************************/

@media (max-width: 768px) {
  .games-list {
    display: none;
  }
  .movies-cards {
    display: flex;
  }

  .menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    background-color: #ffffff;
    position: absolute;
    top: 70px;
    left: 0;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .menu.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    display: block;
    padding: 10px;
    text-align: left;
    width: 100%;
    color: #333;
    background-color: #fff;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: background-color 0.3s ease;
  }

  .nav-links li a:hover {
    background-color: #8c52ff;
    color: #fff;
  }

  .dropdown-menu,
  .dropdown-submenu {
    display: none;
    position: static;
    background-color: #f9f9f9;
    margin-left: 20px;
    padding: 0;
  }

  .dropdown-menu li:hover > .dropdown-submenu,
  .dropdown:hover > .dropdown-menu {
    display: block;
  }

  .dropdown-menu li,
  .dropdown-submenu li {
    padding: 8px 10px;
  }

  .dropdown-menu li a,
  .dropdown-submenu li a {
    padding: 8px;
    text-align: left;
    color: #333;
  }

  .dropdown-menu li a:hover,
  .dropdown-submenu li a:hover {
    background-color: #8c52ff;
    color: white;
  }

  .nav-links li .dropdown-menu {
    margin-left: 15px;
    background-color: #f0f0f0;
  }

  .dropdown-submenu {
    margin-left: 30px;
    background-color: #d0d0d0;
  }

  .menu-logo,
  .submenu-logo {
    height: 25px;
  }

  .nav-links li a {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .filters {
    flex-direction: column;
    align-items: center;
  }

  .filters input,
  .filters select {
    width: 100%;
    margin-bottom: 10px;
  }

  table td,
  table th {
    font-size: 0.9rem;
  }

  .ps5-page {
    padding: 80px 10px 50px;
  }

  #lang-btn {
    color: #000;
  }

  footer {
    padding: 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 10px;
    font-size: 0.8rem;
  }

  #lang-btn {
    color: #000;
  }
}

/*---------------------------PAGINACIÓN-----------------*/

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.page-numbers button,
.page-btn {
  background: #8c52ff;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.page-btn:hover {
  background: #6e3bd9;
}

.page-btn.active {
  background: #333;
}






/* —— REDACTORES COMO CHIPS (tabla + móvil) —— */

/* Contenedor flexible para que se vayan a varias líneas si hace falta */
.redactores-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Píldora/chip del redactor */
.redactor-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0e9ff;         /* lila muy suave */
  border: 1px solid #d9c9ff;   /* borde suave */
  color: #4d2bb6;              /* violeta legible */
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
  font-weight: 600;
}

/* Un poco de aire vertical alrededor del bloque en móvil */
.movie-info .redactores-row {
  margin: 10px 0 12px;
}

/* Ajustes finos dentro de las cards (móvil) */
.movies-cards .movie-card .redactores-cell {
  gap: 10px;
}

/* Si tu tabla se quedaba justa, asegúrate de que la columna quepa bien */
.games-list table {
  min-width: 980px; /* súbelo si lo necesitas */
}
