/* =======================================================
   NEX CINEMA — Modern Enhancement Layer
   Enhances the existing StreamIT design without breaking it.
   Applied globally via streamitLayout.blade.php
======================================================= */

/* -------------------------------------------------------
   1. GLOBAL REFINEMENTS
------------------------------------------------------- */

/* Smoother font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle page background tint */
body:not(.admin-body) {
  background-color: #0a0a0a;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* -------------------------------------------------------
   2. CARDS — Glass / Depth Enhancement
------------------------------------------------------- */

.iq-card,
.card-hover,
.iq-card-geners {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease !important;
}

.iq-card:hover,
.card-hover:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
}

/* -------------------------------------------------------
   3. BUTTONS — More polished
------------------------------------------------------- */

.iq-button .btn {
  transition:
    box-shadow 0.2s ease,
    transform 0.15s ease !important;
}

.iq-button .btn:hover {
  box-shadow: 0 6px 24px rgba(229, 9, 20, 0.45) !important;
  transform: translateY(-1px);
}

.iq-button .btn:active {
  transform: translateY(0);
}

/* View All links */
.iq-view-all {
  font-size: 0.84rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.iq-view-all:hover {
  opacity: 1;
}

/* -------------------------------------------------------
   4. MAIN SECTION HEADINGS
------------------------------------------------------- */

.main-title {
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  position: relative;
}

.main-title::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: #e50914;
  border-radius: 2px;
  margin-top: 8px;
}

/* -------------------------------------------------------
   5. HERO / BANNER SLIDER
------------------------------------------------------- */

/* Gradient overlay on banner for better text readability */
.iq-banner-thumb-slider .slider-images .slider--image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

/* Description text polish */
.iq-banner-thumb-slider .slider-content h1,
.iq-banner-thumb-slider .texture-text {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Thumbnail cards in OTT slider */
.iq-banner-thumb-slider .block-images {
  border-radius: 10px;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.iq-banner-thumb-slider .block-images:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* -------------------------------------------------------
   6. TOP TEN SECTION
------------------------------------------------------- */

.iq-top-ten-block .overly-images {
  border-radius: 10px;
  overflow: hidden;
}

.iq-top-ten-block .overly-images img {
  transition: transform 0.4s ease !important;
}

.iq-top-ten-block:hover .overly-images img {
  transform: scale(1.07) !important;
}

/* Number style */
.top-ten-numbers {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.9) 0%, rgba(150, 5, 12, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(229, 9, 20, 0.4));
}

/* -------------------------------------------------------
   7. VERTICAL / SERIES SLIDER
------------------------------------------------------- */

.verticle-slider .slider--col .swiper-slide .block-images {
  border-radius: 10px;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
}

.verticle-slider .slider--col .swiper-slide.swiper-slide-thumb-active .block-images,
.verticle-slider .slider--col .swiper-slide:hover .block-images {
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.3);
}

.verticle-slider .slider--col .swiper-slide.swiper-slide-thumb-active {
  opacity: 1 !important;
}

.verticle-slider .slider--col .swiper-slide.swiper-slide-thumb-active .block-images::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #e50914;
  border-radius: 0 2px 2px 0;
  z-index: 5;
}

/* -------------------------------------------------------
   8. GENRE CARDS
------------------------------------------------------- */

.iq-card-geners .img-box {
  border-radius: 12px !important;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.iq-card-geners:hover .img-box {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.iq-card-geners .blog-description {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
}

/* -------------------------------------------------------
   9. MOVIE / SERIES LISTING CARDS
------------------------------------------------------- */

/* Content cards on listing pages */
.iq-card .block-images .img-box img,
.card-hover .block-images .img-box img {
  transition: transform 0.4s ease !important;
}

.iq-card:hover .block-images .img-box img,
.card-hover:hover .block-images .img-box img {
  transform: scale(1.05) !important;
}

/* Card description overlay */
.card-description,
.card-description.with-transition {
  background: var(--bs-gray-900);
}

/*
 * Overlap fix — both swiper carousels and CSS grid:
 *
 * The hovered .block-images gets z-index:99 + overflow:visible so the
 * description can slide out below, but the *wrapper* element (swiper-slide
 * or grid .col) has no z-index — later siblings in DOM order paint on top.
 *
 * Fix: give every wrapper z-index:1 so they form a stacking context, then
 * raise the hovered wrapper to z-index:100 so its card floats above siblings.
 */

/* Swiper carousels (home, show page related content) */
.card-style-slider .swiper-slide {
  position: relative;
  z-index: 1;
}

.card-style-slider .swiper-slide:hover {
  z-index: 100;
}

/* Bootstrap grid (movies, tv-shows, genre, trending, search, new-releases) */
.row-cols-xl-6 .col,
.row-cols-lg-4 .col,
.row-cols-md-3 .col,
.row-cols-2 .col {
  position: relative;
  z-index: 1;
}

.row-cols-xl-6 .col:hover,
.row-cols-lg-4 .col:hover,
.row-cols-md-3 .col:hover,
.row-cols-2 .col:hover {
  z-index: 100;
}

/* -------------------------------------------------------
   10. NAVIGATION
------------------------------------------------------- */

/* Navbar backdrop blur on scroll (modern sticky nav) */
header.sticky {
  backdrop-filter: blur(16px) !important;
  background: rgba(10, 10, 10, 0.85) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* -------------------------------------------------------
   11. FOOTER
------------------------------------------------------- */

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* -------------------------------------------------------
   12. SWIPER NAV BUTTONS — Better visibility
------------------------------------------------------- */

.swiper-button.swiper-button-next,
.swiper-button.swiper-button-prev {
  transition:
    background 0.2s,
    transform 0.2s,
    opacity 0.2s !important;
}

.swiper-button.swiper-button-next:hover,
.swiper-button.swiper-button-prev:hover {
  transform: scale(1.1) !important;
}

.swiper-button-disabled {
  opacity: 0.3 !important;
  pointer-events: none !important;
}

/* Vertical slider nav buttons */
.vertical-slider-prev,
.vertical-slider-next {
  transition:
    background 0.2s,
    opacity 0.2s;
}

.vertical-slider-prev.swiper-button-disabled,
.vertical-slider-next.swiper-button-disabled {
  opacity: 0.25 !important;
  pointer-events: none !important;
}

/* -------------------------------------------------------
   13. CONTENT DETAIL / SHOW PAGE
------------------------------------------------------- */

.iq-breadcrumb {
  position: relative;
}

.iq-breadcrumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

/* -------------------------------------------------------
   14. SEARCH / LISTING SECTIONS
------------------------------------------------------- */

/* Section padding refinement */
.section-padding {
  padding-top: 80px;
  padding-bottom: 60px;
}

/* Pagination */
.pagination .page-link {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border-radius: 8px !important;
  margin: 0 2px;
  transition: background 0.2s !important;
}

.pagination .page-link:hover,
.pagination .page-item.active .page-link {
  background: #e50914 !important;
  border-color: #e50914 !important;
  color: #fff !important;
}

/* -------------------------------------------------------
   15. BACK-TO-TOP BUTTON
------------------------------------------------------- */

#back-to-top {
  transition:
    opacity 0.3s,
    transform 0.3s;
}

#back-to-top #top {
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4) !important;
  transition:
    box-shadow 0.2s,
    transform 0.2s !important;
}

#back-to-top #top:hover {
  box-shadow: 0 6px 24px rgba(229, 9, 20, 0.6) !important;
  transform: translateY(-2px);
}

/* -------------------------------------------------------
   16. FORMS (search etc.)
------------------------------------------------------- */

.form-control {
  transition:
    border-color 0.2s,
    box-shadow 0.2s !important;
}

/* -------------------------------------------------------
   17. LOADER
------------------------------------------------------- */

.loader.simple-loader {
  background: #0a0a0a;
}

.loader.simple-loader svg {
  display: block;
}

@keyframes nex-svg-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loader.simple-loader .svg-elem-1,
.loader.simple-loader .svg-elem-2,
.loader.simple-loader .svg-elem-3,
.loader.simple-loader .svg-elem-4,
.loader.simple-loader .svg-elem-5,
.loader.simple-loader .svg-elem-6,
.loader.simple-loader .svg-elem-7,
.loader.simple-loader .svg-elem-8,
.loader.simple-loader .svg-elem-9,
.loader.simple-loader .svg-elem-10,
.loader.simple-loader .svg-elem-11 {
  opacity: 0;
  animation: nex-svg-fade-in 0.4s ease forwards;
}

.loader.simple-loader .svg-elem-1 {
  animation-delay: 0s;
}
.loader.simple-loader .svg-elem-2 {
  animation-delay: 0.1s;
}
.loader.simple-loader .svg-elem-3 {
  animation-delay: 0.2s;
}
.loader.simple-loader .svg-elem-4 {
  animation-delay: 0.3s;
}
.loader.simple-loader .svg-elem-5 {
  animation-delay: 0.4s;
}
.loader.simple-loader .svg-elem-6 {
  animation-delay: 0.5s;
}
.loader.simple-loader .svg-elem-7 {
  animation-delay: 0.6s;
}
.loader.simple-loader .svg-elem-8 {
  animation-delay: 0.65s;
}
.loader.simple-loader .svg-elem-9 {
  animation-delay: 0.7s;
}
.loader.simple-loader .svg-elem-10 {
  animation-delay: 0.75s;
}
.loader.simple-loader .svg-elem-11 {
  animation-delay: 0.8s;
}

/* -------------------------------------------------------
   18. MOVIE / TV SHOW BANNER SLIDER
   The template sizes .swiper-banner-container but our HTML
   uses .swiper-movie-banner — bridge the gap here.
------------------------------------------------------- */

/* Give our swiper class the same height the template gives .swiper-banner-container */
.movie-banner .swiper-movie-banner {
  height: 75vh;
  min-height: 480px;
  position: relative;
}

.movie-banner .swiper-movie-banner .swiper-wrapper,
.movie-banner .swiper-movie-banner .swiper-slide {
  height: 100%;
}

/* shows-content: absolute overlay, pin content to the bottom */
.movie-banner .shows-content {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100% !important;
  z-index: 2;
  display: flex;
  align-items: flex-end;
}

/* Row fills full overlay height; align columns to the bottom */
.movie-banner .shows-content > .row {
  width: 100%;
  height: 100% !important;
  margin: 0;
  padding-left: 5rem;
  padding-bottom: 4rem;
  align-items: flex-end !important; /* override Bootstrap align-items-center */
}

/*
 * Fix 3: nav arrows — custom.min.css declares z-index:999 then immediately
 * overrides it with z-index:1. Force them above shows-content (z-index:2).
 * Also give them enough inset so they don't sit on top of the text.
 */
.movie-banner .swiper-banner-button-prev,
.movie-banner .swiper-banner-button-next {
  z-index: 10 !important;
}

.movie-banner .swiper-banner-button-prev {
  left: 1rem !important;
}

.movie-banner .swiper-banner-button-next {
  right: 1rem !important;
}

/* Match template responsive overrides */
@media (max-width: 767px) {
  .movie-banner .swiper-movie-banner {
    height: 24rem !important;
    min-height: 0;
  }

  .movie-banner .shows-content > .row {
    padding-left: 1.25rem;
    padding-bottom: 1.5rem;
  }
}

@media (max-width: 479px) {
  .movie-banner .swiper-movie-banner {
    height: 20rem !important;
  }
}

/* Remove excess top padding on the grid section that follows the banner */
.banner-container + section.section-padding,
.banner-container + .section-padding,
.movies-grid-section.section-padding,
.tvshows-grid-section.section-padding {
  padding-top: 2rem !important;
}

/* -------------------------------------------------------
   18b. MOVIE / TV BANNER — Modern Redesign Layer
------------------------------------------------------- */

/* Stronger cinematic gradient: strong left fade, also bottom fade for depth */
.movie-banner .movie-banner-image:before {
  background: linear-gradient(
    105deg,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.72) 40%,
    rgba(0, 0, 0, 0.18) 70%,
    transparent 100%
  ) !important;
}

/* Bottom vignette */
.movie-banner .movie-banner-image:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Hero title — large, bold, white */
.banner-hero-title {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.7);
}

/* Price / type badge */
.banner-price-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.banner-price-badge.free {
  background: rgba(25, 200, 100, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.45);
}

.banner-price-badge.paid {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.4);
}

/* Genre tag pills */
.banner-genre-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
  backdrop-filter: blur(4px);
}

.banner-genre-tag:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
}

/* Meta info row (year · duration · rating) */
.banner-meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.banner-meta-item {
  display: inline-flex;
  align-items: center;
}

.banner-meta-sep {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
}

/* Description */
.banner-description {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.925rem;
  line-height: 1.7;
  max-width: 500px;
}

/* "More Info" outline button */
.banner-info-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.4rem;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(4px);
}

.banner-info-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
}

/* Placeholder header when no featured content */
.page-hero-placeholder {
  background: #111;
  padding: 4rem 0;
}

/* -------------------------------------------------------
   19. CONTENT CARDS — Prevent Overlap
   NOTE: Template already handles aspect-ratio: 2/3 on img
   and overflow: hidden on .block-images. Only add what's
   truly missing, to avoid breaking the slide-in animation.
------------------------------------------------------- */

/* Ensure images render as proper portraits without mix-blend overlay washing them out */
.iq-card .block-images .img-box img,
.card-hover .block-images .img-box img {
  mix-blend-mode: normal !important;
  object-fit: cover;
  width: 100%;
  display: block;
}

/* -------------------------------------------------------
   20. VERTICAL SLIDER — Fix Container Height
   Template already has .slider-thumbs { height: 40em } and
   .slider-images { position: absolute; height: 100% }.
   We only need to ensure the swiper-container fills the height.
------------------------------------------------------- */

.verticle-slider .slider .swiper-container {
  height: 100% !important;
}

/* On mobile the breakpoint switches to horizontal — let it auto-size */
@media (max-width: 767px) {
  .verticle-slider .slider-thumbs {
    height: auto !important;
    width: 100% !important;
  }
}

/* -------------------------------------------------------
   21. PAGES DROPDOWN — Glass Styling
------------------------------------------------------- */

/* Desktop: float as glass dropdown panel */
@media (min-width: 1200px) {
  .iq-nav-menu .nav-item {
    position: relative;
  }

  .iq-nav-menu .nav-item .sub-nav.show {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    background: rgba(10, 10, 10, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7) !important;
    padding: 6px !important;
    z-index: 9999;
  }

  .iq-nav-menu .nav-item .sub-nav .nav-item .nav-link {
    border: none !important;
    border-radius: 8px !important;
    padding: 9px 14px !important;
    font-size: 0.88rem !important;
    color: rgba(255, 255, 255, 0.75) !important;
    transition:
      background 0.15s,
      color 0.15s !important;
  }

  .iq-nav-menu .nav-item .sub-nav .nav-item .nav-link:hover {
    background: rgba(229, 9, 20, 0.14) !important;
    color: #fff !important;
  }
}

/* Mobile: inline accordion, subtle indent */
@media (max-width: 1199px) {
  .iq-nav-menu .nav-item .sub-nav.show {
    background: rgba(255, 255, 255, 0.03) !important;
    border: none !important;
    border-radius: 8px;
    backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 4px 0 4px 16px !important;
    margin-top: 4px;
  }
}

/* -------------------------------------------------------
   22. MODERN PREMIUM REVAMP (Static Pages)
------------------------------------------------------- */

/* Typography */
.modern-heading {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient-primary {
  background: linear-gradient(135deg, rgba(229, 9, 20, 1) 0%, rgba(255, 107, 117, 1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glassmorphism Classes */
.glass-card {
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(229, 9, 20, 0.15);
  border-color: rgba(255, 255, 255, 0.15);
}

.glass-panel {
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(30px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modern Hero Section for Static Pages */
.modern-hero {
  position: relative;
  padding: 120px 0 80px 0;
  overflow: hidden;
  background-color: #0a0a0a;
}

.modern-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(229, 9, 20, 0.15) 0%, rgba(10, 10, 10, 1) 60%);
  pointer-events: none;
  z-index: 1;
}

.modern-hero .container-fluid,
.modern-hero .container {
  position: relative;
  z-index: 2;
}

/* Forms */
.form-modern .form-control {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  color: #fff !important;
  padding: 12px 16px !important;
  transition: all 0.3s ease !important;
}

.form-modern .form-control:focus {
  background: rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(229, 9, 20, 0.6) !important;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.2) !important;
}

.form-modern .form-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
}

/* Buttons */
.btn-modern {
  background: linear-gradient(135deg, #e50914 0%, #b80710 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 12px 28px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.3);
}

.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(229, 9, 20, 0.5);
  color: #fff;
}

/* Animations */
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

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

/* Delay Utils */
.delay-100 {
  animation-delay: 100ms;
}
.delay-200 {
  animation-delay: 200ms;
}
.delay-300 {
  animation-delay: 300ms;
}

/* -------------------------------------------------------
   19. NEX SEARCH OVERLAY
------------------------------------------------------- */
#nex-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

#nex-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

#nex-search-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  padding: 0 1.25rem;
  transform: translateY(-14px);
  opacity: 0;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}

/* Visible state (toggled by JS) */
#nex-search-overlay.nex-so-visible #nex-search-backdrop {
  opacity: 1;
}
#nex-search-overlay.nex-so-visible #nex-search-panel {
  transform: translateY(0);
  opacity: 1;
}

/* Close button */
#nex-search-close {
  position: absolute;
  top: -4rem;
  right: 1.25rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s,
    color 0.2s;
}
#nex-search-close:hover {
  border-color: #e50914;
  color: #e50914;
}

/* Label */
#nex-search-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* Input wrapper */
#nex-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 2px solid #e50914;
  padding-bottom: 0.65rem;
}

#nex-search-icon {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

#nex-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  caret-color: #e50914;
}
#nex-search-input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

/* Spinner */
#nex-search-spinner {
  flex-shrink: 0;
  color: #e50914;
  line-height: 0;
}
.nex-spin {
  animation: nexSpin 0.8s linear infinite;
}
@keyframes nexSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Results panel */
#nex-search-results {
  margin-top: 0.5rem;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}
#nex-search-results::-webkit-scrollbar {
  width: 4px;
}
#nex-search-results::-webkit-scrollbar-track {
  background: transparent;
}
#nex-search-results::-webkit-scrollbar-thumb {
  background: #e50914;
  border-radius: 2px;
}

/* Empty state */
.nex-sr-empty {
  padding: 1.25rem 1rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
  margin: 0;
}
.nex-sr-empty strong {
  color: rgba(255, 255, 255, 0.75);
}

/* List */
.nex-sr-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Item */
.nex-sr-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nex-sr-item:last-child {
  border-bottom: none;
}

.nex-sr-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  transition: background 0.15s;
}
.nex-sr-link:hover,
.nex-sr-item.nex-sr-active .nex-sr-link {
  background: rgba(229, 9, 20, 0.1);
  text-decoration: none;
}

.nex-sr-thumb {
  width: 44px;
  height: 62px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #222;
}

.nex-sr-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nex-sr-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nex-sr-type {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Badges */
.nex-sr-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.nex-sr-free {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.nex-sr-paid {
  background: rgba(229, 9, 20, 0.15);
  color: #e50914;
}

/* "See all" footer link */
.nex-sr-all {
  display: block;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  text-align: center;
  text-decoration: none;
  transition:
    color 0.2s,
    background 0.2s;
}
.nex-sr-all:hover {
  color: #e50914;
  background: rgba(229, 9, 20, 0.06);
  text-decoration: none;
}

/* Mobile */
@media (max-width: 576px) {
  #nex-search-overlay {
    padding-top: 5vh;
  }
  #nex-search-input {
    font-size: 1.15rem;
  }
  #nex-search-close {
    top: -3.25rem;
  }
}
