* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #121212; color: white; font-family: Arial, sans-serif; }

.nav-tabs { display: flex; gap: 20px; padding: 10px 50px; margin-top: 0; background: #121212; overflow: hidden; white-space: nowrap; justify-content: center; align-items: center; position: sticky; top: 0; z-index: 3000; }
.nav-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0; flex-shrink: 0; position: absolute; left: 55px; top: 50%; transform: translateY(-50%); cursor: pointer; user-select: none; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-brand:hover { opacity: 0.95; transform: translateY(-50%) scale(1.02); }
.nav-brand:active { transform: translateY(-50%) scale(0.98); }
.nav-brand-main { display: flex; align-items: center; gap: 4px; }
.nav-logo-img { height: 50px; width: auto; flex-shrink: 0; }
.nav-logo { font-size: 1.8rem; font-weight: 900; color: #e50914; flex-shrink: 0; letter-spacing: 3px; font-family: 'Arial Black', 'Helvetica Neue', Arial, sans-serif; text-transform: uppercase; }
.nav-credits { font-size: 0.74rem; color: #a5a5a5; letter-spacing: 0.5px; white-space: nowrap; font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; font-style: italic; font-weight: 400; margin-top: -4px; margin-left: 2px; text-transform: none; display: inline-flex; align-items: center; gap: 3px; }
.credits-author { color: #e50914; font-weight: 700; font-style: normal; }
.credits-heart { display: inline-block; font-style: normal; font-size: 0.8rem; margin-left: 1px; }
.nav-tabs-center { display: flex; gap: 20px; padding-left: 280px; }
.tab-btn { background: none; border: none; color: #aaa; font-size: 1.5rem; padding: 8px 16px; cursor: pointer; transition: color 0.2s, border-bottom 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.tab-btn.active { color: #e50914; border-bottom: 2px solid #e50914; }
.tab-btn:hover { color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.hero-carousel { position: relative; width: calc(100% - 60px); max-width: 2000px; margin: 12px auto 24px; height: 530px; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.08); background: #0f0f0f; }
.hero-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease-in-out; overflow: hidden; }
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center 30%; background-repeat: no-repeat; transition: transform 6s ease-in-out; transform: scale(1); z-index: 0; }
.hero-slide.active .hero-bg { transform: scale(1.08); }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; width: 55%; padding: 40px; color: white; }
.hero-title { font-size: 2.8rem; font-weight: bold; margin-bottom: 12px; }
.hero-meta { display: flex; gap: 20px; font-size: 1rem; margin-bottom: 15px; color: #ddd; }
.hero-synopsis { font-size: 1rem; line-height: 1.4; max-height: 120px; overflow-y: auto; margin-bottom: 25px; }
.hero-buttons { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap; }
.hero-btn { padding: 12px 30px; font-size: 1.2rem; font-weight: bold; border: none; border-radius: 4px; cursor: pointer; transition: transform 0.2s, background 0.2s; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.hero-play-btn { background: #e50914; color: white; }
.hero-play-btn:hover { background: #f40612; transform: scale(1.05); }
.hero-info-btn { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.3); }
.hero-info-btn:hover { background: rgba(255,255,255,0.25); transform: scale(1.05); }
.carousel-prev, .carousel-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.6); color: white; border: none; font-size: 2rem; padding: 8px 16px; cursor: pointer; z-index: 10; border-radius: 10px; transition: background 0.2s; }
.carousel-prev { left: 15px; }
.carousel-next { right: 15px; }
.carousel-prev:hover, .carousel-next:hover { background: rgba(0,0,0,0.9); }
.carousel-dots { position: absolute; bottom: 15px; left: 0; right: 0; text-align: center; z-index: 10; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #bbb; margin: 0 6px; cursor: pointer; transition: background 0.2s; }
.dot.active { background: #e50914; }

.category { margin: 0 20px 40px; }
.category h2 { font-size: 1.8rem; margin-bottom: 10px; color: #fff; }
.row-wrapper { position: relative; display: flex; align-items: center; }
.row { display: flex; flex-direction: row; overflow-x: auto; gap: 20px; padding: 20px 10px; scroll-behavior: smooth; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.scroll-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; background: rgba(0,0,0,0.75); color: white; border: none; font-size: 4.5rem; padding: 12px 24px; cursor: pointer; border-radius: 4px; transition: background 0.2s; display: flex; align-items: center; justify-content: center; line-height: 1; height: 95%; max-height: 400px; pointer-events: auto; }
.scroll-btn:hover { background: rgba(229,9,20,0.8); }
.scroll-btn.left { left: 0; border-radius: 0 8px 8px 0; }
.scroll-btn.right { right: 0; border-radius: 8px 0 0 8px; }

.movie { flex: 0 0 auto; width: 220px; border: 2px solid transparent; overflow: hidden; background: #1f1f1f; transition: transform 0.4s cubic-bezier(0.2,0.9,0.3,1.1), box-shadow 0.4s ease, border-color 0.4s ease; cursor: pointer; position: relative; opacity: 0; animation: fadeInLeft 0.6s ease forwards; }
.movie img { width: 100%; height: 100%; display: block; object-fit: cover; aspect-ratio: 2/3; transition: filter 0.3s ease; }
.movie:hover img { filter: brightness(0.3) blur(2px); }
.movie:hover { transform: scale(1.08); z-index: 10; box-shadow: 0 0 25px rgba(229,9,20,0.5); border-color: #e50914; }
.movie-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.78); color: white; padding: 16px; display: flex; flex-direction: column; justify-content: center; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; box-sizing: border-box; backdrop-filter: blur(4px); }
.movie:hover .movie-overlay { opacity: 1; }
.movie-title-hover { font-size: 1.15rem; font-weight: bold; margin-bottom: 6px; line-height: 1.25; color: #ffffff; word-wrap: break-word; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.movie-meta-hover { font-size: 0.8rem; color: #e50914; font-weight: bold; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.movie-synopsis-hover { font-size: 0.82rem; line-height: 1.35; color: #ddd; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }

.card-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 5;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
}
.card-type-badge.anime {
  background: #e50914;
  border-color: rgba(255,255,255,0.3);
}


.ver-mas-card { background: rgba(200,16,16,0.6); display: flex; justify-content: center; align-items: center; text-align: center; cursor: pointer; transition: all 0.2s ease; width: 220px; flex: 0 0 auto; border: 2px solid rgba(200,16,16,0.3); opacity: 0; animation: fadeInLeft 0.6s ease forwards; }
.ver-mas-content { display: flex; flex-direction: column; gap: 8px; font-weight: bold; font-size: 1.2rem; color: white; }
.ver-mas-icon { font-size: 2rem; }
.ver-mas-card:hover { background: #e50914; border-color: #e50914; transform: scale(1.02); }

@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.search-container { display: flex; flex-direction: column; padding: 20px 40px; min-height: 500px; gap: 20px; align-items: center; }
.search-header { display: flex; justify-content: center; align-items: center; gap: 100px; flex-wrap: wrap; width: 100%; }
.search-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filter-btn { background: transparent; color: #aaa; border: 2px solid #333; padding: 8px 20px; border-radius: 30px; font-size: 0.95rem; font-weight: bold; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover { border-color: #666; color: white; }
.filter-btn.active { background: #e50914; border-color: #e50914; color: white; }
.search-input-wrapper { display: flex; gap: 10px; align-items: center; flex: 1; max-width: 500px; }
#search-input { flex: 1; padding: 10px 18px; font-size: 1.2rem; background: #1f1f1f; border: 2px solid #333; border-radius: 4px; color: white; outline: none; transition: border-color 0.2s; }
#search-input:focus { border-color: #e50914; }
.search-submit-btn { background: #e50914; color: white; border: none; padding: 10px 18px; font-size: 1.2rem; border-radius: 4px; cursor: pointer; font-weight: bold; transition: transform 0.2s; }
.search-submit-btn:hover { transform: scale(1.05); }
.search-results-wrapper { flex: 1; overflow-y: auto; padding-right: 15px; width: 100%; }
#search-results-title { font-size: 1.6rem; margin-bottom: 15px; color: #fff; }
.search-results-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.search-result-item { background: #1f1f1f; overflow: hidden; cursor: pointer; transition: transform 0.4s cubic-bezier(0.2,0.9,0.3,1.1), box-shadow 0.4s ease, border-color 0.4s ease; border: 2px solid transparent; position: relative; aspect-ratio: 2/3; opacity: 0; animation: fadeInLeft 0.6s ease forwards; }
.search-result-item img { width: 100%; height: 100%; display: block; object-fit: cover; }
.search-result-item:hover { transform: scale(1.08); box-shadow: 0 0 25px rgba(229,9,20,0.4); border-color: #e50914; z-index: 2; }
.search-result-badge { position: absolute; top: 8px; left: 8px; background: #e50914; color: white; font-size: 0.7rem; font-weight: bold; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }

.hidden {
  display: none !important;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #e50914;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.info-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Info Window Modal ─────────────────────────────────────────────────── */
.info-window { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4000; display: flex; flex-direction: column; background: #0f0f0f; overflow: hidden; }
.info-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; background-size: cover; background-position: center 30%; background-repeat: no-repeat; z-index: 0; transition: opacity 1s ease; }
.info-overlay { position: absolute; inset: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(15,15,15,0.75) 0%, rgba(15,15,15,0.92) 40%, rgba(15,15,15,0.98) 100%); z-index: 1; }

.info-scroll-container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.info-scroll-container::-webkit-scrollbar {
  display: none;
}

.info-content-wrapper {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 85px 35px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-sizing: border-box;
}

.info-back-btn {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 5000;
  background: rgba(18, 18, 18, 0.85);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.1), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.info-back-btn:hover {
  background: #e50914;
  border-color: #ff333d;
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.7);
}
.info-back-btn:active {
  transform: scale(0.96);
}
.info-back-btn svg {
  width: 26px;
  height: 26px;
  transition: transform 0.2s ease;
}
.info-back-btn:hover svg {
  transform: translateX(-2px);
}

.info-header-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#info-title { font-size: 3.2rem; margin: 0; font-weight: 800; color: #fff; line-height: 1.15; letter-spacing: -0.5px; }
.info-meta { display: flex; gap: 20px; font-size: 1.15rem; color: #ccc; margin-top: 4px; flex-wrap: wrap; }
#info-synopsis { font-size: 1.05rem; line-height: 1.6; color: #ddd; max-width: 900px; margin-top: 8px; }
#info-actions-container { display: flex; gap: 15px; margin-top: 10px; flex-wrap: wrap; }

.info-watch-btn { background: #e50914; color: white; border: none; padding: 14px 45px; font-size: 1.25rem; font-weight: bold; cursor: pointer; transition: transform 0.2s, background 0.2s; border-radius: 4px; letter-spacing: 1px; }
.info-watch-btn:hover { background: #f6121d; transform: scale(1.04); }
.info-fav-btn { background: rgba(255, 255, 255, 0.1); color: white; border: 1px solid rgba(255,255,255,0.3); padding: 12px 24px; font-size: 1.1rem; border-radius: 4px; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.info-fav-btn:hover { background: rgba(229,9,14,0.25); border-color: #e50914; }
.info-fav-btn.active { background: #e50914; border-color: #e50914; }

.info-loading { position: absolute; inset: 0; width: 100%; height: 100%; background: #0f0f0f; display: flex; justify-content: center; align-items: center; z-index: 10; transition: opacity 0.5s ease; }
.info-loading.hidden { opacity: 0; pointer-events: none; }
.spinner { width: 60px; height: 60px; border: 6px solid rgba(255,255,255,0.1); border-top: 6px solid #e50914; border-radius: 50%; animation: spin 0.8s linear infinite; }

.info-media-section {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
}

#trailer-container {
  width: 100%;
  max-width: 820px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.8);
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
}
#trailer-container:empty {
  display: none;
}
#trailer-container .trailer-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
#trailer-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}
#trailer-container .trailer-expand-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, border-color 0.2s;
}
#trailer-container .trailer-expand-btn:hover {
  background: #e50914;
  border-color: #e50914;
}
#trailer-container.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  max-width: 1300px;
  z-index: 5000;
  box-shadow: 0 0 60px rgba(0,0,0,0.95);
}
#trailer-container.expanded .trailer-expand-btn {
  bottom: 16px;
  right: 16px;
  padding: 8px 18px;
  font-size: 1rem;
}
#trailer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.88);
  z-index: 4999;
}
#trailer-overlay.show {
  display: block;
}

.series-panel { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.seasons-section, .episodes-section { width: 100%; }
.seasons-section h3, .episodes-section h3 { color: white; margin-bottom: 12px; font-size: 1.25rem; font-weight: 700; }
.seasons-container { display: flex; flex-direction: row; gap: 8px; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scrollbar-width: none; }
.seasons-container::-webkit-scrollbar { display: none; }
.season-btn { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; color: #ddd; font-size: 0.95rem; font-weight: 600; padding: 9px 18px; cursor: pointer; white-space: nowrap; transition: all 0.2s ease; flex-shrink: 0; }
.season-btn:hover { background: rgba(255,255,255,0.2); border-color: #e50914; }
.season-btn.selected { background: #e50914; border-color: #e50914; color: white; font-weight: bold; }
.episodes-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; max-height: 380px; overflow-y: auto; padding: 4px 0; scrollbar-width: none; }
.episodes-container::-webkit-scrollbar { display: none; }
.episode-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); padding: 12px 16px; border-radius: 6px; color: white; font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease; width: 100%; text-align: left; box-sizing: border-box; }
.episode-btn:hover { background: #e50914; border-color: #e50914; transform: translateY(-2px); }
.episode-btn.selected { background: #e50914; border-color: white; font-weight: bold; }

.info-recommendations-section {
  margin-top: 15px;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
}
.info-recommendations-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}
.info-recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  width: 100%;
}
.info-recommendations-grid .movie {
  width: 100%;
}

#player-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 5000;
  flex-direction: column;
  overflow: hidden;
}

.player-top-bar {
  width: 100%;
  height: 56px;
  background: rgba(14, 14, 14, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 5010;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.player-back-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 18px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.player-back-btn:hover {
  background: #e50914;
  border-color: #e50914;
  transform: scale(1.04);
}
.player-back-btn svg {
  flex-shrink: 0;
}

.player-server-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(229, 9, 20, 0.5);
  padding: 5px 14px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}
.player-server-text {
  color: #ffcc00;
  font-size: 0.85rem;
  font-weight: bold;
}
.switch-provider-banner-btn {
  background: #e50914;
  color: white;
  border: none;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 20px;
  transition: transform 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.switch-provider-banner-btn:hover {
  background: #f40612;
  transform: scale(1.05);
}

#player-iframe-container {
  flex: 1;
  width: 100%;
  height: calc(100% - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  background: #000;
  box-sizing: border-box;
}
#player-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  z-index: 5005;
  pointer-events: none;
}

.player-loading-spinner .spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #e50914;
  border-radius: 50%;
  animation: player-spin 0.8s linear infinite;
}

@keyframes player-spin {
  to {
    transform: rotate(360deg);
  }
}

.player-loading-text {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ── Continuar Viendo (Continue Watching) ────────────────────────────────── */
.continue-card {
  position: relative;
  flex: 0 0 auto;
  width: 230px;
  border-radius: 8px;
  overflow: hidden;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1), box-shadow 0.35s ease, border-color 0.35s ease;
  cursor: pointer;
}
.continue-card:hover {
  transform: scale(1.06);
  border-color: #e50914;
  box-shadow: 0 8px 25px rgba(229, 9, 20, 0.45);
  z-index: 10;
}
.continue-poster-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0f0f0f;
  overflow: hidden;
}
.continue-poster-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}
.continue-card:hover .continue-poster-wrapper img {
  filter: brightness(0.65);
}
.continue-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.continue-card:hover .continue-play-overlay {
  opacity: 1;
}
.continue-play-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e50914;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  padding-left: 3px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease, background 0.2s ease;
}
.continue-card:hover .continue-play-icon {
  transform: scale(1.1);
  background: #f40612;
}
.continue-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 2;
}
.continue-progress-fill {
  height: 100%;
  background: #e50914;
  width: 70%;
  border-radius: 0 2px 2px 0;
}
.continue-info {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.continue-title {
  font-size: 0.95rem;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-meta {
  font-size: 0.8rem;
  color: #e50914;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.continue-remove-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.continue-remove-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

/* ── Live Search Clear Button ──────────────────────────────────────────── */
.search-clear-btn {
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #bbb;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
}
.search-clear-btn:hover {
  background: rgba(229, 9, 20, 0.8);
  color: #fff;
}

.favoritos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; padding: 20px; justify-content: center; }
.favorito-item { max-width: 200px; justify-self: center; background: #1f1f1f; overflow: hidden; cursor: pointer; transition: transform 0.4s cubic-bezier(0.2,0.9,0.3,1.1), box-shadow 0.4s ease, border-color 0.4s ease; border: 2px solid transparent; }
.favorito-item:hover { transform: scale(1.08); box-shadow: 0 0 25px rgba(229,9,20,0.4); border-color: #e50914; }
.favorito-item img { width: 100%; height: auto; display: block; object-fit: cover; aspect-ratio: 2/3; }
.favorito-title { padding: 10px; font-size: 0.9rem; font-weight: bold; color: white; text-align: center; background: rgba(0,0,0,0.7); }

.related-section { margin-top: 20px; border-top: 1px solid #333; padding-top: 15px; }
.related-section h3 { font-size: 1.1rem; margin-bottom: 10px; color: #ddd; }
.related-btn { background: transparent; color: white; border: none; font-size: 1.3rem; padding: 10px 12px; text-align: left; width: 100%; cursor: pointer; transition: background 0.2s, color 0.2s; border-bottom: 1px solid #8f0a0a; }
.related-btn:hover { background: rgba(173,173,173,0.05); }
.related-btn.selected { color: #e50914; background: rgba(229,9,20,0.1); }

@media (max-width: 1024px) { .search-results-grid { grid-template-columns: repeat(4, 1fr); } .movie { width: 180px; } .ver-mas-card { width: 180px; } }
/* ── Ver más button below each category ─────────────────────────────────── */
.category-ver-mas-btn {
  display: block;
  margin: 4px 10px 0;
  padding: 10px 0;
  width: calc(100% - 20px);
  background: #c81010;
  border: 1px solid #c81010;
  border-radius: 4px;
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-align: center;
}
.category-ver-mas-btn:hover { background: #e50914; border-color: #e50914; }

/* ── Genre Browser Overlay ───────────────────────────────────────────────── */
#genre-browser {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #121212;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.genre-browser-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18,18,18,0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 30px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.genre-browser-back {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  font-size: 1rem;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.genre-browser-back:hover { background: #e50914; border-color: #e50914; }
.genre-browser-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  margin: 0;
}
.genre-browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding: 24px 30px;
}
.genre-browser-grid .movie {
  width: 100%;
}
.genre-browser-loading {
  color: #aaa;
  text-align: center;
  padding: 30px;
  font-size: 1rem;
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .hero-carousel { height: 400px; width: calc(100% - 30px); }
    .hero-content { width: 80%; padding: 20px; }
    .hero-title { font-size: 1.8rem; }
    .hero-synopsis { font-size: 0.85rem; max-height: 80px; }
    .hero-btn { padding: 8px 18px; font-size: 1rem; }
    .movie { width: 150px; } .ver-mas-card { width: 150px; }
    .row { gap: 12px; padding: 12px 0; }
    .category h2 { font-size: 1.4rem; }
    .search-container { padding: 15px 20px; }
    .search-header { flex-direction: column; align-items: stretch; }
    .search-input-wrapper { max-width: 100%; }
    .nav-tabs { gap: 6px; padding: 8px 12px; overflow: visible; flex-wrap: wrap; justify-content: center; }
    .nav-brand { position: static; transform: none; width: 100%; justify-content: center; margin: 0 auto 6px; gap: 4px; }
    .nav-tabs-center { gap: 6px; flex-wrap: wrap; justify-content: center; padding-left: 0; }
    .nav-credits { position: static; transform: none; margin-top: 4px; font-size: 0.8rem; }
    .nav-logo-img { height: 42px; }
    .nav-logo { font-size: 1.1rem; }
    .tab-btn { font-size: 0.85rem; padding: 5px 10px; white-space: nowrap; }
    .info-content-wrapper { padding: 70px 18px 40px; gap: 24px; }
    .info-back-btn { top: 16px; left: 16px; width: 44px; height: 44px; }
    .info-back-btn svg { width: 22px; height: 22px; }
    #trailer-container.expanded { width: 95vw; position: fixed; }
    #info-title { font-size: 2.2rem; }
    .info-meta { font-size: 1rem; gap: 12px; flex-wrap: wrap; }
    #info-synopsis { font-size: 0.95rem; }
    .info-watch-btn, .info-fav-btn { font-size: 1.05rem; padding: 10px 22px; }
    .episodes-container { grid-template-columns: 1fr; max-height: 280px; }
}
@media (max-width: 600px) {
    .search-results-grid { grid-template-columns: repeat(2, 1fr); }
    .carousel-prev, .carousel-next { font-size: 1rem; padding: 8px 10px; }
    .player-top-bar { height: 48px; padding: 0 10px; }
    .player-back-btn { padding: 6px 12px; font-size: 0.85rem; gap: 4px; }
    .player-server-banner { padding: 3px 8px; gap: 6px; }
    .player-server-text { display: none; }
    .switch-provider-banner-btn { padding: 5px 10px; font-size: 0.75rem; }
    #player-iframe-container { height: calc(100% - 48px); }
}
@media (max-width: 480px) {
    .nav-tabs { padding: 6px 8px; gap: 4px; overflow: visible; }
    .nav-brand { gap: 3px; margin-bottom: 4px; }
    .nav-logo-img { height: 34px; }
    .nav-logo { font-size: 1rem; }
    .nav-tabs-center { gap: 4px; padding-left: 0; }
    .tab-btn { font-size: 0.8rem; padding: 4px 6px; }
    .movie { width: 120px; } .ver-mas-card { width: 120px; }
    .category h2 { font-size: 1.2rem; margin-left: 4px; }
    .category { margin: 0 10px; }
}
