/* File: themes/wondertag/assets/css/movies-new.css */
/* ============================================================
   MOVIES PAGE STYLES - Scoped to .movies-page-wrapper
   ============================================================ */

/* Scoped reset - only for movies page elements */
.movies-page-wrapper *,
.movies-page-wrapper *::before,
.movies-page-wrapper *::after {
  box-sizing: border-box;
}

/* Scoped link styles */
.movies-page-wrapper a {
  color: inherit;
  text-decoration: none;
}

/* Scoped button styles */
.movies-page-wrapper button {
  font-family: inherit;
}

/* Scoped list styles */
.movies-page-wrapper ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Variables scoped to .movies-page-wrapper (NOT :root) to prevent
   white flash — :root would paint #fff on the whole document before
   dark.css overrides it on slow mobile connections.
   Night is the site default; day tokens only under html[data-mode="day"].
   Soft-nav injects this file AFTER dark.css — day-as-default caused a
   full white paint on timeline → movie detail. */
.movies-page-wrapper {
  --primary-bg: #121212;
  --secondary-bg: #1a1a1a;
  --tertiary-bg: #2a2a2a;
  --accent-red: #e50914;
  --text-primary: #fff;
  --text-secondary: #b3b3b3;
  --movies-sticky-blend: 18, 18, 18;
  background: #121212;
  color: #fff;
}
html[data-mode="day"] .movies-page-wrapper {
  --primary-bg: #ffffff;
  --secondary-bg: #f5f5f5;
  --tertiary-bg: #e8e8e8;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --movies-sticky-blend: 255, 255, 255;
  background: #ffffff;
  color: #1a1a1a;
}

/* .page-margin (movies page): remove margin and padding so content is edge-to-edge */
.page-margin.movies-page-wrapper {
  margin: 0;
  padding: 0;
}

/* PAGE WRAPPER — overflow-x:hidden clips horizontal scroll; on mobile we override so category/pills can scroll (see below) */
/* cursor:default on wrapper so only clickable elements (tabs, pills, cards, buttons, links) show pointer — prevents finger/arrow flicker */
/* NOTE: Using overflow: clip instead of hidden so sticky positioning still works on children */
.movies-page-wrapper {
  background: var(--primary-bg);
  color: var(--text-primary);
  overflow-x: clip;
  cursor: default;
}

.movies-page-container {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  box-sizing: border-box;
}

/* HEADER SECTION — negative margin matches container padding so hero breaks out */
.movies-header-section {
  margin: 0 -5px;
  width: calc(100% + 10px);
  max-width: 100vw;
  box-sizing: border-box;
}

.movies-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
  box-sizing: border-box;
}

.movies-hero-section {
  overflow: hidden;
  max-height: 620px;
  opacity: 1;
  margin-bottom: -1px;
  transition:
    max-height 0.35s ease,
    opacity 0.24s ease,
    margin-bottom 0.35s ease;
}

.movies-hero-section.movies-hero-listing-hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.movies-hero-section.movies-hero-listing-hidden .hero-slider,
.movies-hero-section.movies-hero-listing-hidden
  .movies-header-section
  .hero-slider {
  min-height: 0;
  max-height: 0;
  height: 0;
}

@media (min-width: 1025px) {
  /* overflow-x:hidden on body computes overflow-y to auto and can break sticky.
     clip keeps horizontal containment without creating a scrollport. */
  body:has(.movies-page-wrapper:not(.watch-page-wrapper)) {
    overflow-x: clip;
  }

  /* Pin the existing movies nav under the 56px triBBBal header.
     Widths stay original; only the frost layer goes full-bleed when stuck. */
  .movies-page-wrapper:not(.watch-page-wrapper) .movies-header-section {
    position: sticky;
    top: 56px;
    z-index: 90;
    background: transparent;
    overflow: visible;
  }

  .movies-page-wrapper:not(.watch-page-wrapper) .movies-header-inner {
    position: relative;
    z-index: 1;
  }

  /* Netflix-style frost: full-bleed across the content column only.
     Search, tabs, and filters keep the original 950px / 1400px structure. */
  .movies-page-wrapper:not(.watch-page-wrapper) .movies-header-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(100% + 72px);
    z-index: 0;
    pointer-events: none;
    border-radius: 0;
    background: linear-gradient(
      to bottom,
      rgba(var(--movies-sticky-blend, 18, 18, 18), 0.94) 0%,
      rgba(var(--movies-sticky-blend, 18, 18, 18), 0.72) 40%,
      rgba(var(--movies-sticky-blend, 18, 18, 18), 0.32) 70%,
      rgba(var(--movies-sticky-blend, 18, 18, 18), 0) 100%
    );
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    transform: translateZ(0);
    -webkit-mask-image: linear-gradient(
      to bottom,
      #000 0%,
      #000 58%,
      transparent 100%
    );
    mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
    opacity: 0;
    transition: opacity 0.28s ease;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck::before {
    opacity: 1;
    height: calc(100% + 48px);
  }

  /* Compact 2-line sticky bar. Original stacked header is unchanged until stuck. */
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section
    .mv-ai-header-actions,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section
    .movies-cat-nav-row,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section
    .sorting-section,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section
    .filters-section,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section
    .mv-ai-toolbar,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section
    .dataset-tab,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section
    .dataset-nav-wrap {
    transition:
      margin 0.32s ease,
      padding 0.32s ease,
      max-width 0.32s ease,
      gap 0.32s ease,
      font-size 0.32s ease;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .movies-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 12px;
    row-gap: 4px;
    padding-top: 4px;
    padding-bottom: 6px;
    animation: movies-sticky-compact 0.32s ease;
  }

  /* Line 1: categories | compact search + Nnubia */
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .movies-cat-nav-row {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .mv-ai-header-actions {
    order: 2;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .sorting-section,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .filters-section,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .filters-section#moviesFiltersSection,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .filter-chips-row {
    display: none !important;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .dataset-nav-wrap {
    margin-bottom: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .dataset-nav-inner {
    justify-content: flex-start;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .dataset-tab {
    padding: 4px 12px 0;
    font-size: 13px;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .mv-ai-toolbar {
    max-width: 260px;
    width: 260px;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .mv-ai-toolbar
    .search-wrap
    input#search-movies {
    padding: 6px 92px 6px 36px;
    font-size: 12px;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .mv-ai-toolbar-action-label {
    display: none;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .mv-ai-toolbar-action,
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .mv-ai-toolbar-action-primary {
    height: 32px;
    width: 32px;
    padding: 0;
  }

  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck
    .mv-ai-toolbar
    .search-clear-btn {
    right: 76px;
    width: 22px;
    height: 22px;
  }
}

@keyframes movies-sticky-compact {
  from {
    opacity: 0.88;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* HERO SLIDER — desktop: slightly shorter so content below sits higher */
.movies-header-section .hero-slider {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 320px;
  max-height: 540px;
  overflow: hidden;
  background: var(--primary-bg);
  transition:
    height 0.35s ease-out,
    min-height 0.35s ease-out,
    max-height 0.35s ease-out;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 360px;
  max-height: 540px;
  overflow: hidden;
  background: var(--primary-bg);
  transition:
    height 0.35s ease-out,
    min-height 0.35s ease-out,
    max-height 0.35s ease-out;
}

/* Seamlessly feather the bottom-edge of the hero slider to eliminate sharp lines in both Day and Night mode */
.hero-slider::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 72px;
  background: linear-gradient(
    to top,
    var(--primary-bg) 0%,
    var(--primary-bg) 30%,
    transparent 100%
  );
  z-index: 5;
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(-100%);
  transition:
    opacity 1.04s cubic-bezier(0.22, 0.9, 0.28, 1),
    transform 1.04s cubic-bezier(0.22, 0.9, 0.28, 1);
  will-change: transform, opacity;
  z-index: 1;
}

.hero-slide.slide-from-left {
  transform: translateX(-100%);
}

.hero-slide.slide-from-right {
  transform: translateX(100%);
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0) !important;
  z-index: 2;
}

.hero-slide.exit-left {
  opacity: 0;
  transform: translateX(-100%) !important;
  z-index: 1;
}

.hero-slide.exit-right {
  opacity: 0;
  transform: translateX(100%) !important;
  z-index: 1;
}

.hero-slide.exit-static {
  opacity: 0;
  transform: translateX(0) !important;
  z-index: 1;
}


/* Banner image/video fills slide without stretching the section */
.hero-slide .hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-slide.active .hero-image {
  transform: none;
}

.hero-slide video.hero-image {
  object-fit: cover;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-slide.active .hero-bg {
  transform: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 56px 6% 80px;
  transition: padding 0.35s ease-out;
  background:
    linear-gradient(
      to top,
      rgba(18, 18, 18, 0.98) 0%,
      rgba(18, 18, 18, 0.75) 20%,
      rgba(18, 18, 18, 0.35) 55%,
      rgba(18, 18, 18, 0.45) 100%
    ),
    linear-gradient(
      to right,
      rgba(18, 18, 18, 0.92) 0%,
      rgba(18, 18, 18, 0.65) 25%,
      rgba(18, 18, 18, 0.35) 60%,
      rgba(18, 18, 18, 0.5) 100%
    ),
    radial-gradient(
      ellipse at center,
      transparent 40%,
      rgba(18, 18, 18, 0.55) 100%
    );
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 480px;
  position: relative;
  z-index: 2;
  transform: translateY(40px);
  opacity: 0;
  filter: blur(0);
  transition:
    transform 0.52s ease,
    opacity 0.52s ease,
    filter 0.52s ease;
}

.hero-slide.active .hero-content {
  transform: translateY(0);
  opacity: 1;
}

/* Transition sequence states for movies banner copy.
   1) current text fades out and drifts upward while image changes
   2) new text waits until image settles, then springs up from below */
.hero-slide.text-out .hero-content {
  opacity: 0;
  transform: translateY(-22px) !important;
  filter: blur(2px);
  transition:
    opacity 0.34s ease-out,
    transform 0.34s ease-out,
    filter 0.34s ease-out;
}

.hero-slide.active.text-enter-pending .hero-content {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(2px);
}

.hero-slide.active.text-in .hero-content {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition:
    transform 0.82s cubic-bezier(0.22, 1.28, 0.35, 1),
    opacity 0.5s ease,
    filter 0.52s ease;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 5px;
  margin-bottom: 14px;
}

.sponsored-badge {
  display: inline-block;
  background: var(--accent-red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 5px;
  margin-bottom: 14px;
  white-space: nowrap;
}

.hero-title {
  font-size: 48px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 1.5px;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.hero-sep {
  opacity: 0.5;
  font-size: 10px;
}

.hero-meta .separator {
  opacity: 0.5;
  font-size: 10px;
  margin: 0 1px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions .btn-primary svg,
.hero-actions .btn-secondary svg,
.hero-actions .btn-watch-now svg,
.hero-actions .btn-add-list svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Static hero (movies.phtml placeholder) */
.btn-watch-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.04) 40%,
      transparent 50%,
      rgba(0, 0, 0, 0.08) 100%
    ),
    rgba(229, 9, 20, 0.85);
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.2);
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
}

.btn-watch-now:hover {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.08) 40%,
      transparent 50%,
      rgba(0, 0, 0, 0.12) 100%
    ),
    #ff1a25;
  transform: scale(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.35);
}

.btn-add-list {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.03) 40%,
      transparent 50%,
      rgba(0, 0, 0, 0.1) 100%
    ),
    rgba(40, 40, 40, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.2);
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}

.btn-add-list:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.06) 40%,
      transparent 50%,
      rgba(0, 0, 0, 0.18) 100%
    ),
    rgba(60, 60, 60, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Dynamic banner hero (Wo_RenderCategoryBanner) — same look.
   Must stay scoped: unscoped .btn-primary restyles timeline Vote and every
   Bootstrap primary button site-wide. */
.movies-page-wrapper .btn-primary,
.hero-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.04) 40%,
      transparent 50%,
      rgba(0, 0, 0, 0.08) 100%
    ),
    rgba(229, 9, 20, 0.85);
  color: #fff !important;
  border: none;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.2);
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
}

.movies-page-wrapper .btn-primary:hover,
.hero-actions .btn-primary:hover {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.08) 40%,
      transparent 50%,
      rgba(0, 0, 0, 0.12) 100%
    ),
    #ff1a25;
  transform: scale(1.03);
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.35);
}

.movies-page-wrapper .btn-secondary,
.hero-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.03) 40%,
      transparent 50%,
      rgba(0, 0, 0, 0.1) 100%
    ),
    rgba(40, 40, 40, 0.55);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.2);
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}

.movies-page-wrapper .btn-secondary:hover,
.hero-actions .btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.06) 40%,
      transparent 50%,
      rgba(0, 0, 0, 0.18) 100%
    ),
    rgba(60, 60, 60, 0.9);
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.35);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition:
    background 0.2s,
    transform 0.2s;
}

.slider-arrow:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-50%) scale(1.08);
}

.slider-prev {
  left: 20px;
}

.slider-next {
  right: 20px;
}

.slider-arrow svg {
  width: 26px;
  height: 26px;
}

/* Slider dots: horizontal, at bottom of hero, 6px from edge, faded */
.slider-dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
  right: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  z-index: 25;
  opacity: 0.75;
}

.slider-dot {
  width: 24px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
  flex-shrink: 0;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.45);
}

.slider-dot.active {
  background: rgba(229, 9, 20, 0.7);
  width: 32px;
}

@media (max-width: 1024px) {
  .slider-dots {
    bottom: 6px;
  }

  .slider-dot {
    width: 20px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
  }

  .slider-dot:hover {
    background: rgba(255, 255, 255, 0.4);
  }

  .slider-dot.active {
    background: rgba(229, 9, 20, 0.6);
    width: 26px;
  }
}

@media (max-width: 560px) {
  .slider-dots {
    bottom: 6px;
    gap: 6px;
  }

  .slider-dot {
    width: 18px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
  }

  .slider-dot.active {
    background: rgba(229, 9, 20, 0.55);
    width: 22px;
  }
}

/* PAGE TITLE — hidden per design; slider-dots take prominence at top */
.movies-page-title {
  display: none !important;
}

/* SEARCH — neon glow */
@keyframes neonPulse {
  0%,
  100% {
    box-shadow:
      0 0 5px rgba(220, 38, 38, 0.3),
      0 0 10px rgba(220, 38, 38, 0.15),
      inset 0 0 6px rgba(220, 38, 38, 0.06);
  }
  50% {
    box-shadow:
      0 0 8px rgba(220, 38, 38, 0.45),
      0 0 18px rgba(220, 38, 38, 0.2),
      inset 0 0 8px rgba(220, 38, 38, 0.08);
  }
}

.search-wrap {
  width: 100%;
  max-width: 380px;
  margin: 16px auto 8px;
  position: relative;
}

.search-wrap form.search-form {
  margin: 0;
  padding: 0;
  width: 100%;
  display: block;
}

.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(220, 38, 38, 0.45);
  pointer-events: none;
  transition:
    color 0.35s ease,
    filter 0.35s ease;
  filter: drop-shadow(0 0 3px rgba(220, 38, 38, 0.3));
}

.search-wrap input {
  width: 100%;
  padding: 10px 20px 10px 44px;
  font-size: 14px;
  background: rgba(220, 38, 38, 0.03);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  outline: none;
  font-family: inherit;
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
  box-shadow:
    0 0 5px rgba(220, 38, 38, 0.3),
    0 0 10px rgba(220, 38, 38, 0.15),
    inset 0 0 6px rgba(220, 38, 38, 0.06);
  animation: neonPulse 3s ease-in-out infinite;
}

.search-wrap input::placeholder {
  color: rgba(220, 38, 38, 0.4);
  text-shadow: 0 0 6px rgba(220, 38, 38, 0.15);
}

.search-wrap input:focus {
  border-color: rgba(220, 38, 38, 0.65);
  box-shadow:
    0 0 10px rgba(220, 38, 38, 0.5),
    0 0 25px rgba(220, 38, 38, 0.25),
    0 0 50px rgba(220, 38, 38, 0.1),
    inset 0 0 10px rgba(220, 38, 38, 0.08);
  background: rgba(220, 38, 38, 0.05);
  animation: none;
}

.search-wrap:focus-within svg {
  color: rgba(220, 38, 38, 0.8);
  filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.6));
}

/* Search: grid-only; dropdown list is not used */
.movies-page-wrapper #search-movies-result,
.movies-page-wrapper .search-result#search-movies-result {
  display: none !important;
}

/* DATASET NAV TABS — redline touches bottom border; ACTIVE pill below (wrap not clipped) */
.dataset-nav-wrap {
  width: 100%;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.dataset-nav-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
}

.dataset-nav-scroll::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.dataset-nav-inner {
  min-width: 100%;
  min-width: max-content;
  padding: 0 4px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  touch-action: pan-x;
}

.dataset-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
}

/* Allow immediate horizontal slide (no tap delay); taps still fire for navigation */
.dataset-nav-scroll .dataset-tab,
.dataset-tab {
  touch-action: pan-x;
}

.dataset-tab {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px 0;
  height: auto;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
  background: none;
  border: none;
  font-family: inherit;
}

.dataset-tab:hover {
  color: #fff;
}

.dataset-tab.active {
  color: #fff;
  font-weight: 600;
}

.tab-label {
  display: inline-flex;
  align-items: center;
  padding-bottom: 10px;
  min-height: 18px;
  line-height: 1.1;
}

.tab-underline {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-red);
  border-radius: 2px 2px 0 0;
}

/* ACTIVE pill below the nav, positioned by JS — wrap has no overflow so pill is visible */
.active-indicator {
  position: absolute;
  top: 100%;
  margin-top: 6px;
  left: 0;
  display: inline-block;
  background: var(--accent-red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  line-height: 1.5;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
  transition:
    left 0.2s ease,
    opacity 0.15s ease;
  opacity: 0;
}

.active-indicator.visible {
  opacity: 1;
}

.tab-dropdown {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
}

.dataset-nav-scroll .tab-dropdown-btn {
  touch-action: pan-x;
}

.tab-dropdown-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  margin: 0;
  font-family: inherit;
  color: var(--text-secondary);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 18px 0;
  transition: color 0.2s;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
}

.tab-dropdown-btn:hover,
.tab-dropdown-btn.active,
.tab-dropdown-btn[aria-expanded="true"] {
  color: #fff;
}

.tab-trigger-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: inherit;
  font-weight: inherit;
  padding-bottom: 10px;
  min-height: 18px;
  line-height: 1.1;
}

.tab-trigger-label {
  display: inline-block;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.tab-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

/* --- MOBILE ONLY REFINEMENTS (Ultra-Compact) --- */
@media (max-width: 1024px) {
  .dataset-tab,
  .tab-dropdown-btn {
    padding-top: 2px !important;
  }

  .tab-label,
  .tab-trigger-row {
    padding-bottom: 4px !important;
    line-height: 1 !important;
  }

  .tab-underline {
    bottom: -1px !important;
  }
}

.tab-dropdown-btn.active .tab-chevron,
.tab-dropdown-btn[aria-expanded="true"] .tab-chevron {
  transform: rotate(180deg);
}

/* DROPDOWN MENU — works in-page, by ID, and for body-level clones */
.movies-page-wrapper .dropdown-menu,
.movies-page-wrapper .tab-dropdown .dropdown-menu,
#festivalMenu,
#myListingMenu,
[data-dropdown-clone] {
  display: none;
  position: fixed;
  min-width: 160px;
  padding: 4px 0;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  list-style: none;
  margin: 0;
  z-index: 999999;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}
/* Source menus are ALWAYS hidden — only the body-level clone shows */
#festivalMenu,
#myListingMenu {
  display: none !important;
}

.movies-page-wrapper .dropdown-menu.open,
[data-dropdown-clone].open {
  display: block;
  animation: mlDropIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mlDropIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }

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

.movies-page-wrapper .dropdown-menu li,
#festivalMenu li,
#myListingMenu li,
[data-dropdown-clone] li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.movies-page-wrapper .dropdown-menu li a,
#festivalMenu li a,
#myListingMenu li a,
[data-dropdown-clone] li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  color: #d0d0d0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.35;
  transition:
    background 0.14s,
    color 0.14s;
}

.movies-page-wrapper .dropdown-menu li a:hover,
#festivalMenu li a:hover,
#myListingMenu li a:hover,
[data-dropdown-clone] li a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.movies-page-wrapper .dropdown-menu li a::before,
#festivalMenu li a::before,
#myListingMenu li a::before,
[data-dropdown-clone] li a::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.14s;
}

.movies-page-wrapper .dropdown-menu li a:hover::before,
#festivalMenu li a:hover::before,
#myListingMenu li a:hover::before,
[data-dropdown-clone] li a:hover::before {
  background: var(--accent-red);
}

.movies-page-wrapper .dropdown-menu .divider,
#festivalMenu .divider,
#myListingMenu .divider,
[data-dropdown-clone] .divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  margin: 3px 12px;
  padding: 0 !important;
}

.movies-page-wrapper .dropdown-menu .divider::before,
.movies-page-wrapper .dropdown-menu .divider a,
#festivalMenu .divider::before,
#festivalMenu .divider a,
#myListingMenu .divider::before,
#myListingMenu .divider a,
[data-dropdown-clone] .divider::before,
[data-dropdown-clone] .divider a {
  display: none !important;
}

.movies-page-wrapper .dropdown-menu .submit-item > a,
#festivalMenu .submit-item > a,
#myListingMenu .submit-item > a,
[data-dropdown-clone] .submit-item > a {
  color: var(--accent-red) !important;
  font-weight: 600 !important;
}

.movies-page-wrapper .dropdown-menu .submit-item > a::before,
#festivalMenu .submit-item > a::before,
#myListingMenu .submit-item > a::before,
[data-dropdown-clone] .submit-item > a::before {
  background: var(--accent-red) !important;
}

.movies-page-wrapper .dropdown-menu .submit-item > a:hover,
#festivalMenu .submit-item > a:hover,
#myListingMenu .submit-item > a:hover,
[data-dropdown-clone] .submit-item > a:hover {
  background: rgba(229, 9, 20, 0.1) !important;
  color: #ff5555 !important;
}

/* SORT PILLS — glossy glass, rounded, centered */
.sorting-section {
  padding: 4px 0 6px;
  display: flex;
  justify-content: center;
}

.sorting-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.sort-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.02) 100%
  );
  color: var(--text-primary);
  border: none;
  padding: 2.5px 7px;
  font-size: 9.5px;
  font-weight: 500;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.25);
  touch-action: pan-x;
  box-sizing: border-box;
}

.sort-pill:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 2px 6px rgba(0, 0, 0, 0.3);
}

.sort-pill:focus {
  outline: none;
}

.sort-pill.active {
  background: var(--accent-red);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 1px 4px rgba(229, 9, 20, 0.35);
}

/* FILTER CONTROLS — Chips + Clear All above dropdowns; Genre, Country, Year, Price on one line */
.filters-section {
  padding: 5px 0 8px;
  display: block;
  visibility: visible;
  min-height: 1px;
}

.filter-chips-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  transition: opacity 0.15s ease;
}

.filter-chips-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  transition:
    opacity 0.15s ease,
    transform 0.1s ease;
}

#moviesFiltersSection .filter-row {
  display: flex;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  flex-wrap: nowrap;
}

.filter-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  flex-wrap: nowrap;
}

/* Movies page DESKTOP (1025px+): category nav, sort pills, filter row same band (950px, 30px). Override 200–1240px rule so all start from the same left edge. */
@media (min-width: 1025px) {
  .movies-page-wrapper .movies-cat-nav-row,
  .movies-cat-nav-row {
    padding-left: 30px !important;
    padding-right: 30px !important;
  }
  .movies-page-wrapper .sorting-section,
  .sorting-section {
    padding-left: 30px !important;
    padding-right: 30px !important;
  }
  .filters-section#moviesFiltersSection {
    max-width: 950px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }
  #moviesFiltersSection .filter-row,
  .movies-page-wrapper .filters-section .filter-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
  }
  /* Desktop: compact — Genre & Country left, Year & Price right; dropdowns only as wide as label + arrow */
  #moviesFiltersSection .filter-left,
  .movies-page-wrapper .filters-section .filter-left {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    display: flex !important;
    gap: 6px !important;
  }
  #moviesFiltersSection .filter-right,
  .movies-page-wrapper .filters-section .filter-right {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  /* Compact .fdr on desktop: only as wide as label + arrow, not stretched */
  #moviesFiltersSection .filter-left .fdr,
  #moviesFiltersSection .filter-right .fdr,
  .movies-page-wrapper .filters-section .filter-left .fdr,
  .movies-page-wrapper .filters-section .filter-right .fdr {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 1ch !important;
    max-width: 180px !important;
    box-sizing: border-box !important;
  }
  #moviesFiltersSection .fdr,
  .movies-page-wrapper .filters-section .fdr {
    padding: 4px 12px 4px 8px !important;
    font-size: 11px !important;
  }
  #moviesFiltersSection .results-count,
  .movies-page-wrapper .filters-section .results-count {
    flex: 0 0 auto !important;
  }
  #moviesFiltersSection .sort-by-label,
  .movies-page-wrapper .filters-section .sort-by-label {
    flex: 0 0 auto !important;
    margin-right: 6px !important;
  }
}

/* Movies page MOBILE (max-width: 1024px): exact same styling as sticky filter bar */
@media (max-width: 1024px) {
  .filters-section#moviesFiltersSection {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
  /* = .sfb-filters */
  #moviesFiltersSection .filter-row,
  .movies-page-wrapper .filters-section .filter-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 0 !important;
    flex-wrap: nowrap !important;
  }
  /* = .sfb-left, .sfb-right */
  #moviesFiltersSection .filter-left,
  #moviesFiltersSection .filter-right,
  .movies-page-wrapper .filters-section .filter-left,
  .movies-page-wrapper .filters-section .filter-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
  }
  /* = .sfb-left .fdr, .sfb-right .fdr */
  #moviesFiltersSection .filter-left .fdr,
  #moviesFiltersSection .filter-right .fdr,
  .movies-page-wrapper .filters-section .filter-left .fdr,
  .movies-page-wrapper .filters-section .filter-right .fdr {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  /* = .sticky-filter-bar .fdr */
  #moviesFiltersSection .fdr,
  .movies-page-wrapper .filters-section .fdr {
    padding: 3px 10px 3px 6px !important;
    font-size: 11px !important;
    min-height: 24px !important;
  }
  /* = .sticky-filter-bar .sort-by-label */
  #moviesFiltersSection .sort-by-label,
  .movies-page-wrapper .filters-section .sort-by-label {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.5) !important;
  }
}
@media (max-width: 768px) {
  #moviesFiltersSection .fdr,
  .movies-page-wrapper .filters-section .fdr {
    font-size: 10px !important;
    padding: 4px 12px 4px 6px !important;
  }
  #moviesFiltersSection .sort-by-label,
  .movies-page-wrapper .filters-section .sort-by-label {
    font-size: 10px !important;
  }
}
@media (max-width: 560px) {
  #moviesFiltersSection .filter-row,
  .movies-page-wrapper .filters-section .filter-row {
    gap: 4px !important;
  }
  #moviesFiltersSection .filter-left,
  #moviesFiltersSection .filter-right,
  .movies-page-wrapper .filters-section .filter-left,
  .movies-page-wrapper .filters-section .filter-right {
    gap: 4px !important;
    flex-wrap: nowrap !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
  #moviesFiltersSection .filter-left .fdr,
  #moviesFiltersSection .filter-right .fdr,
  .movies-page-wrapper .filters-section .filter-left .fdr,
  .movies-page-wrapper .filters-section .filter-right .fdr {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  #moviesFiltersSection .fdr,
  .movies-page-wrapper .filters-section .fdr {
    font-size: 10px !important;
    padding: 5px 12px 5px 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  #moviesFiltersSection .sort-by-label,
  .movies-page-wrapper .filters-section .sort-by-label {
    font-size: 10px !important;
    margin-right: 4px !important;
  }
}
@media (max-width: 420px) {
  #moviesFiltersSection .sort-by-label,
  .movies-page-wrapper .filters-section .sort-by-label {
    display: none !important;
  }
  #moviesFiltersSection .fdr,
  .movies-page-wrapper .filters-section .fdr {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }
}
@media (max-width: 360px) {
  #moviesFiltersSection .fdr,
  .movies-page-wrapper .filters-section .fdr {
    font-size: 9px !important;
    padding: 3px 12px 3px 5px !important;
  }
}

.filter-left .fdr,
.filter-right .fdr {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sort-by-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

.results-count {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px 5px 12px;
  font-size: 12.5px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  white-space: nowrap;
}

.chip-x {
  cursor: pointer;
  opacity: 0.6;
  font-size: 15px;
  line-height: 1;
  padding-left: 2px;
  transition: opacity 0.15s;
}

.chip-x:hover {
  opacity: 1;
}

.btn-clearall {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.btn-clearall:hover {
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

/* All filter dropdowns: Pill-style (matching sort pills); dark glossy glass; Genre, Country, Year, Price */
.fdr,
#moviesFiltersSection .fdr,
.filters-section select.fdr,
.sticky-filter-bar .fdr {
  padding: 0 14px 0 6px !important;
  font-size: 9.5px;
  font-weight: 500;
  color: #fff !important;
  background-color: rgba(28, 28, 28, 0.85) !important;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.04) 50%,
      rgba(255, 255, 255, 0.02) 100%
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='rgba(255,255,255,.5)'%3E%3Cpath d='M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6-6-6z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat;
  background-position:
    0 0,
    right 5px center !important;
  border: none !important;
  border-radius: 99px !important;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.35);
  font-family: inherit;
  transition: all 0.2s;
  height: 20px !important;
  min-height: 20px !important;
  line-height: normal !important;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  max-width: none;
}

.fdr:hover,
#moviesFiltersSection .fdr:hover,
.filters-section select.fdr:hover,
.sticky-filter-bar .fdr:hover {
  background-color: rgba(42, 42, 42, 0.92) !important;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.06) 50%,
      rgba(255, 255, 255, 0.03) 100%
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 24 24' fill='rgba(255,255,255,.8)'%3E%3Cpath d='M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6-6-6z'/%3E%3C/svg%3E") !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

/* Fit to displayed text on all screens; same for main section and sticky bar */
.filters-section .fdr,
.sticky-filter-bar .fdr {
  width: fit-content;
  min-width: 1ch;
  max-width: min(100%, 220px);
}

/* Desktop: category tabs, sort pills, and filter section same width as movie sections (950px, centered) */
@media (min-width: 1025px) {
  .movies-cat-nav-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 30px;
    padding-right: 30px;
    box-sizing: border-box;
  }

  .movies-cat-nav-row #datasetNavWrap {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .movies-cat-nav-row .dataset-nav-wrap {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  .dataset-nav-wrap {
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 30px;
    padding-right: 30px;
    box-sizing: border-box;
  }

  .sorting-section {
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 30px;
    padding-right: 30px;
    box-sizing: border-box;
  }

  .filters-section {
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    padding: 6px 30px 10px;
  }
}

@media (min-width: 200px) and(max-width:1240px) {
  .movies-cat-nav-row {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  .dataset-nav-wrap {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  .sorting-section {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  .filters-section {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

/* Desktop: compact filter-section — buttons only as wide as label + arrow, no extra space */
@media (min-width: 1025px) {
  .filters-section .filter-row {
    justify-content: space-between;
  }

  .filters-section .filter-left {
    flex: 0 0 auto;
    min-width: 0;
  }

  .filters-section .filter-right {
    flex: 0 0 auto;
    min-width: 0;
    margin-left: auto;
  }

  /* All four (Genre, Country, Year, Price): compact width, only as wide as label + arrow */
  .filters-section .filter-left .fdr,
  .filters-section .filter-right .fdr {
    flex: 0 0 auto;
    width: auto;
    min-width: 1ch;
    max-width: 5rem;
    box-sizing: border-box;
  }

  .filters-section .filter-left select[aria-label="Filter by genre"],
  .filters-section .filter-left select[aria-label="Filter by country"],
  #moviesFiltersSection .filter-left select[aria-label="Filter by genre"],
  #moviesFiltersSection .filter-left select[aria-label="Filter by country"],
  .movies-page-wrapper
    .filters-section
    .filter-left
    select[aria-label="Filter by genre"],
  .movies-page-wrapper
    .filters-section
    .filter-left
    select[aria-label="Filter by country"] {
    width: 80px !important;
    max-width: 80px !important;
    min-width: 80px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .filters-section .filter-right select[aria-label="Filter by year"],
  .filters-section .filter-right select[aria-label="Filter by price"],
  #moviesFiltersSection .filter-right select[aria-label="Filter by year"],
  #moviesFiltersSection .filter-right select[aria-label="Filter by price"],
  .movies-page-wrapper
    .filters-section
    .filter-right
    select[aria-label="Filter by year"],
  .movies-page-wrapper
    .filters-section
    .filter-right
    select[aria-label="Filter by price"] {
    width: 65px !important;
    max-width: 65px !important;
    min-width: 65px !important;
  }

  .filters-section .fdr {
    padding: 4px 12px 4px 8px;
    font-size: 10px;
    border-radius: 4px;
  }

  .filters-section .sort-pill {
    padding: 4px 10px;
    font-size: 11px;
  }

  .filters-section .chip {
    padding: 4px 8px;
    font-size: 11px;
  }

  .filters-section .sort-by-label {
    font-size: 10px;
  }

  .filters-section .results-count {
    font-size: 12px;
  }

  .filters-section .btn-clearall {
    padding: 4px 10px;
    font-size: 11px;
  }
}

.fdr:focus {
  outline: 1px solid var(--accent-red);
  outline-offset: 2px;
}

.fdr option {
  background: #1a1a1a;
  color: #fff;
}

/* MOVIES PAGE INNER */
.movies-page-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

/* SECTIONS — same width/padding as art-gallery .container (max-width 950px, centered) */
.movies-sections-wrap {
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
  padding: 14px 30px 60px;
}

@media (min-width: 200px) and(max-width:1240px) {
  .movies-sections-wrap {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

/* Mobile: same as art-gallery — 5px left/right on sections wrap (200–1240px already uses 5px above) */
@media (max-width: 768px) {
  .movies-sections-wrap {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

@media (max-width: 560px) {
  .movies-sections-wrap {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

@media (max-width: 360px) {
  .movies-sections-wrap {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

.movies-sections-wrap.movies-sections-loading {
  min-height: 280px;
  opacity: 0.85;
  pointer-events: none;
  position: relative;
}

.movies-sections-wrap.movies-sections-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-red, #e50914);
  border-radius: 50%;
  animation: movies-loading-spin 0.7s linear infinite;
}

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

/* Sections are plain flow on main page — no transform, no per-card animation (avoids flicker) */
.movies-section {
  margin-bottom: 20px;
  opacity: 0;
  transition: opacity 0.25s ease-out;
  will-change: opacity;
}

.movies-section.scroll-in {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .movies-section {
    opacity: 1;
    transition: none;
  }

  .hero-slide,
  .hero-slide .hero-image,
  .hero-bg,
  .hero-content {
    transition: none;
  }

  .hero-slide.active {
    opacity: 1;
    transform: translateX(0);
  }

  .hero-slide.active .hero-image,
  .hero-slide.active .hero-bg {
    transform: scale(1);
  }

  .hero-slide.active .hero-content {
    transform: translateY(0);
    opacity: 1;
  }

  .hero-slide.text-out .hero-content,
  .hero-slide.active.text-enter-pending .hero-content,
  .hero-slide.active.text-in .hero-content {
    opacity: 1;
    transform: translateY(0);
    transition: none;
  }
}

.movies-section:last-child {
  margin-bottom: 0;
}

.movies-section-header {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.movies-section-header-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.movies-section-header-link:hover {
  color: var(--accent-red, #e50914);
}

.movies-section-header-arrow {
  opacity: 0.4;
  transition:
    opacity 0.2s,
    transform 0.2s;
  flex-shrink: 0;
}

.movies-section-header-link:hover .movies-section-header-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: var(--accent-red, #e50914);
}

/* Only this row scrolls horizontally; no transform/layer — stays on main page for smooth scroll */
.movies-section-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 10px;
  align-items: stretch;
  will-change: transform;
}

.movies-section-row--end {
  overscroll-behavior-x: none;
}

.movies-section-row::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.movies-section-row .movie-card,
.movies-section-row .movie-card-placeholder {
  flex: 0 0 168px !important;
  min-width: 168px !important;
  max-width: 168px !important;
  width: 168px !important;
  will-change: transform;
}

.movies-section-view-more {
  flex: 0 0 168px;
  min-width: 168px;
  width: 168px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}

.movies-section-view-more:hover {
  border-color: rgba(229, 9, 20, 0.5);
  color: var(--accent-red);
  background: rgba(229, 9, 20, 0.04);
}

.movies-section-view-more svg {
  opacity: 0.6;
}

.movies-section-row-load-more-card {
  flex: 0 0 168px;
  min-width: 168px;
  width: 168px;
  min-height: 220px;
  flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.5);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
}

.movies-section-row-load-more-card:hover {
  border-color: rgba(229, 9, 20, 0.5);
  color: var(--accent-red);
  background: rgba(229, 9, 20, 0.06);
}

.movies-section-row-load-more-card svg {
  opacity: 0.7;
}

/* Listing mode: vertical grid (no horizontal scroll) */
.movies-listing-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  overflow: visible !important;
  flex-wrap: unset !important;
  cursor: default;
}

.movies-listing-grid .movie-card {
  flex: none !important;
  min-width: unset !important;
  max-width: none !important;
  width: auto !important;
  cursor: pointer;
}

/* Load-more placeholders: same size as listing grid movie cards (grid cell controls size) */
.movies-listing-grid .movie-card-placeholder {
  flex: none !important;
  min-width: unset !important;
  max-width: none !important;
  width: auto !important;
  display: flex;
  flex-direction: column;
}

/* Load-more placeholder row: wrapper doesn't create a grid cell, so placeholders flow in grid */
.movies-listing-grid .movies-listing-load-more-placeholders {
  display: contents;
}

.movies-listing-view-more-wrap {
  text-align: center;
  margin-top: 28px;
  margin-bottom: 20px;
}

.movies-listing-view-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}

.movies-listing-view-more:hover {
  background: #ff1a25;
  transform: scale(1.03);
  color: #fff;
}

@media (max-width: 1280px) {
  .movies-listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .movies-listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .movies-listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .movies-listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

.movies-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.movies-listing-error-state {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.movies-listing-error-banner {
  margin-bottom: 16px;
  padding: 12px 0;
}

.movies-listing-error-msg {
  color: var(--text-secondary, #999);
  margin: 0;
}

.movies-retry-btn {
  background: var(--accent-red, #e50914);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 8px;
}

.movies-retry-btn:hover {
  opacity: 0.9;
}

.movies-load-full-link {
  color: var(--accent-red, #e50914);
  margin-left: 8px;
  text-decoration: underline;
}

.movies-load-full-link:hover {
  opacity: 0.9;
}

.movies-empty-state p {
  margin: 0 0 8px;
  font-size: 15px;
}

.movies-empty-state p:last-of-type {
  margin-bottom: 0;
  opacity: 0.9;
}

.movies-page-wrapper .dropdown-menu .active-page a {
  color: #fff;
  font-weight: 600;
}

.movies-page-wrapper .dropdown-menu .active-page a::before {
  background: var(--accent-red);
}

/* Placeholder cards: fill row when a section has few movies (desktop + mobile) */
.movie-card-placeholder {
  flex: 0 0 168px !important;
  min-width: 168px !important;
  max-width: 168px !important;
  width: 168px !important;
  border-radius: 14px;
  flex-shrink: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.movie-card-placeholder .ph-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: movies-skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 10px 10px 0 0;
  flex-shrink: 0;
}

.movie-card-placeholder .ph-info {
  flex: 1;
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.movie-card-placeholder .ph-line {
  height: 6px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: 4px;
  width: 100%;
}

.movie-card-placeholder .ph-line.short {
  width: 60%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* Section load more + skeleton */
.movies-section-load-more {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.movies-section-skeleton-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 14px;
  padding-bottom: 10px;
  align-items: stretch;
}

/* In-row loading: prescreen — wrapper uses contents so skeleton cards are direct row children and row extends smoothly (no pause) */
.movies-section-row .movies-section-row-inline-loading {
  display: contents !important;
}

.movies-section-row-inline-loading {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 14px;
  flex-shrink: 0;
}

.movies-section-row-inline-loading .movie-card-skeleton {
  flex: 0 0 168px !important;
  min-width: 168px !important;
  max-width: 168px !important;
  width: 168px !important;
  flex-shrink: 0;
}

.movies-section-skeleton-row .movie-card-skeleton {
  flex: 0 0 168px !important;
  min-width: 168px !important;
  max-width: 168px !important;
  width: 168px !important;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--secondary-bg);
}

.movie-card-skeleton .sk-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: movies-skeleton-shimmer 1.2s ease-in-out infinite;
}

.movie-card-skeleton .sk-info {
  flex: 1;
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.movie-card-skeleton .sk-line {
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: movies-skeleton-shimmer 1.2s ease-in-out infinite;
}

.movie-card-skeleton .sk-line.short {
  width: 60%;
}

@keyframes movies-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

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

.movies-section-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.movies-section-load-more-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.movies-section-load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* MOVIE CARD */
.movie-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    width 0.26s ease,
    flex 0.26s ease,
    margin 0.26s ease,
    padding 0.26s ease,
    opacity 0.26s ease;
  display: flex;
  flex-direction: column;
}

.movie-card:hover,
.movies-page-wrapper .movie-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Remove the separate lift on the inner link — the card lifts as one unit now */
.movie-card:hover .movie-poster-link {
  transform: none;
  box-shadow: none;
}

.movie-banner {
  color: #fff;
  text-align: center;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  background-color: var(--tertiary-bg);
  background-image: none;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
  text-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
}



.movie-poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
  background: #1a1a1a;
  border-radius: 0 0 8px 8px;
}

/* When poster link is the first child (no banner above it), round all corners */
.movie-card > .movie-poster-link:first-child {
  border-radius: 8px;
}

.movie-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  transition: filter 0.22s ease;
  background: #1a1a1a;
}

.movie-card:hover .movie-poster {
  filter: brightness(0.45);
}

.movie-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 5;
  padding: 12px;
  border-radius: inherit;
  overflow: hidden;
  box-sizing: border-box;
}

.movie-card:hover .movie-card-overlay,
.movie-poster-link:hover .movie-card-overlay {
  opacity: 1;
}

.overlay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 140px;
  height: 36px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  color: #fff;
  font-family: inherit;
  transition:
    transform 0.15s,
    background 0.15s,
    box-shadow 0.15s;
  white-space: nowrap;
}

.overlay-watch {
  background: var(--accent-red);
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.overlay-watch:hover {
  background: #ff1a25;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(229, 9, 20, 0.4);
}

.overlay-play {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.overlay-play:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.overlay-list {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.overlay-list:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.movie-info {
  padding: 8px 8px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 10;
  cursor: default;
}

.movie-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-title a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-title a:hover {
  color: var(--accent-red);
}

/* Friend activity: no wrapper gloss; glossy only on the elements (circles + text) */
.friend-activity {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  margin-top: auto;
}

.friend-activity-button {
  width: 100%;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 11;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  transition: background 0.15s ease;
}

.friend-activity-static {
  cursor: default;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.friend-activity-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.friend-activity-button:active {
  background: rgba(255, 255, 255, 0.1);
}

.friend-activity-button:focus {
  outline: none;
}

.friend-activity-button:hover .friend-text,
.friend-activity-button:focus .friend-text {
  color: var(--text-primary);
}

.friend-avatars {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.friend-av-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.18) 0%,
    #5a5a5a 40%,
    #3a3a3a 100%
  );
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: inline-block;
  flex-shrink: 0;
  margin-left: -6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.25);
}

.friend-av-circle:first-child {
  margin-left: 0;
}

.friend-text {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  padding: 2px 0;
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.06);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .movies-header-section .hero-slider,
  .hero-slider {
    height: 46vh;
    min-height: 280px;
    max-height: 440px;
  }

  .hero-overlay {
    padding: 0 40px 10% 72px;
  }

  .hero-title {
    font-size: 36px;
    margin-bottom: 6px;
  }

  .hero-meta {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn-primary svg,
  .hero-actions .btn-secondary svg,
  .hero-actions .btn-watch-now svg,
  .hero-actions .btn-add-list svg {
    width: 14px;
    height: 14px;
  }

  .movies-page-wrapper .btn-watch-now,
  .movies-page-wrapper .btn-primary,
  .hero-actions .btn-primary {
    padding: 8px 18px;
    font-size: 13px;
  }

  .movies-page-wrapper .btn-add-list,
  .movies-page-wrapper .btn-secondary,
  .hero-actions .btn-secondary {
    padding: 8px 16px;
    font-size: 13px;
  }

  .movies-header-inner {
    padding: 0 24px;
  }

  .search-wrap {
    max-width: 340px;
    width: 100%;
  }

  .movies-section-header {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .detail-type-badge {
    font-size: 9px;
    padding: 2px 6px;
    top: 8px;
    left: 8px;
  }

  .movie-title {
    font-size: 11px;
  }

  .movie-info {
    padding: 6px 6px 8px;
    gap: 3px;
  }

  .friend-text {
    font-size: 10px;
  }

  .friend-av-circle {
    width: 16px;
    height: 16px;
    margin-left: -5px;
  }

  .movies-page-inner {
    padding: 0;
  }

  .movies-section-row .movie-card {
    flex: 0 0 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    width: 180px !important;
  }

  .movies-section-row .movie-card-placeholder {
    flex: 0 0 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    width: 180px !important;
  }

  .movies-section-skeleton-row .movie-card-skeleton {
    flex: 0 0 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    width: 180px !important;
  }

  .movies-section-view-more {
    flex: 0 0 180px;
    min-width: 180px;
    width: 180px;
  }

  .movies-section-row-load-more-card {
    flex: 0 0 180px;
    min-width: 180px;
    width: 180px;
  }
}

/* Mobile: allow horizontal scroll for category tabs + sort pills; prevent body from clipping so category area can slide. */
@media (max-width: 900px) {
  body.movies-page {
    overflow-x: visible;
  }

  .movies-page-wrapper {
    overflow-x: visible;
  }

  .movies-page-inner {
    overflow-x: hidden;
  }

  .movies-header-section,
  .movies-header-inner,
  .dataset-nav-wrap {
    overflow-x: visible;
  }

  .dataset-nav-scroll {
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    min-width: 0;
  }

  .dataset-nav-inner {
    justify-content: center;
    flex-shrink: 0;
    min-width: max-content;
  }

  .sorting-pills {
    flex-wrap: nowrap;
    overflow-x: scroll;
    justify-content: flex-start;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
  }

  .sorting-pills::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 768px) {
  .movies-header-inner {
    padding: 0 16px;
  }

  .movies-page-inner {
    padding: 0;
  }

  .movies-header-section .hero-slider,
  .hero-slider {
    height: 42vh;
    min-height: 280px;
    max-height: 400px;
  }

  .hero-overlay {
    padding: 0 24px 8% 64px;
  }

  .movies-header-inner {
    padding: 12px 16px 14px;
  }

  .movies-page-title {
    margin: 0 0 6px;
    font-size: 16px;
  }

  .dataset-nav-wrap {
    margin-bottom: 10px;
  }

  .sorting-section {
    padding: 4px 0 5px;
  }

  .filters-section {
    padding: 5px 0 8px;
  }

  .hero-title {
    font-size: 28px;
    margin-bottom: 4px;
  }

  .hero-meta {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .hero-actions .btn-primary svg,
  .hero-actions .btn-secondary svg,
  .hero-actions .btn-watch-now svg,
  .hero-actions .btn-add-list svg {
    width: 12px;
    height: 12px;
  }

  .movies-page-wrapper .btn-watch-now,
  .movies-page-wrapper .btn-primary,
  .hero-actions .btn-primary {
    padding: 7px 14px;
    font-size: 12px;
  }

  .movies-page-wrapper .btn-add-list,
  .movies-page-wrapper .btn-secondary,
  .hero-actions .btn-secondary {
    padding: 7px 12px;
    font-size: 12px;
  }

  .search-wrap {
    max-width: 300px;
    width: 100%;
  }

  .dataset-tab {
    font-size: 11px;
    padding: 5px 10px 10px;
  }

  .tab-dropdown-btn {
    font-size: 11px;
    padding: 5px 10px 10px;
  }

  .sort-pill {
    font-size: 10px;
    padding: 4px 10px;
  }

  .movies-section-row .movie-card {
    flex: 0 0 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    width: 150px !important;
  }

  .movies-section-row .movie-card-placeholder {
    flex: 0 0 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    width: 150px !important;
  }

  .movies-section-skeleton-row .movie-card-skeleton {
    flex: 0 0 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    width: 150px !important;
  }

  .movies-section-view-more {
    flex: 0 0 150px;
    min-width: 150px;
    width: 150px;
  }

  .movies-section-row-load-more-card {
    flex: 0 0 150px;
    min-width: 150px;
    width: 150px;
  }

  .movies-section-header {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .detail-type-badge {
    font-size: 8px;
    padding: 2px 6px;
    top: 8px;
    left: 8px;
  }

  .movie-title {
    font-size: 11px;
  }

  .movie-info {
    padding: 6px 6px 8px;
    gap: 3px;
  }

  .friend-text {
    font-size: 9px;
  }

  .friend-av-circle {
    width: 14px;
    height: 14px;
    margin-left: -4px;
  }

  .movie-card-placeholder .ph-info {
    padding: 6px 6px 8px;
    gap: 4px;
  }

  .movie-card-placeholder .ph-line {
    height: 5px;
  }

  .slider-arrow {
    width: 40px;
    height: 40px;
  }

  .fdr {
    font-size: 10px;
    padding: 4px 12px 4px 6px;
  }

  .sort-by-label {
    font-size: 10px;
  }

  .active-indicator {
    font-size: 8px;
    padding: 2px 7px;
    letter-spacing: 0.6px;
  }

  .filter-row {
    flex-wrap: wrap;
  }

  .filter-left,
  .filter-right {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .movies-header-section .hero-slider,
  .hero-slider {
    height: 38vh;
    min-height: 220px;
    max-height: 320px;
  }

  .hero-overlay {
    padding: 0 16px 6% 56px;
  }

  .movies-header-inner {
    padding: 10px 12px 12px;
  }

  .search-wrap {
    max-width: 280px;
    width: 100%;
  }

  .movies-section-header {
    font-size: 13px;
    margin-bottom: 5px;
  }

  .detail-type-badge {
    font-size: 8px;
    padding: 2px 5px;
    top: 6px;
    left: 6px;
  }

  .movie-title {
    font-size: 10px;
  }

  .movie-info {
    padding: 5px 5px 6px;
    gap: 2px;
  }

  .friend-text {
    font-size: 9px;
  }

  .friend-av-circle {
    width: 13px;
    height: 13px;
    margin-left: -4px;
  }

  .movie-card-placeholder .ph-info {
    padding: 5px 5px 6px;
    gap: 4px;
  }

  .movie-card-placeholder .ph-line {
    height: 4px;
  }

  .movies-page-title {
    margin: 0 0 4px;
    font-size: 15px;
  }

  .dataset-nav-wrap {
    margin-bottom: 8px;
  }

  .sorting-section {
    padding: 3px 0 4px;
  }

  .filters-section {
    padding: 4px 0 6px;
  }

  .hero-title {
    font-size: 18px;
    margin-bottom: 3px;
  }

  .hero-meta {
    font-size: 9px;
    margin-bottom: 5px;
  }

  .hero-actions .btn-primary svg,
  .hero-actions .btn-secondary svg,
  .hero-actions .btn-watch-now svg,
  .hero-actions .btn-add-list svg {
    width: 13px;
    height: 13px;
  }

  .movies-page-wrapper .btn-watch-now,
  .movies-page-wrapper .btn-primary,
  .hero-actions .btn-primary {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    background: #e50914 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.45);
  }

  .movies-page-wrapper .btn-add-list,
  .movies-page-wrapper .btn-secondary,
  .hero-actions .btn-secondary {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    background: rgba(18, 18, 18, 0.85) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
  }

  .movies-page-inner {
    padding: 0;
  }

  .dataset-tab {
    font-size: 10px;
    padding: 4px 8px 8px;
  }

  .tab-dropdown-btn {
    font-size: 10px;
    padding: 4px 8px 8px;
  }

  .sorting-section {
    padding: 8px 0;
  }

  .sort-pill {
    font-size: 9px;
    padding: 3px 8px;
  }

  .filters-section {
    padding: 6px 0 12px;
  }

  .filter-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .filter-left {
    gap: 4px;
  }

  .filter-right {
    gap: 4px;
  }

  .fdr {
    font-size: 10px;
    padding: 4px 12px 4px 6px;
  }

  .movies-section-row .movie-card {
    flex: 0 0 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    width: 130px !important;
  }

  .movies-section-row .movie-card-placeholder {
    flex: 0 0 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    width: 130px !important;
  }

  .movies-section-skeleton-row .movie-card-skeleton {
    flex: 0 0 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    width: 130px !important;
  }

  .movies-section-view-more {
    flex: 0 0 130px;
    min-width: 130px;
    width: 130px;
  }

  .movies-section-row-load-more-card {
    flex: 0 0 130px;
    min-width: 130px;
    width: 130px;
  }

  .movies-section-row {
    gap: 10px;
  }

  .movies-page-title {
    font-size: 16px;
  }

  .search-wrap input {
    font-size: 12px;
    padding: 7px 16px 7px 36px;
  }

  .active-indicator {
    font-size: 7px;
    padding: 1px 5px;
    letter-spacing: 0.4px;
    top: calc(100% + 3px);
  }
}

@media (max-width: 360px) {
  .movies-header-inner {
    padding: 8px 10px 8px;
  }

  .movies-page-inner {
    padding: 0;
  }

  .movies-header-section .hero-slider,
  .hero-slider {
    height: 34vh;
    min-height: 180px;
    max-height: 280px;
  }

  .hero-overlay {
    padding: 0 12px 5% 48px;
  }

  .movies-page-title {
    margin: 0 0 3px;
    font-size: 13px;
  }

  .dataset-nav-wrap {
    margin-bottom: 6px;
  }

  .sorting-section {
    padding: 2px 0 3px;
  }

  .filters-section {
    padding: 3px 0 5px;
  }

  .hero-title {
    font-size: 16px;
    margin-bottom: 2px;
  }

  .hero-meta {
    font-size: 8px;
    margin-bottom: 4px;
  }

  .movies-page-wrapper .btn-watch-now,
  .movies-page-wrapper .btn-primary,
  .hero-actions .btn-primary {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    background: #e50914 !important;
    color: #ffffff !important;
  }

  .movies-page-wrapper .btn-add-list,
  .movies-page-wrapper .btn-secondary,
  .hero-actions .btn-secondary {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    background: rgba(18, 18, 18, 0.85) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
  }

  .hero-actions .btn-primary svg,
  .hero-actions .btn-secondary svg,
  .hero-actions .btn-watch-now svg,
  .hero-actions .btn-add-list svg {
    width: 13px;
    height: 13px;
  }

  .dataset-tab {
    font-size: 9px;
    padding: 3px 7px 8px;
  }

  .tab-dropdown-btn {
    font-size: 9px;
    padding: 3px 7px 8px;
  }

  .sort-pill {
    font-size: 9px;
    padding: 3px 7px;
  }

  .fdr {
    font-size: 9px;
    padding: 3px 12px 3px 5px;
  }

  .movies-section-row .movie-card {
    flex: 0 0 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    width: 112px !important;
  }

  .movies-section-row .movie-card-placeholder {
    flex: 0 0 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    width: 112px !important;
  }

  .movies-section-skeleton-row .movie-card-skeleton {
    flex: 0 0 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    width: 112px !important;
  }

  .movies-section-view-more {
    flex: 0 0 112px;
    min-width: 112px;
    width: 112px;
  }

  .movies-section-row-load-more-card {
    flex: 0 0 112px;
    min-width: 112px;
    width: 112px;
  }

  .movies-section-header {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .detail-type-badge {
    font-size: 7px;
    padding: 1px 4px;
    top: 5px;
    left: 5px;
  }

  .movie-title {
    font-size: 9px;
  }

  .movie-info {
    padding: 4px 4px 6px;
    gap: 2px;
  }

  .friend-text {
    font-size: 8px;
  }

  .friend-av-circle {
    width: 11px;
    height: 11px;
    margin-left: -3px;
  }

  .movie-card-placeholder .ph-info {
    padding: 4px 4px 6px;
    gap: 3px;
  }

  .movie-card-placeholder .ph-line {
    height: 3px;
  }

  .active-indicator {
    font-size: 6px;
    padding: 1px 4px;
  }
}

/* Additional small-screen optimizations for better readability */
@media (max-width: 420px) {
  .movies-header-section .hero-slider,
  .hero-slider {
    height: 36vh;
    min-height: 200px;
    max-height: 300px;
  }

  .hero-overlay {
    padding: 0 12px 6% 52px;
  }

  .movies-header-inner {
    padding: 8px 12px 10px;
  }

  .movies-page-title {
    margin: 0 0 4px;
    font-size: 14px;
  }

  .dataset-nav-wrap {
    margin-bottom: 6px;
  }

  .sorting-section {
    padding: 3px 0 4px;
  }

  .filters-section {
    padding: 4px 0 6px;
  }

  .hero-title {
    font-size: 17px;
    margin-bottom: 3px;
  }

  .hero-meta {
    font-size: 9px;
    margin-bottom: 4px;
  }

  .movies-page-wrapper .btn-watch-now,
  .movies-page-wrapper .btn-primary,
  .hero-actions .btn-primary {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    background: #e50914 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.45);
  }

  .movies-page-wrapper .btn-add-list,
  .movies-page-wrapper .btn-secondary,
  .hero-actions .btn-secondary {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    background: rgba(18, 18, 18, 0.85) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
  }

  .hero-actions .btn-primary svg,
  .hero-actions .btn-secondary svg,
  .hero-actions .btn-watch-now svg,
  .hero-actions .btn-add-list svg {
    width: 13px;
    height: 13px;
  }

  .search-wrap {
    max-width: 260px;
    width: 100%;
    padding: 0 6px;
  }

  .movies-section-row .movie-card {
    flex: 0 0 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    width: 120px !important;
  }

  .movies-section-header {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .detail-type-badge {
    font-size: 7px;
    padding: 1px 4px;
    top: 5px;
    left: 5px;
  }

  .movie-title {
    font-size: 9px;
    font-weight: 700;
    white-space: normal;
    display: block;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .movie-info {
    padding: 4px 4px 6px;
    gap: 2px;
  }

  .friend-text {
    font-size: 8px;
  }

  .friend-av-circle {
    width: 11px;
    height: 11px;
    margin-left: -3px;
  }

  .movie-card-placeholder .ph-info {
    padding: 4px 4px 6px;
    gap: 3px;
  }

  .movie-card-placeholder .ph-line {
    height: 3px;
  }

  .overlay-btn {
    min-width: 110px;
    padding: 7px 12px;
    font-size: 12px;
  }
}

/* Filters section: Genre, Country, Year, Price always one line, same size, no wrap */
@media (max-width: 1024px) {
  .filters-section {
    overflow-x: hidden;
    overflow-y: visible;
  }

  .filter-row {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .filter-left,
  .filter-right {
    flex-wrap: nowrap;
    flex: 1 1 0;
    min-width: 0;
    gap: 4px;
  }

  .filter-left .fdr,
  .filter-right .fdr {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .filters-section {
    overflow-x: hidden;
    padding: 6px 0 12px;
  }

  .filter-row {
    flex-wrap: nowrap;
    gap: 4px;
    padding-bottom: 8px;
    align-items: center;
  }

  .filter-left,
  .filter-right {
    flex-wrap: nowrap;
    flex: 1 1 0;
    min-width: 0;
    gap: 4px;
  }

  .filters-section .fdr {
    padding: 5px 12px 5px 6px;
    font-size: 10px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .filters-section .sort-pill,
  .filters-section .chip {
    padding: 5px 8px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .filters-section .chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sort-by-label {
    font-size: 10px;
    margin-right: 4px;
    flex-shrink: 0;
  }

  @media (max-width: 420px) {
    .sort-by-label {
      display: none;
    }

    .filters-section .fdr {
      padding: 4px 12px 4px 6px;
      font-size: 9px;
    }
  }
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--primary-bg);
}

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

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* ── STICKY FILTER BAR ────────────────────────────────────────
   Mobile + tablet. Slides down from top once user scrolls past
   the original filter row. Same look as .sorting-section + .filters-section
   so the view is identical when not scrolling vs when scrolling.
   Desktop (1025px+): completely hidden.
──────────────────────────────────────────────────────────────*/
.sticky-filter-bar {
  display: none;
}

@media (max-width: 1024px) {
  .sticky-filter-bar-wrap {
    position: sticky;
    top: 56px; /* Match mobile navbar height */
    z-index: 1040;
    height: 0;
    overflow: visible;
  }

  .sticky-filter-bar {
    display: flex;
    flex-direction: column;
    padding: 6px 0 6px 0;
    background: rgba(var(--body-bg-rgb, 18, 18, 18), 0.95);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 0.25s,
      visibility 0.25s,
      transform 0.25s;
  }

  .sticky-filter-bar.sfb-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .sticky-filter-bar.sfb-scroll-hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Compact search input in sticky bar */
  .sfb-search {
    display: flex;
    align-items: center;
    position: relative;
    margin: 0 10px 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition:
      border-color 0.2s,
      background 0.2s;
  }

  .sfb-search:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
  }

  .sfb-search-icon {
    position: absolute;
    left: 10px;
    opacity: 0.5;
    pointer-events: none;
  }

  .sfb-search input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary, #fff);
    font-size: 12px;
    padding: 7px 30px 7px 30px;
    line-height: 1.2;
  }

  .sfb-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
  }

  .sfb-search-clear {
    position: absolute;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: background 0.15s;
  }

  .sfb-search-clear:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  /* Pills row — match .sorting-section on mobile */
  .sfb-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 0 5px 4px;
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .sfb-pills::-webkit-scrollbar {
    display: none;
  }

  .sfb-pills .sort-pill {
    flex-shrink: 0;
    font-size: 9px;
    height: 18px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    line-height: 1;
  }

  .sfb-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
  }

  .sfb-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 5px 6px;
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    box-sizing: border-box;
    flex-wrap: nowrap;
  }

  .sfb-left,
  .sfb-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .sfb-left .fdr,
  .sfb-right .fdr {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sticky-filter-bar .fdr {
    padding: 0 14px 0 6px !important;
    font-size: 9px;
    height: 18px !important;
    min-height: 18px !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
  }

  .sticky-filter-bar .sort-by-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
  }
}

/* Match main section breakpoints so sticky looks the same when scrolling */
@media (max-width: 768px) {
  .sfb-pills .sort-pill {
    font-size: 10px;
    padding: 4px 10px;
  }

  .sticky-filter-bar .fdr {
    font-size: 10px;
    padding: 4px 12px 4px 6px;
  }

  .sticky-filter-bar .sort-by-label {
    font-size: 10px;
  }
}

@media (max-width: 560px) {
  .sticky-filter-bar {
    padding: 6px 0 0 0;
    overflow-x: hidden;
  }

  .sfb-pills {
    padding: 0 5px 4px;
  }

  .sfb-filters {
    padding: 4px 5px 6px;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .sfb-left,
  .sfb-right {
    gap: 4px;
    flex-wrap: nowrap;
    flex: 1 1 0;
    min-width: 0;
  }

  .sfb-left .fdr,
  .sfb-right .fdr {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }

  .sticky-filter-bar .fdr {
    padding: 0 10px 0 5px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sticky-filter-bar .sort-by-label {
    font-size: 9px;
    margin-right: 4px;
  }
}

@media (max-width: 420px) {
  .sticky-filter-bar .sort-by-label {
    display: none;
  }

  .sticky-filter-bar .fdr {
    padding: 0 8px 0 5px !important;
  }
}

@media (max-width: 360px) {
  .sfb-pills .sort-pill {
    font-size: 9px;
    padding: 3px 7px;
  }

  .sticky-filter-bar .fdr {
    font-size: 9px;
    padding: 3px 12px 3px 5px;
  }
}

/* ── WATCH / MOVIE DETAIL PAGE ─────────────────────────────────
   Shared by watch.html and watch.php. Same layout and theme as index.
   .watch-page-wrapper: padding-top so content is not too close to hero/header.
─────────────────────────────────────────────────────────────────*/
.watch-page-wrapper {
  padding-top: 28px;
}

/* Detail pages must keep top clearance under the fixed header even when
   .page-margin.movies-page-wrapper zeros padding (browse shell rule). */
.page-margin.movies-page-wrapper.watch-page-wrapper {
  padding-top: 28px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}

.detail-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 60px;
}

.detail-top {
  margin-bottom: 28px;
}

.detail-top-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}

.detail-breadcrumb-bar {
  flex-basis: 100%;
  order: -1;
  margin-bottom: 16px;
  padding-top: 20px;
}

.breadcrumb-trail {
  font-size: 14px;
  color: var(--text-secondary);
  overflow-wrap: break-word;
  word-break: break-word;
}

.breadcrumb-trail a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

/* Browse context (All / TV / …) — slightly stronger than generic trail links */
.breadcrumb-trail a.breadcrumb-parent {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.breadcrumb-trail a:hover {
  color: #fff;
}

.breadcrumb-sep {
  margin: 0 8px;
  opacity: 0.6;
}

.breadcrumb-current {
  color: #fff;
}

.detail-poster-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg, #121212);
}

.detail-poster {
  width: auto;
  min-width: 220px;
  max-width: 340px;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.detail-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-info-panel {
  flex: 1;
  min-width: 0;
}

.detail-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.meta-dot {
  opacity: 0.5;
}

.meta-quality-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.detail-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: 0.3px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.detail-synopsis {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.detail-credits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px 24px;
  margin-bottom: 20px;
}

.credit-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.credit-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.credit-value {
  font-size: 14px;
  color: #fff;
  overflow-wrap: break-word;
  word-break: break-word;
}

.crew-link {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  transition:
    color 0.15s ease,
    text-decoration 0.15s ease;
}

.crew-link:hover {
  color: var(--accent, #6c5ce7);
  text-decoration: underline;
}

.detail-views {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.detail-views strong {
  color: #fff;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}

.btn-play:hover {
  background: #ff1a25;
  transform: scale(1.03);
}

.btn-play svg {
  width: 22px;
  height: 22px;
}

.btn-edit-movie {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-edit-movie:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-edit-movie svg {
  width: 18px;
  height: 18px;
}

/* Detail-page Ask Nnubia — solid brand red (beats .movies-page-wrapper .btn-circle) */
.movies-page-wrapper .btn-circle.js-ask-nnubia,
.btn-circle.js-ask-nnubia {
  color: #fff !important;
  background: #e40d0d !important;
  border-color: transparent !important;
}

.movies-page-wrapper .btn-circle.js-ask-nnubia:hover,
.movies-page-wrapper .btn-circle.js-ask-nnubia:focus-visible,
.btn-circle.js-ask-nnubia:hover,
.btn-circle.js-ask-nnubia:focus-visible {
  background: #c40b0b !important;
  border-color: transparent !important;
  color: #fff !important;
  outline: none;
}

.btn-circle.js-ask-nnubia svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-circle.js-ask-nnubia svg path {
  fill: none;
  stroke: #fff;
}

.btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-circle:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.btn-circle svg {
  width: 22px;
  height: 22px;
}

.detail-ratings {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.detail-rating-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.detail-rating-item svg {
  width: 20px;
  height: 20px;
  color: #fbbf24;
}

.detail-rating-item strong {
  color: #fff;
  margin-left: 4px;
}

.detail-badge-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 0;
  margin-bottom: 24px;
}

.detail-badge-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.badge-subscription,
.badge-new,
.badge-rank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
}

.badge-subscription {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.badge-subscription svg {
  width: 18px;
  height: 18px;
}

.badge-new {
  background: rgba(229, 9, 20, 0.2);
  color: #fca5a5;
}

.badge-rank {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.detail-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

.detail-tabs-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.detail-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 20px;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  transition: color 0.2s;
  white-space: nowrap;
}

.detail-tab:hover {
  color: #fff;
}

.detail-tab.active {
  color: #fff;
  font-weight: 600;
}

.detail-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-red);
  border-radius: 3px 3px 0 0;
}

.detail-tab-panels {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 40px;
}

.tab-panel {
  display: none;
}

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

.detail-section {
  margin-bottom: 28px;
}

.detail-section-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.detail-meta-cell {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.detail-meta-cell-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.detail-meta-cell-value {
  font-size: 15px;
  color: #fff;
  overflow-wrap: break-word;
  word-break: break-word;
}

.details-metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0;
}

.trailers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.trailer-card {
  cursor: pointer;
  width: 280px;
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--tertiary-bg);
  transition: transform 0.2s;
}

.trailer-card:hover {
  transform: scale(1.02);
}

.trailer-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
}

.trailer-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trailer-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.trailer-play-overlay svg {
  width: 48px;
  height: 48px;
}

.trailer-label {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.review-author {
  font-weight: 600;
  color: #fff;
  overflow-wrap: break-word;
  word-break: break-word;
}

.review-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.review-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  overflow-wrap: break-word;
  word-break: break-word;
}

.detail-more-like-this {
  margin-top: 40px;
  margin-bottom: 24px;
  background: var(--primary-bg);
  color: var(--text-primary);
  border-radius: 0;
}

.detail-more-like-this .detail-section-title {
  color: var(--text-primary);
}

.detail-more-like-skel {
  width: 168px;
  height: 280px;
  border-radius: 8px;
  background: var(--tertiary-bg);
  animation: movies-skel-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes movies-skel-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}

.similar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.similar-card {
  cursor: pointer;
  width: 160px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--tertiary-bg);
  transition: transform 0.2s;
}

.similar-card:hover {
  transform: translateY(-4px);
}

.similar-poster-wrap {
  position: relative;
  aspect-ratio: 2/3;
}

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

.similar-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.similar-info {
  padding: 10px 12px;
}

.similar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.similar-score {
  font-size: 12px;
  color: var(--text-secondary);
}

#videoPlayerContainer iframe,
#videoPlayerContainer video {
  width: 100%;
  max-height: 500px;
  border-radius: 8px;
}

/* When trailer modal is open, reserve scrollbar space so the page doesn't shift (no "shake") */
html.trailer-modal-active .sticky-filter-bar {
  padding-right: var(--trailer-modal-scrollbar, 0);
}

/* Netflix-style trailer modal: full-viewport dark overlay, centered video, close on backdrop/Esc */
.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* when closed, never block clicks on cards or horizontal scroll */
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.trailer-modal.trailer-modal-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* While closing: ensure modal never blocks touch/scroll on section rows */
.trailer-modal.trailer-modal-closing {
  pointer-events: none !important;
}

.trailer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.trailer-modal-inner {
  position: relative;
  width: 100%;
  max-width: 1024px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.trailer-modal.trailer-modal-open .trailer-modal-inner {
  transform: scale(1);
}

.trailer-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition:
    background 0.2s,
    transform 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.trailer-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  color: #fff;
}

@media (max-width: 1100px) {
  .trailer-modal-inner {
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  .trailer-modal {
    padding: 12px;
  }

  .trailer-modal-inner {
    aspect-ratio: 16/9;
    border-radius: 8px;
  }

  .trailer-modal-close {
    top: -45px;
    right: 0;
    width: 36px;
    height: 36px;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
  }
}

@media (max-width: 480px) {
  .trailer-modal-inner {
    aspect-ratio: 16/10;
  }

  .trailer-modal-close {
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
}

/* Video Wrap & Fallback */
.trailer-modal-video-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.trailer-modal-video-wrap iframe,
.trailer-modal-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.trailer-modal-no-video {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  margin: 0;
}

/* Watch Now fullscreen (listing + detail): same as watch.phtml inline block */
.movie-fullscreen-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.movie-fullscreen-wrap .movie-fullscreen-player {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.movie-fullscreen-wrap .movie-fullscreen-player iframe,
.movie-fullscreen-wrap .movie-fullscreen-player video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.movie-fullscreen-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 100000;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.movie-fullscreen-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* YouTube/embed Watch Now — same shell as Play Trailer (centered + X; maximize via provider) */
.movie-fullscreen-wrap--trailer {
  background: transparent;
  padding: 24px;
  box-sizing: border-box;
}
.movie-fullscreen-wrap--trailer .movie-fullscreen-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.movie-fullscreen-wrap--trailer .movie-fullscreen-inner {
  position: relative;
  width: 100%;
  max-width: 1024px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1;
  overflow: visible;
}
.movie-fullscreen-wrap--trailer .movie-fullscreen-player {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  width: auto;
  height: auto;
}
.movie-fullscreen-wrap--trailer .movie-fullscreen-close {
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  font-size: 32px;
}
.movie-fullscreen-wrap--trailer .movie-fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}
@media (max-width: 640px) {
  .movie-fullscreen-wrap--trailer {
    padding: 12px;
  }
  .movie-fullscreen-wrap--trailer .movie-fullscreen-close {
    top: -44px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}
@media (max-width: 480px) {
  .movie-fullscreen-wrap--trailer .movie-fullscreen-inner,
  .movie-fullscreen-wrap--trailer .movie-fullscreen-player {
    border-radius: 8px;
  }
  .movie-fullscreen-wrap--trailer .movie-fullscreen-close {
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.55);
  }
}

@media (max-width: 768px) {
  .watch-page-wrapper {
    padding-top: 20px;
  }

  .page-margin.movies-page-wrapper.watch-page-wrapper {
    padding-top: 20px !important;
  }

  .detail-breadcrumb-bar {
    padding-top: 16px;
  }

  .detail-page,
  .detail-badge-bar-inner,
  .detail-tabs-inner,
  .detail-tab-panels {
    padding-left: 16px;
    padding-right: 16px;
  }

  .detail-top-inner {
    flex-direction: column;
    align-items: center;
  }

  .detail-poster {
    width: auto;
    max-width: 100%;
    max-height: 360px;
  }

  .detail-title {
    font-size: 24px;
  }

  .detail-tab {
    padding: 12px 14px;
    font-size: 14px;
  }

  .detail-tabs-inner {
    flex-wrap: wrap;
  }

  .details-metadata-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .trailer-card {
    width: 100%;
    max-width: 320px;
  }

  .detail-section-title {
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  .watch-page-wrapper {
    padding-top: 14px;
  }

  .page-margin.movies-page-wrapper.watch-page-wrapper {
    padding-top: 14px !important;
  }

  .detail-breadcrumb-bar {
    padding-top: 12px;
  }

  .detail-page,
  .detail-badge-bar-inner,
  .detail-tabs-inner,
  .detail-tab-panels {
    padding-left: 12px;
    padding-right: 12px;
  }

  .detail-poster {
    width: auto;
    max-width: 100%;
    max-height: 300px;
  }

  .detail-tab {
    padding: 10px 12px;
    font-size: 13px;
  }

  .details-metadata-grid {
    grid-template-columns: 1fr;
  }

  .trailer-card {
    width: 100%;
  }

  .similar-card {
    width: 130px;
  }

  .detail-section-title {
    font-size: 16px;
  }
}

/* ── MY MOVIES PAGE (mm-my-movies) ─────────────────────────────
   Compact hero, back/submit buttons, overlay Edit, card meta.
   Content closer to top like HTML version (override .page-margin).
─────────────────────────────────────────────────────────────────*/
.page-margin.mm-my-movies {
  margin-top: 0;
  margin-bottom: 24px;
}

.mm-my-movies .mm-hero {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0a0e 0%, #2a0a14 50%, #0a0a14 100%);
  display: flex;
  align-items: center;
}

.mm-my-movies .mm-hero-bg {
  position: absolute;
  inset: 0;
}

.mm-my-movies .mm-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18, 18, 18, 0.98) 0%,
    transparent 60%
  );
}

.mm-my-movies .mm-hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 32px 28px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.mm-my-movies .mm-hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.mm-my-movies .mm-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.2);
  color: #e50914;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.mm-my-movies .mm-hero-badge svg {
  width: 12px;
  height: 12px;
}

.mm-my-movies .mm-hero-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.mm-my-movies .mm-hero-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mm-my-movies .btn-back-ghost,
.mm-my-movies .btn-submit-movie {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1.2;
}

.mm-my-movies .btn-back-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mm-my-movies .btn-back-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mm-my-movies .btn-back-ghost svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mm-my-movies .btn-submit-movie {
  background: #e50914;
  color: #fff;
  font-weight: 700;
}

.mm-my-movies .btn-submit-movie:hover {
  background: #ff1a25;
  color: #fff;
}

.mm-my-movies .btn-submit-movie svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mm-my-movies .overlay-edit {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.mm-my-movies .overlay-edit:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #fff;
  color: #fff;
}

.mm-my-movies .movie-card-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.mm-my-movies .movie-card-meta-sep {
  opacity: 0.5;
  margin: 0 4px;
}

/* Tab row + ACTIVE pill: clear separation from sort pills below */
.mm-my-movies .dataset-nav-wrap {
  margin-bottom: 20px;
  padding-bottom: 2px;
}

/* My pages: category nav row — same styling as main movies page (desktop + mobile) */
.mm-my-movies .movies-cat-nav-row {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 0;
  box-sizing: border-box;
}
.mm-my-movies .movies-cat-nav-row #datasetNavWrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.mm-my-movies .movies-cat-nav-row .dataset-nav-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mm-my-movies .movies-cat-nav-row .dataset-nav-scroll::-webkit-scrollbar {
  display: none;
}
.mm-my-movies .movies-cat-nav-row .dataset-nav-inner {
  min-width: max-content;
  display: block;
}
.mm-my-movies .movies-cat-nav-row .dataset-nav {
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.mm-my-movies .movies-cat-nav-row .cat-nav-arrow {
  flex-shrink: 0;
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary, #b3b3b3);
  cursor: pointer;
  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}
.mm-my-movies .movies-cat-nav-row .cat-nav-arrow::before {
  content: "";
  position: absolute;
  inset: -8px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.mm-my-movies .movies-cat-nav-row .cat-nav-arrow:hover {
  color: #fff;
}
.mm-my-movies .movies-cat-nav-row .cat-nav-arrow:hover::before {
  opacity: 1;
}
.mm-my-movies .movies-cat-nav-row .cat-nav-arrow:focus {
  outline: none;
}
.mm-my-movies .movies-cat-nav-row .cat-nav-arrow svg {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.mm-my-movies .movies-cat-nav-row .cat-nav-arrow.disabled {
  opacity: 0.25;
  pointer-events: none;
}

/* My pages desktop (1025px+): category row same 950px band + 30px as main movies */
@media (min-width: 1025px) {
  .mm-my-movies .movies-cat-nav-row {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    max-width: 950px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
  }
  .mm-my-movies .movies-cat-nav-row #datasetNavWrap {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
  }
  .mm-my-movies .movies-cat-nav-row .dataset-nav-wrap {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
}

/* My pages mobile: same padding as main movies category row */
@media (max-width: 768px) {
  .mm-my-movies .movies-cat-nav-row {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

.mm-my-movies .active-indicator {
  top: 100%;
  margin-top: 6px;
}

/* Header inner and sections: align horizontal padding with hero (32px) */
.mm-my-movies .movies-header-inner {
  padding-left: 32px;
  padding-right: 32px;
}

/* My pages: filter bar container responsive (same as main #moviesFiltersSection; my_ use #moviesFilterBarWrap) */
@media (min-width: 1025px) {
  .mm-my-movies #moviesFilterBarWrap.filters-section {
    max-width: 950px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 4px 30px 6px !important;
    box-sizing: border-box !important;
  }
}
@media (max-width: 1024px) {
  .mm-my-movies #moviesFilterBarWrap.filters-section {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 8px 14px 12px !important;
    box-sizing: border-box !important;
  }
}
@media (max-width: 560px) {
  .mm-my-movies #moviesFilterBarWrap.filters-section {
    padding: 6px 12px 11px !important;
  }
}

.mm-my-movies .movies-page-inner {
  padding-left: 32px;
  padding-right: 32px;
}

@media (max-width: 768px) {
  .mm-my-movies .mm-hero {
    height: 180px;
  }

  .mm-my-movies .mm-hero-inner {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .mm-my-movies .mm-hero-badge {
    margin-bottom: 4px;
    padding: 3px 8px;
    font-size: 9px;
  }

  .mm-my-movies .mm-hero-badge svg {
    width: 10px;
    height: 10px;
  }

  .mm-my-movies .mm-hero-title {
    font-size: 22px;
  }

  .mm-my-movies .mm-hero-right {
    gap: 8px;
    width: 100%;
  }

  .mm-my-movies .btn-back-ghost,
  .mm-my-movies .btn-submit-movie {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 12px;
    flex: 1;
  }

  .mm-my-movies .movies-header-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mm-my-movies .movies-page-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 560px) {
  .mm-my-movies .movies-header-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .mm-my-movies .movies-page-inner {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Watchlist Saved State */
.js-watchlist-btn.is-saved {
  background: rgba(46, 213, 115, 0.15) !important;
  color: #2ed573 !important;
  border-color: rgba(46, 213, 115, 0.3) !important;
  box-shadow: 0 0 10px rgba(46, 213, 115, 0.2);
}

.js-watchlist-btn.is-saved:hover {
  background: rgba(46, 213, 115, 0.25) !important;
  transform: translateY(-2px);
}

/* === CONTINUE WATCHING ENHANCEMENTS === */
.movies-page-wrapper .movie-card .cw-progress-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  padding: 0;
  pointer-events: none;
}

.movies-page-wrapper .movie-card .cw-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
}

.movies-page-wrapper .movie-card .cw-progress-fill {
  height: 100%;
  background: var(--accent-red);
  border-radius: 0 2px 2px 0;
  transition: width 0.3s ease;
  max-width: 100%;
}

.movies-page-wrapper .movie-card .cw-resume-label {
  position: absolute;
  bottom: 8px;
  left: 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.movies-page-wrapper .movie-card .cw-resume-label.is-hidden {
  display: none;
}

.movies-page-wrapper .movie-card:hover .cw-resume-label,
.movies-page-wrapper .movie-card:focus-within .cw-resume-label,
.movies-page-wrapper .movie-card.cw-hover-active .cw-resume-label {
  opacity: 1;
  transform: translateY(0);
}

.movies-page-wrapper .movie-card .cw-series-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 8;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 6px;
  border-radius: 999px;
  pointer-events: none;
}

.movies-page-wrapper .movie-card .cw-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.2s,
    background 0.2s;
  z-index: 10;
  line-height: 1;
}

.movies-page-wrapper .movie-card .cw-remove-hint {
  position: absolute;
  top: 7px;
  right: 36px;
  z-index: 9;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(229, 9, 20, 0.92);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.movies-page-wrapper .movie-card:hover .cw-remove-btn,
.movies-page-wrapper .movie-poster-link:hover .cw-remove-btn {
  opacity: 1;
}

.movies-page-wrapper .movie-card .cw-remove-btn:hover {
  background: rgba(229, 9, 20, 0.85);
}

.movies-page-wrapper .movie-card .cw-remove-btn:hover + .cw-remove-hint,
.movies-page-wrapper .movie-card .cw-remove-btn:focus-visible + .cw-remove-hint,
.movies-page-wrapper .movie-card.cw-remove-intent .cw-remove-hint {
  opacity: 1;
  transform: translateX(0);
}

@media (hover: none) {
  .movies-page-wrapper .movie-card .cw-resume-label {
    opacity: 1;
    transform: none;
  }

  .movies-page-wrapper .movie-card .cw-remove-btn {
    opacity: 0;
  }

  .movies-page-wrapper .movie-card.cw-active .cw-remove-btn {
    opacity: 1;
  }

  .movies-page-wrapper .movie-card .cw-remove-hint {
    display: none;
  }
}

@media (max-width: 768px) {
  .movies-page-wrapper .movie-card .cw-progress-track {
    height: 3px;
  }

  .movies-page-wrapper .movie-card .cw-remove-btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .movies-page-wrapper .movie-card .cw-remove-hint {
    top: 8px;
    right: 40px;
    font-size: 9px;
    padding: 4px 7px;
  }
}

.movies-page-wrapper .movie-card.cw-card-removing {
  animation: cwCardRemove 0.25s ease-out forwards;
  pointer-events: none;
}

.movies-page-wrapper .movies-section.cw-section-removing,
.movies-page-wrapper .movies-listing-section-block.cw-section-removing {
  animation: cwSectionRemove 0.25s ease-out forwards;
  pointer-events: none;
}

@keyframes cwCardRemove {
  from {
    opacity: 1;
    transform: scale(1);
    max-width: 168px;
  }

  to {
    opacity: 0;
    transform: scale(0.88);
    max-width: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }
}

@keyframes cwSectionRemove {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.98);
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   Chat rail + movies: style-only fixes (global chat is sibling after #ajax_loading)
   - style.css fades .chat-container in from opacity 0 (fadeInChat) — feels “late” vs heavy movies paint
   - cap #contnet width so 100vw movie shells don’t extend past the chat margin
   - z-index 1020: above normal movie UI (<99 in this file), below header/modals (1045+)
   -------------------------------------------------------------------------- */
@media (min-width: 769px) {
  #ajax_loading.tag_chat_content:has(#contnet.tag_content_movies)
    + .chat-all-container
    .chat-container,
  body.movies-page .chat-all-container .chat-container {
    animation: none;
    opacity: 1;
    z-index: 1020;
    transform: translateZ(0);
  }

  #ajax_loading.tag_chat_content:has(#contnet.tag_content_movies)
    #contnet.tag_content_movies,
  body.movies-page #contnet.tag_content_movies {
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Movies browse shell ($wo['page'] === 'movies'): align with site layout
   #ajax_loading carries data-movies-layout="browse" from container.phtml.
   - Strip #contnet box model (also inline style on #contnet) + .page-margin gap
   - Remove ad wrapper .content margin-top:30px (style.css) that adds “extra” band
   - margin-left 90px above 1150px matches ≤1500px theme pattern (not 100px wide)
   -------------------------------------------------------------------------- */
#ajax_loading[data-movies-layout="browse"] #contnet.tag_content_movies {
  margin: 0 !important;
  padding: 0 !important;
}

#ajax_loading[data-movies-layout="browse"]
  .ad-placement-header-footer
  .content {
  margin-top: 0 !important;
}

.page-margin.movies-page-wrapper {
  margin: 0 !important;
  padding: 0 !important;
}

#ajax_loading[data-movies-layout="browse"].tag_header_top_m.tag_content {
  margin-left: 90px !important;
}

@media (max-width: 1150px) {
  #ajax_loading[data-movies-layout="browse"].tag_header_top_m.tag_content {
    margin-left: 0 !important;
  }
}

@media (max-width: 992px) {
  #ajax_loading[data-movies-layout="browse"].tag_header_top_m.tag_content {
    margin-left: 0 !important;
  }
}

/* Tighter top gap on movies browse vs global body.tag_header_top_p (56px in style.header.css).
   The hero slider bleeds into this gap so content appears immersive. */
body.tag_header_top_p:has(#ajax_loading[data-movies-layout="browse"]) {
  padding-top: 25px !important;
}

/* When hero is hidden (listing/filter mode), the header section needs to clear the navbar.
   The 31px compensates for the reduced body padding (56px navbar - 25px body padding = 31px gap). */
.movies-hero-section.movies-hero-listing-hidden + .movies-header-section {
  padding-top: 31px;
}

/* ============================================================
   LIGHT MODE OVERRIDES (day only)
   Must stay under html[data-mode="day"]. Soft-nav appends this
   file after dark.css; unscoped light rules caused a white flash
   on timeline → movie detail in night mode.
   ============================================================ */
html[data-mode="day"] {

/* --- Hero slider adapts smoothly to Day (light) mode --- */
.movies-page-wrapper .hero-slider {
  background: #ffffff;
}
.movies-page-wrapper .hero-title,
.movies-page-wrapper .hero-content h1,
.movies-page-wrapper .hero-content h2,
.movies-page-wrapper .hero-content h3 {
  color: #111111;
}
.movies-page-wrapper .hero-meta,
.movies-page-wrapper .hero-content p {
  color: rgba(0, 0, 0, 0.8);
}
.movies-page-wrapper .hero-content .hero-badge,
.movies-page-wrapper .hero-content .sponsored-badge {
  color: #fff;
}
.movies-page-wrapper .hero-overlay {
  background:
    linear-gradient(
      to top,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.75) 20%,
      rgba(255, 255, 255, 0.35) 55%,
      rgba(255, 255, 255, 0.45) 100%
    ),
    linear-gradient(
      to right,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.65) 25%,
      rgba(255, 255, 255, 0.35) 60%,
      rgba(255, 255, 255, 0.5) 100%
    ),
    radial-gradient(
      ellipse at center,
      transparent 40%,
      rgba(255, 255, 255, 0.55) 100%
    );
}

/* --- Hero element visibility for light mode --- */
.movies-page-wrapper .hero-content {
  text-shadow: none;
}
.movies-page-wrapper .btn-add-list,
.movies-page-wrapper .btn-secondary {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.04) 40%,
      transparent 50%,
      rgba(0, 0, 0, 0.15) 100%
    ),
    rgba(0, 0, 0, 0.7);
  border-color: rgba(0, 0, 0, 0.15);
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.15);
}
.movies-page-wrapper .slider-dot {
  background: rgba(0, 0, 0, 0.25);
}
.movies-page-wrapper .slider-dot.active {
  background: rgba(229, 9, 20, 0.7);
}
.movies-page-wrapper .slider-arrow {
  background: rgba(0, 0, 0, 0.45);
}

/* --- Header section (tabs, pills, filters) for day mode --- */
.movies-page-wrapper .movies-header-section {
  background: var(--primary-bg);
}
.movies-page-wrapper.movies-interaction-active .movies-header-section {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
@media (min-width: 1025px) {
  .movies-page-wrapper:not(.watch-page-wrapper)
    .movies-header-section.is-stuck {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
  }
}
.movies-page-wrapper .dataset-nav-wrap {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
.movies-page-wrapper .dataset-tab {
  color: var(--text-secondary);
}
.movies-page-wrapper .dataset-tab:hover,
.movies-page-wrapper .dataset-tab.active {
  color: var(--text-primary);
}
.movies-page-wrapper .tab-dropdown-btn {
  color: var(--text-secondary);
}
.movies-page-wrapper .tab-dropdown-btn:hover,
.movies-page-wrapper .tab-dropdown-btn.active,
.movies-page-wrapper .tab-dropdown-btn[aria-expanded="true"] {
  color: var(--text-primary);
}
.movies-page-wrapper .sort-pill {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.movies-page-wrapper .sort-pill:hover {
  background: rgba(0, 0, 0, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 2px 6px rgba(0, 0, 0, 0.1);
}
.movies-page-wrapper .sort-pill.active {
  background: var(--accent-red);
  color: #fff;
  border-color: transparent;
}
.movies-page-wrapper .fdr,
.movies-page-wrapper .filters-section select.fdr,
.movies-page-wrapper #moviesFiltersSection .fdr {
  color: var(--text-primary) !important;
  background-color: rgba(0, 0, 0, 0.05) !important;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.01) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='rgba(0,0,0,.45)'%3E%3Cpath d='M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6-6-6z'/%3E%3C/svg%3E") !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.movies-page-wrapper .fdr:hover,
.movies-page-wrapper .filters-section select.fdr:hover,
.movies-page-wrapper #moviesFiltersSection .fdr:hover {
  background-color: rgba(0, 0, 0, 0.08) !important;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 24 24' fill='rgba(0,0,0,.65)'%3E%3Cpath d='M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6-6-6z'/%3E%3C/svg%3E") !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* --- Nav scroll arrows (day mode legibility) --- */
.movies-page-wrapper .scroll-arrow {
  color: var(--text-secondary);
}
.movies-page-wrapper .scroll-arrow:hover {
  color: var(--text-primary);
}

/* --- General text & components --- */
.movies-page-wrapper .movies-page-title,
.movies-page-wrapper .category-card-title,
.movies-page-wrapper .film-card-title,
.movies-page-wrapper .detail-title,
.movies-page-wrapper .detail-section-title,
.movies-page-wrapper .movies-section-title,
.movies-page-wrapper h1,
.movies-page-wrapper h2,
.movies-page-wrapper h3 {
  color: var(--text-primary);
}

.movies-page-wrapper .detail-synopsis,
.movies-page-wrapper .detail-meta-line,
.movies-page-wrapper .credit-label,
.movies-page-wrapper .breadcrumb-parent,
.movies-page-wrapper .film-card-meta,
.movies-page-wrapper .category-card-count {
  color: var(--text-secondary);
}

.movies-page-wrapper .dropdown-menu,
.movies-page-wrapper .tab-dropdown .dropdown-menu {
  background: var(--secondary-bg);
  border-color: var(--tertiary-bg);
}
.movies-page-wrapper .dropdown-menu li a {
  color: var(--text-primary);
}
.movies-page-wrapper .dropdown-menu li a:hover {
  background: var(--tertiary-bg);
}

.movies-page-wrapper .detail-page {
  background: var(--primary-bg);
}
.movies-page-wrapper .detail-top {
  background: transparent;
}
.movies-page-wrapper .fdr option {
  background: var(--secondary-bg);
  color: var(--text-primary);
}

/* --- Detail page — text, tabs, badges, buttons for day mode --- */
.movies-page-wrapper .detail-title {
  color: var(--text-primary);
}
.movies-page-wrapper .detail-synopsis {
  color: var(--text-secondary);
}
.movies-page-wrapper .credit-label {
  color: var(--text-secondary);
  opacity: 0.7;
}
.movies-page-wrapper .credit-value {
  color: var(--text-primary);
}
.movies-page-wrapper .detail-views {
  color: var(--text-secondary);
}
.movies-page-wrapper .detail-views strong {
  color: var(--text-primary);
}
.movies-page-wrapper .detail-rating-item strong {
  color: var(--text-primary);
}
.movies-page-wrapper .meta-quality-badge {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}
.movies-page-wrapper .badge-rank {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
}
.movies-page-wrapper .badge-subscription {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
.movies-page-wrapper .badge-new {
  background: rgba(229, 9, 20, 0.1);
  color: #dc2626;
}
.movies-page-wrapper .detail-badge-bar {
  border-top-color: rgba(0, 0, 0, 0.08);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
.movies-page-wrapper .breadcrumb-trail {
  color: var(--text-secondary);
}
.movies-page-wrapper .breadcrumb-trail a {
  color: var(--text-secondary);
}
.movies-page-wrapper .breadcrumb-trail a.breadcrumb-parent {
  color: var(--text-primary);
}
.movies-page-wrapper .breadcrumb-trail a:hover {
  color: var(--accent-red);
}
.movies-page-wrapper .breadcrumb-current {
  color: var(--text-primary);
}
.movies-page-wrapper .detail-tabs {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
.movies-page-wrapper .detail-tab {
  color: var(--text-secondary);
}
.movies-page-wrapper .detail-tab:hover {
  color: var(--text-primary);
}
.movies-page-wrapper .detail-tab.active {
  color: var(--text-primary);
  background: none;
  border-color: transparent;
}
.movies-page-wrapper .btn-circle {
  color: var(--text-secondary);
  border-color: rgba(0, 0, 0, 0.15);
  background: transparent;
}
.movies-page-wrapper .btn-circle:hover {
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.04);
}
.movies-page-wrapper .btn-circle.js-ask-nnubia {
  color: #fff !important;
  background: #e40d0d !important;
  border-color: transparent !important;
}
.movies-page-wrapper .btn-circle.js-ask-nnubia:hover,
.movies-page-wrapper .btn-circle.js-ask-nnubia:focus-visible {
  color: #fff !important;
  background: #c40b0b !important;
  border-color: transparent !important;
}
.movies-page-wrapper .btn-edit-movie {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}
.movies-page-wrapper .btn-edit-movie:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.25);
}
.movies-page-wrapper .detail-section-title {
  color: var(--text-primary);
}
.movies-page-wrapper .detail-meta-line {
  color: var(--text-secondary);
}
/* Series-specific — season tabs, episode cards */
.movies-page-wrapper .series-season-tabs-wrap {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
.movies-page-wrapper .series-season-tab {
  color: var(--text-secondary);
}
.movies-page-wrapper .series-season-tab:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}
.movies-page-wrapper .series-season-tab.active {
  color: #fff;
  background: var(--accent-red);
}
.movies-page-wrapper .episode-card {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
.movies-page-wrapper .episode-card-title {
  color: var(--text-primary);
}
.movies-page-wrapper .episode-card-desc {
  color: var(--text-secondary);
}
.movies-page-wrapper .episode-card-num {
  color: var(--text-secondary);
}
/* Comments section */
.movies-page-wrapper .detail-comments-section h2 {
  color: var(--text-primary);
}
/* Comment form & list — override inline dark styles */
.movies-page-wrapper.watch-page-wrapper .movie-comment-input-wrap {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.02);
}
.movies-page-wrapper.watch-page-wrapper .movie-comments-input {
  color: var(--text-primary);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  .movie-comment-meta
  .time {
  color: var(--text-secondary);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  .movie-comment-bubble {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  > .movies-comment-item
  + .movies-comment-item {
  border-top-color: rgba(0, 0, 0, 0.06);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  .movie-action-chip {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-secondary);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  .movie-action-chip:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  .movie-action-count {
  color: var(--text-secondary);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  .movies-comment-reply-cont {
  border-left-color: rgba(0, 0, 0, 0.1);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  .movies-comment-reply-cont
  .movie-comment-bubble {
  background: rgba(0, 0, 0, 0.04);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  .movies-reply-compose {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}
.movies-page-wrapper.watch-page-wrapper
  .movies-comlist-container
  .movies-comment-reply-box
  textarea {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

/* --- Movie cards — subtle elevation on light background --- */
.movies-page-wrapper .movie-card {
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}
.movies-page-wrapper .movie-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.movies-page-wrapper .movie-poster-link {
  background: #e8e8e8;
}
.movies-page-wrapper .movie-poster {
  background: #e8e8e8;
}
.movies-page-wrapper .movie-info {
  background: var(--primary-bg);
}
.movies-page-wrapper .movie-title {
  color: var(--text-primary);
}
.movies-page-wrapper .movie-title a:hover {
  color: var(--accent-red);
}
.movies-page-wrapper .friend-activity {
  color: var(--text-secondary);
}
.movies-page-wrapper .movie-banner {
  background-color: var(--tertiary-bg);
  color: var(--text-primary);
}

/* --- Trailer cards — day mode --- */
.movies-page-wrapper .trailer-card {
  background: var(--secondary-bg);
}
.movies-page-wrapper .trailer-label {
  color: var(--text-primary);
}

/* --- Details tab — meta cells, links, dividers for day mode --- */
.movies-page-wrapper .detail-meta-cell {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
.movies-page-wrapper .detail-meta-cell-value {
  color: var(--text-primary);
}
.movies-page-wrapper .detail-meta-cell-value a {
  color: var(--accent-red);
}
.movies-page-wrapper .detail-meta-cell-value a:hover {
  text-decoration: underline;
}
.movies-page-wrapper .detail-meta-cell-label {
  color: var(--text-secondary);
}

/* --- Search input — neon glow (both modes) --- */
.movies-page-wrapper .search-wrap svg {
  color: rgba(220, 38, 38, 0.45);
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(220, 38, 38, 0.3));
}
.movies-page-wrapper .search-wrap input {
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--text-primary);
  background: rgba(220, 38, 38, 0.03);
}
.movies-page-wrapper .search-wrap input::placeholder {
  color: rgba(220, 38, 38, 0.4);
  opacity: 1;
}
.movies-page-wrapper .search-wrap input:focus {
  border-color: rgba(220, 38, 38, 0.65);
}
.movies-page-wrapper .search-wrap:focus-within svg {
  color: rgba(220, 38, 38, 0.8);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.6));
}

/* --- Sticky filter bar — day mode text & borders --- */
.movies-page-wrapper .sticky-filter-bar {
  background: var(--primary-bg);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
.movies-page-wrapper .sticky-filter-bar .sort-by-label {
  color: var(--text-secondary);
}
.movies-page-wrapper .sfb-sep {
  background: rgba(0, 0, 0, 0.08);
}

} /* end html[data-mode="day"] light overrides */

html:has(link.night-mode-css) .movies-page-wrapper .search-wrap input,
body.night_mode_body .movies-page-wrapper .search-wrap input,
.night_mode .movies-page-wrapper .search-wrap input {
  color: rgba(255, 255, 255, 0.85);
  caret-color: rgba(255, 255, 255, 0.85);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.85);
}
