:root {
  /* PALETA 35MM / ÁMBAR CINEMATOGRÁFICO */
  --bg-primary: #101114;
  --bg-card: #181a20;
  --bg-card-hover: #1f222a;
  --text-main: #f5f5f7;
  --text-secondary: #9ea3ae;
  --accent: #f59e0b; /* Ámbar cálido */
  --accent-hover: #d97706;
  --rating: #fbbf24;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   BARRA SUPERIOR (NAVBAR)
   ========================================= */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 2.5rem;
  background: rgba(16, 17, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-subtle);
  transition: padding 0.25s ease;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  user-select: none;
  cursor: pointer;
  position: relative;
  padding: 4px 6px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.logo:hover {
  transform: scale(1.03);
}

.logo-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex-shrink: 0;
  transition: filter 0.3s ease, transform 0.3s ease;
  animation: logoFlickerIcon 1.2s ease-out 1;
}

.logo:hover .logo-icon {
  transform: rotate(-4deg) scale(1.1);
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.8));
}

.logo-title-text,
.logo-accent,
.logo-white {
  background: linear-gradient(
    110deg,
    #ffffff 0%,
    #ffffff 35%,
    #fbbf24 50%,
    #ffffff 65%,
    #ffffff 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  animation: projectorBeam 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.logo:hover .logo-title-text,
.logo:hover .logo-accent,
.logo:hover .logo-white {
  animation: projectorBeam 0.9s cubic-bezier(0.25, 1, 0.5, 1) 1;
  text-shadow: 0 0 24px rgba(245, 158, 11, 0.6);
}

@keyframes projectorBeam {
  0% {
    background-position: 150% 0;
    opacity: 0.6;
    letter-spacing: 0.5px;
    filter: blur(1.5px);
  }
  30% {
    opacity: 0.85;
    filter: blur(0.5px);
  }
  50% {
    opacity: 1;
    filter: blur(0);
    text-shadow: 0 0 28px rgba(245, 158, 11, 0.7);
  }
  100% {
    background-position: -50% 0;
    opacity: 1;
    letter-spacing: 1.5px;
    filter: blur(0);
  }
}

@keyframes logoFlickerIcon {
  0% {
    opacity: 0.4;
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.1));
  }
  20% {
    opacity: 1;
    filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.9));
  }
  40% {
    opacity: 0.7;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.3));
  }
  60% {
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.7));
  }
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.4));
  }
}

.search-box {
  flex: 1;
  max-width: 440px;
  margin: 0 1.5rem;
}

.search-box input {
  width: 100%;
  padding: 0.55rem 1.1rem;
  background-color: #16181f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.25s ease;
}

.search-box input:focus {
  border-color: var(--accent);
  background-color: #1a1d26;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: var(--accent);
  color: #101114;
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}

.btn-nav-request,
.btn-nav-changelog,
.btn-nav-share {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent);
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-nav-changelog {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.btn-nav-changelog:hover {
  background: #38bdf8;
  color: #101114;
  box-shadow: 0 2px 12px rgba(56, 189, 248, 0.35);
}

.btn-nav-share {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.btn-nav-request:hover {
  background: var(--accent);
  color: #101114;
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.35);
}

.btn-nav-share:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: var(--accent);
}

/* =========================================
   BARRA DE GÉNEROS (FILA 1)
   ========================================= */
.genre-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.8rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding: 4px 2px 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.genre-bar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.genre-pill {
  background: #14161f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}

.genre-pill:hover {
  background: #1c202b;
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.35);
}

.genre-pill.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

/* =========================================
   SUB-BARRA DEL CATÁLOGO (FILA 2: FILTROS + ORDEN)
   ========================================= */
.catalog-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.catalog-status-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.catalog-filters-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-select-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-select-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.catalog-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #14161f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239ea3ae' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 0.4rem 2rem 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.catalog-select:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.catalog-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* =========================================
   HERO BANNER
   ========================================= */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: 540px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.7s;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-backdrop-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 78%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 1;
  filter: saturate(1.15) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to right, var(--bg-primary) 36%, rgba(16, 17, 20, 0.88) 62%, rgba(16, 17, 20, 0.3) 90%),
    linear-gradient(to top, var(--bg-primary) 0%, rgba(16, 17, 20, 0.5) 25%, transparent 65%);
  z-index: 2;
}

.hero-container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1750px;
  padding: 3rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-poster-box {
  flex-shrink: 0;
  width: 225px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-card);
}

.hero-poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-info-box {
  flex: 1;
  max-width: 850px;
}

.hero-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.hero-badge-destacado {
  background: #2b1d07;
  color: #fbbf24;
  border: 1px solid #d97706;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  letter-spacing: 0.6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  letter-spacing: -0.8px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.94rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}

.hero-meta .rating {
  color: var(--rating);
  font-weight: 800;
}

.hero-synopsis {
  font-size: 0.94rem;
  color: #d6d9e0;
  line-height: 1.65;
  margin-bottom: 1.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-btn-play {
  background: var(--accent);
  color: #101114;
  border: none;
  padding: 0.85rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s, background-color 0.2s;
}

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

.hero-btn-trailer {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.85rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.hero-btn-trailer:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fbbf24;
  color: #fbbf24;
}

.hero-btn-fav {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 0.85rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.hero-btn-fav:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-btn-fav.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(16, 17, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.hero-arrow:hover {
  background: var(--accent);
  color: #101114;
  border-color: var(--accent);
}

.hero-arrow.prev { left: 1.8rem; }
.hero-arrow.next { right: 1.8rem; }

.hero-dots {
  position: absolute;
  bottom: 1.6rem;
  right: 3rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 6px;
}

/* =========================================
   CONTENEDOR GLOBAL Y SECCIONES
   ========================================= */
.container {
  max-width: 1750px;
  margin: 2.5rem auto 3.5rem;
  padding: 0 2.5rem;
}

.catalog-section {
  margin-bottom: 3.8rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-icon {
  font-size: 1.35rem;
  opacity: 0.9;
}

.section-title-box h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #ffffff;
}

.section-count {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.5rem;
}

/* =========================================
   TARJETAS DE CONTENIDO
   ========================================= */
.card {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--border-card);
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  animation: cardFadeIn 0.25s ease-out forwards;
}

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

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
}

.poster-wrapper {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  background: #14161c;
  overflow: hidden;
}

.poster-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover .poster-wrapper img {
  transform: scale(1.06);
}

.badge-group {
  position: absolute;
  top: 9px;
  left: 9px;
  display: flex;
  gap: 5px;
  z-index: 2;
}

.badge-type {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  display: inline-block;
  line-height: 1.2;
}

.badge-type.badge-pelicula {
  background: #14161f !important;
  color: #fcd34d !important;
  border: 1px solid #d97706 !important;
}

.badge-type.badge-serie {
  background: #14161f !important;
  color: #93c5fd !important;
  border: 1px solid #2563eb !important;
}

.badge-type.badge-anime {
  background: #14161f !important;
  color: #d8b4fe !important;
  border: 1px solid #7c3aed !important;
}

.badge-quality,
.modal-quality-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  display: inline-block;
  line-height: 1.2;
}

.badge-quality.p1080, .modal-quality-badge.p1080 {
  background: #1c212d !important;
  color: #e2e8f0 !important;
  border: 1px solid #475569 !important;
}

.badge-quality.p4k, .modal-quality-badge.p4k {
  background: #231934 !important;
  color: #f1f5f9 !important;
  border: 1px solid #8b5cf6 !important;
}

.badge-quality.p720, .modal-quality-badge.p720 {
  background: #151d28 !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

.badge-quality.cam, .modal-quality-badge.cam {
  background: #2a1b12 !important;
  color: #fed7aa !important;
  border: 1px solid #9a3412 !important;
}

.btn-card-fav {
  position: absolute;
  top: 9px;
  right: 9px;
  background: #14161f;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  transition: all 0.2s ease;
}

.btn-card-fav:hover {
  background: #1f2330;
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.08);
}

.btn-card-fav.active {
  color: var(--accent);
  border-color: var(--accent);
  background: #241d10;
}

.card-info {
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 0.94rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: auto;
  font-weight: 500;
}

.rating {
  color: var(--rating);
  font-weight: 700;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 3.5rem 1rem;
  font-size: 1rem;
}

/* =========================================
   MODAL DE REPRODUCCIÓN & MODO CINE
   ========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 12, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex !important;
}

.modal {
  background: var(--bg-card);
  border-radius: 12px;
  max-width: 880px;
  width: 100%;
  position: relative;
  padding: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  max-height: 90vh;
  overflow-y: auto;
  transition: max-width 0.35s ease, padding 0.35s ease;
}

/* BOTÓN DE CERRAR FIJO */
.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 30;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: var(--accent);
  color: #101114;
  border-color: var(--accent);
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.modal-detail-grid img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-detail-text {
  padding-right: 0;
}

.modal-detail-text h2 {
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
  line-height: 1.2;
  font-weight: 800;
}

.modal-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.modal-meta-data {
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-genres-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.modal-genre-tag {
  background: #14161f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

/* GRUPO DE ACCIONES CON MARGEN FORZADO HACIA LA DERECHA */
.modal-actions-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-right: 55px !important; /* Separación real frente a la X */
}

.modal-btn-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
}

.modal-btn-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.modal-btn-action.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.modal-btn-trailer {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.modal-btn-trailer:hover {
  background: var(--accent);
  color: #101114;
}

.modal-btn-report {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.modal-btn-report:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.modal-synopsis {
  color: #c9cdd6;
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

/* =========================================
   REGLAS DEL MODO CINE (THEATER MODE)
   ========================================= */
.modal.theater-mode {
  max-width: 95vw;
  width: 95vw;
  max-height: 96vh;
  padding: 1.25rem 1.6rem;
  border-color: rgba(245, 158, 11, 0.3);
}

.modal.theater-mode .modal-detail-grid {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.modal.theater-mode .modal-detail-grid img,
.modal.theater-mode .modal-synopsis,
.modal.theater-mode .modal-genres-row {
  display: none !important;
}

.modal.theater-mode .modal-detail-text {
  padding-right: 0;
  width: 100%;
}

.modal.theater-mode .modal-detail-text h2 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.modal.theater-mode .modal-actions-group {
  margin-right: 55px !important; /* Espacio intocable frente a la X en Modo Cine */
}

.modal.theater-mode .player-container {
  aspect-ratio: auto;
  height: 68vh;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.9);
}

.modal.theater-mode .ambient-glow-bg {
  filter: blur(55px) brightness(0.8) saturate(1.6);
  opacity: 0.85;
}

.modal-btn-theater {
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.modal-btn-theater:hover,
.modal-btn-theater.active {
  background: #38bdf8;
  color: #101114;
  border-color: #38bdf8;
  font-weight: 700;
}

/* =========================================
   LUZ AMBIENTAL (AMBIENT GLOW)
   ========================================= */
.player-glow-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 1.4rem;
  border-radius: 8px;
}

.ambient-glow-bg {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.65) saturate(1.4);
  opacity: 0.65;
  z-index: 0;
  border-radius: 16px;
  pointer-events: none;
  transition: background-image 0.5s ease;
}

.player-container {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #090a0d;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: all 0.35s ease;
}

.player-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-ad-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 18, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  text-align: center;
  padding: 1.5rem;
  backdrop-filter: blur(6px);
  transition: opacity 0.25s ease;
}

.ad-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #d1d5db;
  font-size: 0.72rem;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
  margin-bottom: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ad-play-btn {
  background: var(--accent);
  color: #101114;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  padding-left: 4px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
  margin-bottom: 1.1rem;
  transition: transform 0.2s, background-color 0.2s;
}

.player-ad-overlay:hover .ad-play-btn {
  transform: scale(1.1);
  background: var(--accent-hover);
}

.ad-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.ad-subtext {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.episodes-section {
  position: relative;
  z-index: 1;
  background: #13151b;
  border-radius: 8px;
  padding: 1.1rem;
  border: 1px solid var(--border-subtle);
}

.episodes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.episodes-header span {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.episodes-header select {
  background: #1b1e26;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 0.55rem;
  max-height: 165px;
  overflow-y: auto;
  padding-right: 4px;
}

.ep-btn {
  background: #1b1e26;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 0.45rem 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
}

.ep-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ep-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #101114;
  font-weight: 800;
}

/* MODAL DE TRÁILER */
.modal-trailer {
  max-width: 820px;
  padding: 1.4rem;
}

.trailer-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #ffffff;
}

.trailer-video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.trailer-video-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* MODAL DE COMPARTIR SOCIAL */
.modal-share {
  max-width: 540px;
  padding: 1.6rem;
}

.share-social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin: 1.25rem 0 1.5rem;
}

.share-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  transition: transform 0.2s, filter 0.2s;
}

.share-card-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.share-social-icon {
  width: 20px;
  height: 20px;
}

.share-wa { background: #25d366; color: #0b2212; }
.share-tg { background: #0088cc; }
.share-fb { background: #1877f2; }
.share-tw { background: #14171a; border: 1px solid rgba(255, 255, 255, 0.2); }

.share-copy-box {
  background: #14161f;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem;
}

.share-copy-box label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.share-input-row {
  display: flex;
  gap: 0.5rem;
}

.share-input-row input {
  flex: 1;
  background: #0d0f13;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  color: #fbbf24;
  font-size: 0.85rem;
  outline: none;
}

.btn-copy-link {
  background: var(--accent);
  color: #101114;
  border: none;
  padding: 0 1.2rem;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-copy-link:hover {
  background: var(--accent-hover);
}

/* =========================================
   MODAL DE BITÁCORA (CHANGELOG)
   ========================================= */
.modal-changelog {
  max-width: 660px;
}

.changelog-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-left: 0.5rem;
}

.changelog-entry {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(245, 158, 11, 0.35);
}

.changelog-entry::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

.changelog-badge-date {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.changelog-entry-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.changelog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: #c9cdd6;
  line-height: 1.5;
}

.changelog-list li strong {
  color: #ffffff;
}

.changelog-list code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 5px;
  border-radius: 4px;
  color: #fbbf24;
}

/* =========================================
   FOOTER CINEMATOGRÁFICO
   ========================================= */
.site-footer {
  background: #0b0c0e;
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 2.5rem 2rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1750px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand .footer-tagline {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 0.85rem;
  max-width: 440px;
}

.footer-nav h4,
.footer-legal-links h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fff;
  margin-bottom: 1.1rem;
  font-weight: 800;
}

.footer-nav ul,
.footer-legal-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a,
.footer-legal-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-legal-links a:hover {
  color: var(--accent);
}

.footer-disclaimer-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 2rem;
}

.footer-disclaimer-box p {
  font-size: 0.78rem;
  color: #7e8494;
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: #6b7280;
}

.footer-contact-direct code {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 700;
}

/* MODALES DE FORMULARIO Y LEGAL */
.modal-form,
.modal-legal {
  max-width: 620px;
}

.form-modal-header {
  margin-bottom: 1.4rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}

.form-modal-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.form-modal-header p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group-field label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-group-field input,
.form-group-field select,
.form-group-field textarea {
  width: 100%;
  background: #14161c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, background-image 0.2s;
}

.form-group-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ea3ae' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  background-size: 16px;
  padding-right: 2.8rem;
  cursor: pointer;
}

.form-group-field select:focus {
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.form-group-field input:focus,
.form-group-field textarea:focus {
  border-color: var(--accent);
}

.btn-submit-form {
  background: var(--accent);
  color: #101114;
  border: none;
  padding: 0.85rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}

.btn-submit-form:hover {
  background: var(--accent-hover);
}

.btn-submit-danger {
  background: #ef4444;
  color: #fff;
}

.btn-submit-danger:hover {
  background: #dc2626;
}

.legal-modal-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.legal-modal-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 1.2rem 0 0.4rem;
}

.legal-modal-content p,
.legal-modal-content ul {
  font-size: 0.85rem;
  color: #c9cdd6;
  line-height: 1.6;
}

.legal-modal-content ul {
  padding-left: 1.2rem;
  margin: 0.6rem 0;
}

.legal-contact-highlight {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin: 0.8rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-contact-highlight span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.legal-contact-highlight strong {
  color: var(--accent);
  font-size: 0.9rem;
}

/* AVISO TOAST FLOTANTE */
.site-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent);
  color: #101114;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 1000;
  animation: cardFadeIn 0.2s ease-out;
}

/* =========================================
   RESPONSIVO AVANZADO
   ========================================= */
@media (max-width: 1024px) {
  .navbar {
    padding: 1rem 1.8rem;
    flex-wrap: wrap;
    gap: 0.9rem;
  }
  .search-box {
    order: 3;
    max-width: 100%;
    margin: 0;
    width: 100%;
  }
  .filters {
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar {
    display: none;
  }
  .container {
    padding: 0 1.8rem;
  }
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
  }
  .hero-container {
    padding: 2.5rem 1.8rem;
    gap: 2rem;
  }
  .hero-poster-box {
    width: 190px;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.85rem 1.1rem;
    gap: 0.75rem;
  }
  .logo {
    font-size: 1.25rem;
  }
  .search-box {
    order: 3;
    max-width: 100%;
    margin: 0;
    width: 100%;
  }
  .search-box input,
  .form-group-field input,
  .form-group-field select,
  .form-group-field textarea,
  .share-input-row input,
  .catalog-select {
    font-size: 16px !important;
  }
  .filters {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar {
    display: none;
  }
  .catalog-subbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
  }
  .catalog-filters-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .filter-select-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .catalog-select {
    width: 100%;
  }
  .container {
    padding: 0 1rem;
    margin: 1.8rem auto;
  }
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  .hero-banner {
    min-height: 560px;
    padding: 0;
  }
  .hero-container {
    flex-direction: column;
    padding: 2.5rem 1.1rem 3.5rem;
    text-align: center;
    gap: 1.2rem;
    justify-content: center;
  }
  .hero-backdrop-bg {
    width: 100%;
    opacity: 0.35;
  }
  .hero-overlay {
    background: linear-gradient(to top, var(--bg-primary) 20%, rgba(16, 17, 20, 0.88) 80%);
  }
  .hero-poster-box {
    width: 135px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
  }
  .hero-badges-row {
    justify-content: center;
  }
  .hero-title {
    font-size: 1.65rem;
    line-height: 1.2;
  }
  .hero-meta, .hero-actions {
    justify-content: center;
    gap: 0.6rem;
  }
  .hero-synopsis {
    -webkit-line-clamp: 3;
    font-size: 0.86rem;
    margin-bottom: 1.2rem;
  }
  .hero-btn-play {
    padding: 0.75rem 1.2rem;
    font-size: 0.88rem;
  }
  .hero-btn-trailer,
  .hero-btn-fav {
    padding: 0.75rem 0.95rem;
    font-size: 0.85rem;
  }
  .hero-arrow {
    display: none;
  }
  .hero-dots {
    right: 50%;
    transform: translateX(50%);
    bottom: 0.9rem;
  }
  
  .modal-overlay {
    padding: 0.6rem;
  }
  .modal {
    padding: 1.2rem 1rem;
    max-height: 94vh;
  }
  .modal.theater-mode {
    max-width: 98vw;
    width: 98vw;
    padding: 1rem 0.75rem;
  }
  .modal.theater-mode .player-container {
    height: 52vh;
  }
  .close-btn {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
  }
  .modal-detail-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  .modal-detail-text {
    padding-right: 0;
  }
  .modal-meta-row {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }
  .modal-actions-group {
    justify-content: center;
    margin-right: 0 !important;
  }
  .modal-genres-row {
    justify-content: center;
  }
  .modal-detail-grid img {
    max-width: 125px;
    margin: 0 auto;
  }
  .share-social-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .site-footer {
    padding: 2.5rem 1.2rem 1.5rem;
    margin-top: 3.5rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
