/* --- VARIABLES & THEME --- */
:root {
  --primary: #E50914;
  /* Brand Red */
  --primary-hover: #b20710;
  --bg-dark: #141414;
  --bg-card: #181818;
  --bg-overlay: rgba(0, 0, 0, 0.85);
  --text-white: #ffffff;
  --text-gray: #b3b3b3;
  --gradient-hero: linear-gradient(to top, #141414 10%, transparent 100%);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --radius-md: 8px;
  --radius-lg: 16px;
  --font-main: 'Outfit', sans-serif;
  --subtitle-size: 100%; /* Variable para tamaño de subtítulos */
}

/* --- RESET & BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.5;
}

/* --- UTILITIES & HELPERS --- */
.container {
  width: 100%;
  max-width: 1600px; /* O un ancho máximo adecuado */
  margin: 0 auto;
  padding: 0 4%;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  transition: background-color 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(20, 20, 20, 0.95);
  padding: 0.8rem 4%;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: -1px;
}

.logo span {
  color: var(--primary);
}

/* Estilos para el nuevo icono del logo */
.logo .logo-icon,
.brand .logo-icon {
    height: 28px; /* Ajustado para ser más pequeño */
    width: auto;
    margin-right: 6px; /* Espaciado reducido */
    vertical-align: middle;
    transition: transform 0.3s ease, opacity 0.5s ease;
}

.logo,
.brand.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo:hover .logo-icon {
    transform: rotate(-10deg) scale(1.1);
}

.mobile-menu-header .logo .logo-icon {
    height: 24px;
}

.main-footer .logo .logo-icon,
.main-footer .brand .logo-icon {
    height: 32px;
}

.desktop-nav {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  color: var(--text-gray);
  font-weight: 500;
  font-size: 0.95rem;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--text-white);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 5px 15px;
  border: 1px solid transparent;
  transition: 0.3s;
}

.search-bar:focus-within {
  background: black;
  border-color: var(--primary);
}

.search-bar input {
  background: transparent;
  border: none;
  color: white;
  width: 150px;
  padding: 5px;
  outline: none;
  transition: width 0.3s;
}

.search-bar input:focus {
  width: 220px;
}

.search-bar button {
  color: var(--text-gray);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: white;
}

/* Mobile Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 300px;
  background: #1f1f1f;
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  /* Controlled by JS */
  max-height: 400px;
  overflow-y: auto;
}

/* --- HERO SECTION --- */
.hero-container {
  width: 100%;
  height: 80vh;
  /* PC */
  position: relative;
  background-color: #000;
}

.hero-section-inner {
  width: 100%;
  height: 100%;
}

.hero-container {
  background-size: cover;
  background-position: center;
  transition: background-image 0.5s ease-in-out;
}

/* Overlay gradient */
.hero-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(20, 20, 20, 0.4) 100%),
    linear-gradient(to top, #141414 5%, transparent 60%);
}

.hero-content {
  position: absolute;
  bottom: 20%;
  left: 4%;
  max-width: 600px;
  z-index: 10;
  animation: fadeUp 0.8s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-description {
  font-size: 1.1rem;
  color: #ddd;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
}

.hero-details {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  align-items: center;
}

.quality-badge {
  background: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
}

.hero-button {
  background: var(--text-white);
  color: black;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: 0.3s;
}

.hero-button:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.hero-indicators {
  position: absolute;
  right: 4%;
  bottom: 20%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
}

.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: 0.3s;
}

.indicator-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* --- MAIN CONTENT --- */
.content-container {
  position: relative;
  z-index: 10;
  /* Above Hero Gradient */
  padding-bottom: 4rem;
}

.content-row {
  margin-bottom: 2rem;
  padding-left: 4%;
}

.section-title-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
  padding-right: 4%;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e5e5e5;
  border-left: 4px solid var(--primary);
  padding-left: 10px;
}

.ver-mas-link {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

/* Horizontal Scroll / Carousel */
.carrusel-contenedor,
.horizontal-scroll {
  position: relative;
}

/* The grid generated by JS inside carrusel-contenedor is .movie-grid */
.movie-grid {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-behavior: smooth;
  /* Hide scrollbar but keep functionality */
  scrollbar-width: none;
}

.movie-grid::-webkit-scrollbar {
  display: none;
}

.movie-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 4%;
}

/* Styles provided for JS created arrows */
.carrusel-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-70%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  transition: 0.3s;
}

.carrusel-contenedor:hover .carrusel-flecha {
  opacity: 1;
}

.carrusel-flecha:hover {
  background: var(--primary);
}

.carrusel-flecha.izquierda {
  left: 10px;
}

.carrusel-flecha.derecha {
  right: 10px;
}

/* --- MOVIE CARD --- */
.movie-card {
  flex: 0 0 160px;
  position: relative;
  border-radius: var(--radius-md);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  background: #1a1a1a;
  animation: cardEntry 0.6s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

/* Skeleton Loading Effect */
.movie-card.loading {
  background: #222;
  pointer-events: none;
}

.movie-card.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.15),
      rgba(255, 255, 255, 0.08),
      transparent);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s infinite linear;
  z-index: 5;
}

.movie-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: opacity 0.4s ease, filter 0.3s ease;
  opacity: 1;
}

.movie-card.loading img {
  opacity: 0;
}

@keyframes skeletonShimmer {
  0% {
    background-position: -150% 0;
  }

  100% {
    background-position: 150% 0;
  }
}

@keyframes cardEntry {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.movie-grid-full .movie-card {
  width: 100%;
  flex: unset;
}

.movie-card:hover {
  transform: scale(1.05);
  z-index: 2;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}


.movie-card:hover img {
  filter: brightness(0.6);
}

.movie-card-info {
  padding: 10px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  opacity: 0;
  transition: 0.3s;
}

.movie-card:hover .movie-card-info {
  opacity: 1;
}

.movie-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-head {
  position: relative;
}

/* Card Tags */
.card-tag {
  position: absolute;
  top: 5px;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  z-index: 3;
}

.tag-tipo {
  left: 5px;
  top: 5px;
  background: var(--primary);
  /* Fondo rojo sólido para máxima visibilidad */
  color: white;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.tag-rating {
  top: 5px;
  right: 45px; /* Posicionado a la izquierda del botón de favoritos */
  background-color: rgba(0, 0, 0, 0.75);
  color: #ffc107; /* Color dorado para la estrella */
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  backdrop-filter: blur(4px);
  font-weight: 800;
  z-index: 4;
}

.tag-rating i {
  font-size: 0.85em;
}



.tag-nuevo,
.tag-reciente {
  left: 5px;
  top: 35px;
  background: #2ecc71;
  color: white;
}

.tag-most-viewed {
  left: 5px;
  top: 65px;
  background: #f1c40f;
  color: #000;
}

.tag-calidad {
  right: 5px;
  top: 45px;
  background: white;
  color: black;
}

.tag-plataforma {
  top: auto;
  bottom: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid #444;
}

.card-favorite-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  /* Hacemos visible por defecto para que el usuario lo vea */
  transition: 0.2s;
  z-index: 10;
}



.movie-card:hover .card-favorite-btn {
  opacity: 1;
}

.card-favorite-btn.favorited {
  color: var(--primary);
  opacity: 1;
}

.card-favorite-btn:hover {
  background: white;
  color: var(--primary);
}

/* --- MOBILE MENU --- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background: #1a1a1a;
  z-index: 2000;
  transition: 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-links a {
  font-size: 1.2rem;
  color: #ccc;
  display: flex;
  align-items: center;
  gap: 15px;
}

.mobile-nav-links a.active {
  color: var(--primary);
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}

.mobile-categories {
  margin-top: 2rem;
  border-top: 1px solid #333;
  padding-top: 1rem;
}

.mobile-categories span {
  display: block;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-tags a {
  font-size: 0.9rem;
  background: #333;
  padding: 5px 12px;
  border-radius: 20px;
  gap: 0;
}

/* --- BOTTOM NAV (Mobile Only) --- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid #333;
  padding: 10px 0;
  justify-content: space-around;
  z-index: 999;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  color: #888;
  gap: 4px;
}

.nav-item i {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.nav-item.active {
  color: var(--primary);
}

/* --- FOOTER --- */
.main-footer {
  background: #0a0a0a;
  padding: 4rem 4% 6rem;
  /* Extra padding for bottom nav */
  margin-top: 4rem;
  border-top: 1px solid #1a1a1a;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-brand {
  grid-column: span 2;
}

@media (max-width: 800px) {
  .footer-brand {
    grid-column: span 1;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
}

.footer-brand .logo {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  display: block;
}

.footer-brand p {
  color: #888;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 450px;
}

.footer-links h3 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: #888;
  font-size: 0.95rem;
  transition: 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #1a1a1a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 600px) {
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

.footer-bottom p {
  color: #555;
  font-size: 0.85rem;
}

/* --- MODAL --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-container {
  width: 100%;
  max-width: 1000px;
  height: 90vh;
  background: #181818;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 2rem;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.close-button:hover {
  background: var(--primary);
  transform: rotate(90deg);
}

.modal-content-scroll {
  overflow-y: auto;
  height: 100%;
}

.modal-video-box {
  width: 100%;
  aspect-ratio: 16/9;
  background: black;
  position: relative;
}

.modal-video-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-video-box video,
.modal-video-box iframe {
  width: 100%;
  height: 100%;
}

/* Estilo para subtítulos nativos */
video::cue {
    font-size: var(--subtitle-size);
}

.modal-info {
  padding: 2rem;
}

.modal-header-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.modal-header-info h2 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.action-btn {
  font-size: 1.5rem;
  color: #888;
  transition: 0.3s;
}

.action-btn:hover {
  color: var(--primary);
}

.rating-badge {
  background: #333;
  padding: 5px 10px;
  border-radius: 4px;
  color: #ffd700;
  font-weight: bold;
}

/* Estilos específicos para rating en tarjetas (TMDB y otros) */
.movie-card .rating-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffd700;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  backdrop-filter: blur(4px);
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.meta-tags {
  display: flex;
  gap: 15px;
  color: #aaa;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.tabs-ui {
  border-bottom: 1px solid #333;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 2rem;
}

.tab-btn {
  padding-bottom: 10px;
  color: #888;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: white;
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  color: #ddd;
  line-height: 1.6;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s;
}

/* Sources Styling matches script.js classes */
.source-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-btn,
.season-tab {
  background: #333;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  transition: 0.2s;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.source-btn .flag-icon {
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.flag-img {
  width: 18px;
  height: auto;
  display: block;
}

.source-btn:hover,
.season-tab:hover,
.source-btn.active,
.season-tab.active {
  background: var(--primary);
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.episode-btn {
  background: #252525;
  padding: 10px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  display: block;
}

.episode-btn:hover,
.episode-btn.active {
  background: var(--primary);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .bottom-nav {
    display: flex;
  }

  .hero-container {
    height: 60vh;
  }

  .hero-title {
    font-size: 2rem;
  }

  .movie-card {
    flex: 0 0 130px;
  }

  .navbar {
    background: transparent;
  }

  .navbar.scrolled {
    background: #141414;
  }

  .search-bar {
    display: none;
  }

  /* Use mobile trigger */

  .main-footer {
    padding-bottom: 5rem;
  }

  .movie-grid-full {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding: 1rem;
  }
}

/* --- DETALLES PAGE --- */
.detail-hero {
  position: relative;
  width: 100%;
  min-height: 80vh;
  padding-top: 80px;
  /* Space for navbar */
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #141414 20%, rgba(20, 20, 20, 0.8) 60%, transparent 100%),
    linear-gradient(to top, #141414 10%, transparent 50%);
  z-index: 1;
}

/* Mobile override for hero overlay */
@media (max-width: 768px) {
  .detail-hero::before {
    background: linear-gradient(to top, #141414 20%, rgba(20, 20, 20, 0.8) 60%, rgba(20, 20, 20, 0.6) 100%);
  }

  .detail-hero {
    min-height: auto;
    padding-bottom: 2rem;
    align-items: flex-start;
  }
}

.detail-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 4%;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .detail-content {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.5rem;
  }
}

.detail-poster-card {
  width: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  position: relative;
}

.detail-poster-card img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .detail-poster-card {
    width: 200px;
  }
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
}

@media (max-width: 900px) {
  .detail-info {
    align-items: center;
  }
}

.detail-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  color: white;
}

@media (max-width: 768px) {
  .detail-title {
    font-size: 2rem;
  }
}

.detail-meta {
  display: flex;
  gap: 15px;
  align-items: center;
  color: #ccc;
  font-size: 0.95rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .detail-meta {
    justify-content: center;
  }
}

.detail-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .detail-actions {
    justify-content: center;
  }
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 10px 25px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 25px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(5px);
  transition: 0.3s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: 0.3s;
}

.btn-icon:hover {
  background: white;
  color: black;
}

.detail-synopsis {
  font-size: 1rem;
  line-height: 1.6;
  color: #ddd;
  max-width: 800px;
}

.detail-genres {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-sections-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 4%;
}

.tabs-nav {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid #333;
  margin-bottom: 2rem;
  overflow-x: auto;
}

/* Player Section */
.player-container {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: black;
  aspect-ratio: 16/9;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.player-container iframe,
.player-container video {
  width: 100%;
  height: 100%;
  border: none;
}

/* Fullscreen simulation/fix for mobile */
.player-container.fullscreen-active {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: black !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.player-toolbar {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.player-action-btn {
  background: #252525;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #333;
  transition: 0.3s;
  cursor: pointer;
}

.player-action-btn:hover {
  background: #333;
  border-color: var(--primary);
}

.player-action-btn i {
  color: var(--primary);
}

@media (max-width: 600px) {
  .player-toolbar {
    justify-content: center;
  }

  .player-action-btn {
    flex: 1;
    justify-content: center;
    padding: 12px;
    font-size: 0.85rem;
  }
}

.servers-list {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.server-btn {
  background: #222;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  border: 1px solid #333;
  transition: 0.3s;
}

.server-btn:hover,
.server-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

/* Cast Grid */
.vis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}

.cast-member {
  text-align: center;
}

.cast-member img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  border: 2px solid #333;
}

.cast-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
}

.cast-role {
  font-size: 0.8rem;
  color: #888;
}

/* Episodes List (Netflix Style) */
.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 10px;
}

.episode-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: #1f1f1f;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  align-items: center;
}

.episode-item:hover,
.episode-item.active {
  background: #333;
}

.episode-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #555;
  min-width: 40px;
}

.episode-thumb {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  background: #000;
}

.episode-info {
  flex: 1;
}

.episode-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.episode-desc {
  font-size: 0.8rem;
  color: #999;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .episode-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .episode-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .episode-number {
    display: none;
  }
}

.download-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #222;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  color: white;
  text-decoration: none;
  transition: 0.3s;
}

.download-btn:hover {
  background: #333;
}

/* --- SERIES & EPISODES (Netflix Style) --- */
.series-episodes-container {
  width: 100%;
  margin-top: 2rem;
  background: #181818;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.season-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #333;
  padding-bottom: 1rem;
}

.season-selector-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.season-selector-dropdown {
  background: #333;
  color: white;
  border: 1px solid #444;
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 1rem;
  outline: none;
  cursor: pointer;
}

.season-selector-dropdown:focus {
  border-color: var(--primary);
}

.episodes-list-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 5px;
  /* For scrollbar space */
}

/* Custom Scrollbar for list */
.episodes-list-cards::-webkit-scrollbar {
  width: 6px;
}

.episodes-list-cards::-webkit-scrollbar-track {
  background: #222;
}

.episodes-list-cards::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.episode-card {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: #252525;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  align-items: flex-start;
  border: 1px solid transparent;
}

.episode-card:hover {
  background: #333;
  transform: translateX(5px);
}

.episode-card.active {
  background: #333;
  border-color: var(--primary);
}

.episode-card.active .episode-card-info h4 {
  color: var(--primary);
}

.episode-card-thumbnail {
  width: 140px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  background: #000;
}

.episode-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
}

.episode-card:hover .episode-card-thumbnail img {
  transform: scale(1.1);
}

/* Play icon overlay on hover */
.episode-card-thumbnail::after {
  content: '\f04b';
  /* FontAwesome Play */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: white;
  font-size: 1.5rem;
  transition: 0.3s;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
  opacity: 0;
}

.episode-card:hover .episode-card-thumbnail::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.episode-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.episode-card-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.episode-card-info p {
  font-size: 0.9rem;
  color: #aaa;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  margin: 0;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .series-episodes-container {
    padding: 1rem;
  }

  .episode-card {
    flex-direction: column;
    gap: 10px;
  }

  .episode-card-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .season-selector-header h3 {
    font-size: 1.2rem;
  }

  .episode-card-info h4 {
    font-size: 1rem;
  }
}

/* Episode Navigation Controls */
.episode-nav-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  background: #222;
  padding: 10px 15px;
  border-radius: 4px;
  border: 1px solid #333;
}

.nav-btn {
  background: #333;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}

.nav-btn:hover:not(:disabled) {
  background: var(--primary);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #252525;
}

.ep-info {
  color: #ddd;
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* --- CONTINUE WATCHING SECTION --- */
#continue-watching-section .horizontal-scroll,
#view-history-section .horizontal-scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 20px;
  padding-right: 4%;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

#continue-watching-section .horizontal-scroll::-webkit-scrollbar,
#view-history-section .horizontal-scroll::-webkit-scrollbar {
  display: none;
}

/* Continue Watching Card Styles */
.continue-watching-card {
  flex: 0 0 180px;
  min-width: 180px;
  position: relative;
}

.continue-watching-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.continue-watching-card .movie-info {
  padding: 8px 0;
}

.continue-watching-card .movie-info h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 5px;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Remove Button */
.remove-continue-watching {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.continue-watching-card:hover .remove-continue-watching {
  opacity: 1;
}

.remove-continue-watching:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

/* Clear All Button */
.clear-all-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-gray);
  padding: 6px 15px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.clear-all-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Episode Info Badge */
.episode-info {
  font-size: 0.75rem;
  color: var(--text-gray);
  font-weight: 400;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .continue-watching-card {
    flex: 0 0 140px;
    min-width: 140px;
  }

  .continue-watching-card .movie-info h3 {
    font-size: 0.85rem;
  }

  .remove-continue-watching {
    opacity: 1;
    /* Always visible on mobile */
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }

  .clear-all-btn {
    font-size: 0.8rem;
    padding: 5px 12px;
  }

  .progress-bar-container {
    height: 3px;
  }
}

@media (max-width: 480px) {
  .continue-watching-card {
    flex: 0 0 120px;
    min-width: 120px;
  }

  .continue-watching-card .movie-info h3 {
    font-size: 0.8rem;
  }

  #continue-watching-section .horizontal-scroll,
  #view-history-section .horizontal-scroll {
    gap: 10px;
  }
}

/* --- DETAIL PAGE BUTTONS --- */
.detail-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Favorite Button States */
#detail-favorite-btn {
  position: relative;
}

#detail-favorite-btn.favorited {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  animation: heartBeat 0.3s ease;
}

#detail-favorite-btn.favorited i {
  color: white;
}

#detail-favorite-btn:not(.favorited):hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Heart Beat Animation */
@keyframes heartBeat {
  0% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.3);
  }

  50% {
    transform: scale(1.1);
  }

  75% {
    transform: scale(1.25);
  }

  100% {
    transform: scale(1);
  }
}

/* Secondary Button (Trailer, etc) */
.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(229, 9, 20, 0.4);
}

.btn-secondary i {
  font-size: 1.1rem;
}

/* Toast Notifications Container */
.toast-container {
  position: fixed;
  bottom: 80px;
  /* Arriba de la bottom-nav en móvil */
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(0, 0, 0, 0.95);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-left: 4px solid var(--primary);
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.toast.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 768px) {
  .toast-container {
    left: 20px;
    right: 20px;
    bottom: 90px;
  }

  .toast {
    min-width: auto;
    width: 100%;
  }

  .movie-card {
    flex: 0 0 140px;
    /* Cartas un poco más grandes en móvil móvil */
  }

  .tag-tipo {
    font-size: 0.6rem;
    padding: 1px 4px;
  }

  .tag-rating {
    right: 40px;
    font-size: 0.65rem;
    padding: 2px 6px;
  }
}

.toast-success {
  border-left-color: #2ecc71;
}

.toast-error {
  border-left-color: #e74c3c;
}

.toast-warning {
  border-left-color: #f1c40f;
}

.toast-info {
  border-left-color: #3498db;
}

/* Mobile Responsive for Detail Buttons */
@media (max-width: 768px) {
  .btn-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .btn-secondary {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .detail-actions {
    gap: 10px;
  }
}

/* Ultra Búsqueda Styles */
.ultra-search-badge {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 10px;
  animation: pulseUltra 2s infinite;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

@keyframes pulseUltra {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7);
  }

  70% {
    transform: scale(1.03);
    box-shadow: 0 0 0 8px rgba(229, 9, 20, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(229, 9, 20, 0);
  }
}

#live-search-grid {
  padding: 20px 0;
}

.highlight {
  color: var(--primary);
  font-weight: bold;
  background: rgba(229, 9, 20, 0.15);
  padding: 0 3px;
  border-radius: 3px;
}

.no-sources-message {
  padding: 40px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: #999;
  font-style: italic;
  grid-column: 1 / -1;
  margin: 20px 0;
}

.external-source-badge {
  background: #007bff;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: bold;
  margin-left: 8px;
  text-transform: uppercase;
}

/* --- GLOBAL PAGE LOADER --- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.page-loader.active {
  opacity: 1;
  pointer-events: auto;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  font-size: 2.5rem;
  font-weight: 900;
  color: white;
  margin-bottom: 20px;
}

.loader-logo span {
  color: var(--primary);
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.loader-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary);
  animation: barSlide 0.8s infinite ease-in-out;
}

@keyframes barSlide {
  0% {
    left: -100%;
  }

  50% {
    left: 0%;
  }

  100% {
    left: 100%;
  }
}

/* --- AJUSTES PAGE --- */
.ajustes-container {
    max-width: 800px;
    margin: 120px auto 4rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-out;
}

.ajustes-container h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-white);
}

.setting-group {
    margin-bottom: 2.5rem;
}

.setting-group h2 {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 0.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #222;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item span {
    font-size: 1rem;
}

.btn-setting {
    background: #333;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-setting:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.btn-setting.btn-danger {
    background: #8b0000;
}

.btn-setting.btn-danger:hover {
    background: #c10e0e;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Responsive Ajustes */
@media (max-width: 768px) {
    .ajustes-container {
        margin: 100px 1rem 6rem; /* Margen inferior para bottom-nav */
        padding: 1.5rem;
    }
    
    .ajustes-container h1 {
        font-size: 1.5rem;
    }
}

/* --- Resume Prompt --- */
.resume-prompt {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* Oculto por defecto, JS lo controla */
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.resume-prompt.visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.resume-content {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: fadeUp 0.4s ease-out;
    border: 1px solid rgba(255,255,255,0.1);
}

.resume-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.resume-content p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.resume-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Light Mode Support */
body.light-mode {
    --bg-dark: #f0f2f5;
    --bg-card: #ffffff;
    --text-white: #1c1e21;
    --text-gray: #65676b;
}

body.light-mode .navbar.scrolled,
body.light-mode .bottom-nav {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body.light-mode .ajustes-container h1,
body.light-mode .setting-group h2,
body.light-mode .setting-item {
    border-color: #e0e0e0;
}

/* --- Personalización --- */

/* Ocultar calificaciones */
body.hide-ratings .movie-card-details span:nth-child(2), /* Asumiendo que la calificación es el 2do span */
body.hide-ratings .hero-rating,
body.hide-ratings .rating-badge {
    display: none !important;
}

/* Modo Compacto */
body.compact-mode .movie-card {
    flex: 0 0 120px; /* Más pequeño que 160px */
}
body.compact-mode .movie-grid-full {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

 
 /* --- Country Selector Modal --- */
 .country-modal-overlay {
     position: fixed;
     inset: 0;
     background: rgba(0, 0, 0, 0.9);
     z-index: 20000;
     display: none;
     /* Hidden by default */
     justify-content: center;
     align-items: center;
     padding: 20px;
     backdrop-filter: blur(10px);
 }
 
 .country-modal-overlay.visible {
     display: flex;
 }
 
 .country-modal-content {
     background: var(--bg-card);
     padding: 2.5rem 3.5rem;
     border-radius: var(--radius-lg);
     text-align: center;
     max-width: 900px;
     width: 100%;
     animation: fadeUp 0.5s ease-out;
     border: 1px solid rgba(255, 255, 255, 0.1);
     box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
     max-height: 90vh;
     display: flex;
     flex-direction: column;
 }
 
 .country-modal-content .logo {
     justify-content: center;
     font-size: 2.5rem;
     margin-bottom: 1rem;
 }
 
 .country-modal-content .logo .logo-icon {
     height: 40px;
 }
 
 .country-modal-content h2 {
     font-size: 1.8rem;
     margin-bottom: 0.5rem;
     color: var(--text-white);
 }
 
 .country-modal-content p {
     font-size: 1.1rem;
     color: var(--text-gray);
     margin-bottom: 2rem;
 }
 
 .country-list {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
     gap: 1.5rem;
     overflow-y: auto;
     padding: 1rem;
     scrollbar-width: thin;
     scrollbar-color: var(--primary) #222;
 }
 
 .country-list::-webkit-scrollbar {
     width: 8px;
 }
 
 .country-list::-webkit-scrollbar-track {
     background: #222;
     border-radius: 4px;
 }
 
 .country-list::-webkit-scrollbar-thumb {
     background-color: var(--primary);
     border-radius: 4px;
 }
 
 .country-item {
     display: flex;
     flex-direction: column;
     align-items: center;
     gap: 10px;
     padding: 1rem;
     background: rgba(255, 255, 255, 0.05);
     border-radius: var(--radius-md);
     cursor: pointer;
     transition: all 0.3s ease;
     border: 1px solid transparent;
 }
 
 .country-item:hover,
 .country-item:focus {
     transform: translateY(-5px) scale(1.05);
     background: rgba(255, 255, 255, 0.1);
     border-color: var(--primary);
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
     outline: none;
 }
 
 .country-item img {
     width: 50px;
     height: auto;
     border-radius: 4px;
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
     transition: transform 0.3s ease;
 }
 
 .country-item:hover img {
     transform: scale(1.1);
 }
 
 .country-item span {
     font-weight: 600;
     font-size: 1rem;
 }
 
 @media (max-width: 768px) {
     .country-modal-content {
         padding: 2rem 1.5rem;
     }
 
     .country-list {
         grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
         gap: 1rem;
     }
 
     .country-modal-content h2 {
         font-size: 1.5rem;
     }
 
     .country-modal-content p {
         font-size: 1rem;
     }
 
     .country-item span {
         font-size: 0.9rem;
     }
 }
 
 @media (max-width: 480px) {
     .country-list {
         grid-template-columns: repeat(2, 1fr);
         gap: 1rem;
     }
 
     .country-modal-content {
         padding: 1.5rem 1rem;
     }
 }

/* =========================================
   NUEVAS ANIMACIONES DE ENTRADA (SENIOR)
   ========================================= */

/* --- 1. PORTAL LUMÍNICO (Para Lanzamientos) --- */
.portal-container {
    position: fixed;
    inset: 0;
    z-index: 31000;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.portal-ring {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    /* Borde brillante con gradiente cónico */
    background: conic-gradient(from 0deg, transparent 0%, var(--primary) 50%, transparent 100%);
    filter: blur(8px);
    opacity: 0;
    transform: scale(0);
    animation: portalExpand 1.4s cubic-bezier(0.7, 0, 0.3, 1) forwards;
    will-change: transform, opacity;
}

/* Máscara interna para crear el efecto de anillo */
.portal-ring::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: #000;
    border-radius: 50%;
}

.portal-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.portal-item {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(5px);
    animation: portalFadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    will-change: transform, opacity, filter;
}

.portal-item:nth-child(1) { animation-delay: 0.6s; } /* Icono */
.portal-item:nth-child(2) { animation-delay: 0.75s; } /* Título */
.portal-item:nth-child(3) { animation-delay: 0.9s; } /* Subtítulo */

@keyframes portalExpand {
    0% { transform: rotate(0deg) scale(0.5); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: rotate(180deg) scale(30); opacity: 0; }
}

@keyframes portalFadeInUp {
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* --- 2. CINEMÁTICA (Para Series) --- */
.cinematic-container {
    position: fixed;
    inset: 0;
    z-index: 31000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Permitir clic tras animación */
}

.curtain-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 51%; /* Ligero solapamiento */
    background: #0a0a0a;
    z-index: 5;
    will-change: transform;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.curtain-left {
    left: 0;
    justify-content: flex-end;
    border-right: 1px solid #333;
    animation: curtainSlideLeft 1.2s cubic-bezier(0.8, 0, 0.2, 1) forwards 1.4s;
}

.curtain-right {
    right: 0;
    justify-content: flex-start;
    border-left: 1px solid #333;
    animation: curtainSlideRight 1.2s cubic-bezier(0.8, 0, 0.2, 1) forwards 1.4s;
}

.cinematic-text-wrapper {
    position: fixed;
    z-index: 10;
    text-align: center;
    color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.typewriter-text {
    font-family: 'Courier New', monospace;
    font-size: 3rem;
    font-weight: 900;
    overflow: hidden;
    white-space: nowrap;
    border-right: 4px solid var(--primary);
    width: 0;
    margin: 0 auto;
    letter-spacing: -1px;
    animation: 
        typing 0.8s steps(12, end) forwards 0.3s,
        blinkCaret 0.75s step-end infinite;
}

.cinematic-underline {
    height: 4px;
    background: var(--primary);
    width: 0;
    margin: 15px auto 0;
    border-radius: 2px;
    animation: lineDraw 0.6s ease-out forwards 1.1s;
}

/* Desvanecer texto antes de abrir cortinas */
.cinematic-text-wrapper.fade-out {
    animation: fadeOutQuick 0.3s ease forwards 1.3s;
}

@keyframes curtainSlideLeft { to { transform: translateX(-100%); } }
@keyframes curtainSlideRight { to { transform: translateX(100%); } }
@keyframes typing { to { width: 100%; } }
@keyframes blinkCaret { from, to { border-color: transparent; } 50% { border-color: var(--primary); } }
@keyframes lineDraw { to { width: 100%; } }
@keyframes fadeOutQuick { to { opacity: 0; transform: translate(-50%, -50%) scale(0.95); } }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .typewriter-text { font-size: 1.8rem; border-right-width: 3px; }
    .portal-item h1 { font-size: 2rem; }
    .portal-ring { width: 100px; height: 100px; }
}

/* --- SECCIÓN DESTACADOS (CUADRADOS) --- */
/* Contenedor con scroll horizontal */
#destacados-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    padding-right: 4%;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Ocultar scrollbar Firefox */
}
#destacados-grid::-webkit-scrollbar {
    display: none; /* Ocultar scrollbar Chrome/Safari */
}

.destacado-card {
    flex: 0 0 300px; /* Ancho fijo grande */
    height: 300px;   /* Altura igual al ancho (CUADRADO) */
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.destacado-card:hover {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
    border: 2px solid var(--primary);
}

.destacado-poster-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.destacado-poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la miniatura para llenar el vertical */
    transition: filter 0.3s;
}

.destacado-card:hover .destacado-poster-container img {
    filter: brightness(0.7);
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.destacado-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 3rem;
    color: white;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.8));
    transform: scale(0.8);
    transition: transform 0.3s;
}

.destacado-card:hover .play-overlay i {
    transform: scale(1);
}

.destacado-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.destacado-info h3 {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.destacado-card iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
}

@media (max-width: 768px) {
    .destacado-card {
        flex: 0 0 220px; /* Cuadrado más pequeño para móvil */
        height: 220px;
    }
}
/* NOTIFICACIONES */
.notifications-dropdown {
    position: relative;
    margin-right: 10px;
}

.notifications-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s;
}

.notifications-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notifications-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #e50914;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notifications-panel {
    position: absolute;
    top: 45px;
    right: 0;
    width: 320px;
    max-height: 500px;
    background: #141414;
    border: 1px solid #333;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notifications-panel.active {
    display: block;
}

.notifications-header {
    padding: 15px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    margin: 0;
    color: white;
    font-size: 1rem;
}

.notifications-actions {
    display: flex;
    gap: 10px;
}

.notifications-actions button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #aaa;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.notifications-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(229, 9, 20, 0.1);
}

.notification-item.unread:hover {
    background: rgba(229, 9, 20, 0.15);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-icon i {
    font-size: 1.2rem;
    color: #666;
}

.notification-content {
    flex: 1;
}

.notification-title {
    color: white;
    font-weight: 600;
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.notification-message {
    color: #aaa;
    font-size: 0.85rem;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.notification-time {
    color: #666;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.notification-time i {
    font-size: 0.7rem;
}

.notification-dot {
    width: 8px;
    height: 8px;
    background: #e50914;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.notifications-empty i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

.notifications-footer {
    padding: 10px 15px;
    border-top: 1px solid #333;
    text-align: center;
}

.notifications-footer a {
    color: #e50914;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.notifications-footer a:hover {
    color: #ff0a16;
    text-decoration: underline;
}

/* Push Notification */
.push-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 350px;
    background: linear-gradient(135deg, #141414, #1a1a1a);
    border-left: 4px solid #e50914;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    gap: 15px;
    align-items: center;
}

.push-notification.show {
    transform: translateX(0);
}

.push-notification-content {
    flex: 1;
}

.push-notification-title {
    color: white;
    font-weight: 600;
    margin: 0 0 5px 0;
    font-size: 0.95rem;
}

.push-notification-message {
    color: #aaa;
    font-size: 0.85rem;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.push-notification-time {
    color: #666;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.push-notification-close {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.push-notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.push-notification-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.push-notification-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Notifications Page */
.notifications-page {
    padding: 100px 4% 100px;
    min-height: 80vh;
}

.notifications-page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.notifications-page-header h1 {
    color: white;
    margin-bottom: 10px;
}

.notifications-page-header p {
    color: #aaa;
    max-width: 600px;
    margin: 0 auto;
}

.notifications-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    color: #aaa;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-btn.active {
    background: #e50914;
    color: white;
    border-color: #e50914;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.notifications-list-page {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
}

.notifications-list-page .notification-item {
    padding: 20px;
}

.notifications-list-page .notification-item:last-child {
    border-bottom: none;
}

.mark-all-read-btn {
    background: linear-gradient(135deg, #e50914, #b81d24);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mark-all-read-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .notifications-panel {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 120px);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .push-notification {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .notifications-page {
        padding: 80px 15px 100px;
    }

    .notifications-filters {
        gap: 8px;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
        flex: 1 1 auto; /* Permite que los botones crezcan para llenar el espacio */
        text-align: center;
    }

    .notification-item {
        padding: 15px 10px;
    }

    .notification-title {
        font-size: 0.95rem;
    }
}

/* --- All Content / Search Page (todos.html) --- */
.header .back-link {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-gray);
    margin-right: 20px;
    text-decoration: none;
}
.header .back-link:hover {
    color: var(--text-white);
}

.page-title-container {
    text-align: left;
}

.page-title-container .logo {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-gray);
}

.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 20px;
}

.filter-sort-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.control-group select {
    background: #252525;
    color: white;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
}

.layout-toggle {
    display: flex;
}

.layout-btn {
    background: #252525;
    color: var(--text-gray);
    border: 1px solid #444;
    padding: 8px 12px;
}
.layout-btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}
.layout-btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    border-left: none;
}
.layout-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Responsive adjustments for the page */
@media (max-width: 768px) {
    .page-title-container .logo {
        font-size: 1.8rem;
    }
    .page-subtitle {
        font-size: 0.9rem;
    }
    .view-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .filter-sort-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .control-group select {
        width: 100%;
    }
}

/* --- NUEVO ESTILO: SECCIÓN DE CALIFICACIÓN (API) --- */
.api-rating-container {
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(0,0,0,0.2));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.star-rating-display {
    position: relative;
    display: inline-block;
    font-size: 1.5rem;
}

.stars-background, .stars-foreground {
    display: flex;
    gap: 5px;
}

.stars-background {
    color: #444; /* Color de estrella vacía */
}

.stars-foreground {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    width: 0%; /* Controlado por JS */
    color: #ffd700; /* Color de estrella llena (dorado) */
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.7));
}

.rating-details {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.rating-score {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
}

.rating-votes {
    font-size: 0.9rem;
    color: var(--text-gray);
}      
