/* =========================================================
   MOVIYU — Netflix-Style Cinematic Theme + Scroll Parallax
   ========================================================= */

/* ── Fonts ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
  /* Netflix Reds */
  --red:        #E50914;
  --red-dark:   #b20710;
  --red-glow:   rgba(229,9,20,.35);

  /* Aliases for legacy code */
  --primary-color:   #E50914;
  --secondary-color: #b20710;
  --accent-color:    #ef4444;
  --primary-gradient: linear-gradient(135deg, #E50914 0%, #b20710 100%);
  --secondary-gradient: linear-gradient(135deg, #E50914 0%, #991b1b 100%);
  --accent-gradient: linear-gradient(135deg, #ef4444 0%, #E50914 100%);

  /* Backgrounds */
  --bg:         #141414;
  --bg-2:       #1a1a1a;
  --bg-3:       #232323;
  --card:       #1f1f1f;
  --background-primary:   #141414;
  --background-secondary: #1a1a1a;
  --background-tertiary:  #232323;
  --background-glass:      rgba(0,0,0,.75);
  --background-glass-hover: rgba(20,20,20,.9);

  /* Text */
  --white:  #ffffff;
  --muted:  #b3b3b3;
  --dim:    #666666;
  --text-primary:   #ffffff;
  --text-secondary: #e5e5e5;
  --text-muted:     #b3b3b3;
  --text-dim:       #737373;

  /* Borders */
  --border:           rgba(255,255,255,.08);
  --border-primary:   rgba(229,9,20,.3);
  --border-secondary: rgba(255,255,255,.1);

  /* Shadows */
  --shadow-small:  0 4px 15px rgba(0,0,0,.4);
  --shadow-medium: 0 8px 32px rgba(0,0,0,.6);
  --shadow-large:  0 16px 64px rgba(0,0,0,.8);
  --shadow-glow:   0 0 20px rgba(229,9,20,.4);

  /* Misc */
  --font:       'Space Grotesk', 'Inter', system-ui, sans-serif;
  --radius:     6px;
  --radius-small:  6px;
  --radius-medium: 8px;
  --radius-large:  12px;
  --radius-xl:     16px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --blur-light:  blur(10px);
  --blur-medium: blur(20px);
  --blur-heavy:  blur(30px);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 15px;
  letter-spacing: -.01em;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── Typography helpers ─────────────────────────────────── */
.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
}
h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
.lead { font-size: clamp(1rem,2vw,1.15rem); color: var(--muted); max-width: 52ch; }
.tiny { font-size: .8rem; color: var(--dim); }

/* ── Navigation ─────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 16px 0;
  background: rgba(20,20,20,.96);
  backdrop-filter: var(--blur-medium);
  -webkit-backdrop-filter: var(--blur-medium);
  border-bottom: 1px solid var(--border-primary);
  box-shadow: 0 4px 24px rgba(0,0,0,.8);
  z-index: 1000;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.navbar.scrolled {
  border-bottom-color: rgba(229,9,20,.45);
  box-shadow: 0 4px 32px rgba(0,0,0,.9), 0 1px 0 rgba(229,9,20,.2);
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-left  { display: flex; align-items: center; gap: 40px; }
.nav-right { display: flex; align-items: center; gap: 16px; }

.logo {
  font-size: 28px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  letter-spacing: -.02em;
  transition: all var(--transition);
}
.logo:hover { transform: translateY(-1px); filter: drop-shadow(0 4px 8px var(--red-glow)); }
.logo-link { display: flex; align-items: center; text-decoration: none; transition: all var(--transition); }
.logo-link:hover { transform: translateY(-1px); }
.logo-img {
  height: 40px; width: auto; object-fit: contain;
  transition: all var(--transition); filter: brightness(1);
}
.logo-img:hover { filter: brightness(1.1) drop-shadow(0 4px 8px var(--red-glow)); }
.logo-link img[alt] { font-size: 28px; color: transparent; }

.nav-menu { display: flex; list-style: none; gap: 25px; }
.nav-menu a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius-medium);
  transition: all var(--transition);
  position: relative;
  letter-spacing: -.01em;
}
.nav-menu a::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: var(--primary-gradient);
  transform: translateX(-50%);
  transition: width var(--transition);
  border-radius: 2px;
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--white);
  background: none;
  transform: translateY(-1px);
}
.nav-menu a:hover::before, .nav-menu a.active::before { width: 20px; }

.back-link { color: #e5e5e5; font-size: 14px; transition: color var(--transition); }
.back-link:hover { color: var(--red); }

/* Search box */
.search-box { position: relative; z-index: 1000; }
.search-box input {
  background: rgba(20,20,20,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  transition: all var(--transition);
  height: 48px; font-size: 15px;
  padding: 0 50px 0 20px;
  border-radius: 8px; width: 300px;
  font-weight: 500;
  font-family: var(--font);
  letter-spacing: -.01em;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.search-box input::placeholder { color: rgba(255,255,255,.6); font-weight: 400; }
.search-box input:focus {
  outline: none;
  background: rgba(15,15,15,.95);
  border: 1px solid rgba(229,9,20,.6);
  box-shadow: 0 4px 16px rgba(0,0,0,.4), 0 0 0 2px rgba(229,9,20,.2);
  transform: translateY(-1px);
}
.search-box i {
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.5); font-size: 18px;
  transition: color var(--transition);
  pointer-events: none;
}
.search-box:focus-within i { color: var(--red); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none; background: none; border: none;
  color: #e5e5e5; font-size: 24px; cursor: pointer; padding: 5px;
}
/* Mobile search icon — hidden on desktop */
.mobile-search-icon { display: none; }

/* ── Parallax Layers ────────────────────────────────────── */
.parallax-layer { will-change: transform; }

/* ── Global page film-strip overlay ────────────────────── */
/* Strips at z-index:1 — above the bare body bg, but below content (z-index:2+) */
#page-strips {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

#page-strips .pstrip {
  position: absolute;
  top: -120%;
  background: linear-gradient(
    to bottom,
    transparent        0%,
    rgba(229,9,20,.22) 28%,
    rgba(229,9,20,.45) 50%,
    rgba(229,9,20,.22) 72%,
    transparent       100%
  );
  animation: pstrip-drift linear infinite;
}

@keyframes pstrip-drift {
  to { transform: translateY(240vh); }
}

/* Interactive layers must sit above the strip plane */
.navbar          { z-index: 1000; }
.nav-container   { z-index: 1000; position: relative; }
#scroll-progress { z-index: 9999; }

/* Make the search results, modals etc. stay on top */
.search-box,
.modal-overlay,
.search-modal-overlay { z-index: 10000; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 85vh;
  min-height: 650px;
  display: flex;
  align-items: center;
  padding: 0 60px;
  overflow: hidden;
}

/* Cinematic gradient overlay on top of the bg-image inline style */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(10,10,15,.96) 0%, rgba(10,10,15,.7) 35%, transparent 100%),
    linear-gradient(to top, rgba(20,20,20,1) 0%, transparent 30%);
  z-index: 1;
}

/* Red accent glow */
.hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60%; height: 100%;
  background: linear-gradient(-45deg, rgba(229,9,20,.06) 0%, rgba(185,28,28,.04) 50%, transparent 100%);
  z-index: 1;
}

.hero-content {
  max-width: 650px;
  z-index: 3;
  position: relative;
  animation: fadeInUp .8s cubic-bezier(.4,0,.2,1);
}

.hero-title {
  font-size: clamp(2rem,5vw,3.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--white);
  line-height: 1.08;
  letter-spacing: -.03em;
  text-shadow: 0 4px 20px rgba(0,0,0,.8);
  position: relative;
}
.hero-title::after {
  content: '';
  position: absolute;
  bottom: -10px; left: 0;
  width: 80px; height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
  animation: slideInLeft .8s .3s cubic-bezier(.4,0,.2,1) both;
}

.hero-info {
  display: flex; gap: 20px;
  margin-bottom: 20px; margin-top: 20px;
  font-size: 16px; color: #fff;
  text-shadow: 1px 1px 4px rgba(0,0,0,.8);
}
.hero-info span { display: flex; align-items: center; gap: 5px; }
.rating { color: #fff; font-weight: normal; }

.hero-description {
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 32px;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 520px;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}
.hero-buttons { display: flex; gap: 15px; }

/* Film strips floating decoration */
.film-strips {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.strip {
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(229,9,20,.45), transparent);
  animation: drift linear infinite;
}
.strip:nth-child(1)  { left:  5%; height: 45%; top:-45%; width:2px;  animation-duration:1.4s; animation-delay:   0s; }
.strip:nth-child(2)  { left: 13%; height: 65%; top:-65%; width:1px;  animation-duration:1.1s; animation-delay: -.4s; opacity:.6; }
.strip:nth-child(3)  { left: 22%; height: 55%; top:-55%; width:3px;  animation-duration:1.8s; animation-delay: -.8s; }
.strip:nth-child(4)  { left: 30%; height: 40%; top:-40%; width:1px;  animation-duration:1.2s; animation-delay: -.2s; opacity:.5; }
.strip:nth-child(5)  { left: 40%; height: 70%; top:-70%; width:2px;  animation-duration:1.6s; animation-delay:-1.1s; }
.strip:nth-child(6)  { left: 50%; height: 50%; top:-50%; width:1px;  animation-duration:1.0s; animation-delay: -.6s; opacity:.4; }
.strip:nth-child(7)  { left: 58%; height: 60%; top:-60%; width:2px;  animation-duration:1.3s; animation-delay: -.9s; }
.strip:nth-child(8)  { left: 67%; height: 45%; top:-45%; width:3px;  animation-duration:1.7s; animation-delay: -.3s; opacity:.7; }
.strip:nth-child(9)  { left: 75%; height: 55%; top:-55%; width:1px;  animation-duration:1.1s; animation-delay:-1.4s; opacity:.5; }
.strip:nth-child(10) { left: 82%; height: 65%; top:-65%; width:2px;  animation-duration:1.5s; animation-delay: -.7s; }
.strip:nth-child(11) { left: 90%; height: 40%; top:-40%; width:1px;  animation-duration:1.2s; animation-delay: -.1s; opacity:.6; }
.strip:nth-child(12) { left: 96%; height: 50%; top:-50%; width:2px;  animation-duration:1.4s; animation-delay:-1.2s; }

@keyframes drift { to { transform: translateY(260vh); } }

/* Parallax orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 2;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(229,9,20,.15) 0%, transparent 70%);
  top: -100px; right: -100px;
}
.orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(229,9,20,.08) 0%, transparent 70%);
  bottom: 0; left: 5%;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  padding: 12px 24px;
  border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .2s ease;
  text-decoration: none;
  letter-spacing: .02em;
  position: relative; overflow: hidden;
  min-width: 140px;
  font-family: var(--font);
}
.btn::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transition: left .5s;
}
.btn:hover::before { left: 100%; }

.btn-play {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: var(--shadow-medium), 0 4px 20px var(--red-glow);
}
.btn-play:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-large), 0 8px 32px var(--red-glow);
}

.btn-info {
  background: var(--background-glass);
  backdrop-filter: var(--blur-light);
  -webkit-backdrop-filter: var(--blur-light);
  color: var(--white);
  border: 1px solid var(--border-primary);
}
.btn-info:hover {
  background: var(--background-glass-hover);
  border-color: var(--red);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

/* Primary CTA (from provided CSS) */
.btn.primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 24px var(--red-glow);
}
.btn.primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--red-glow);
}
.btn.primary:active { transform: translateY(0); }

/* Back button */
.back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, rgba(229,9,20,.2), rgba(178,7,16,.2));
  border: 1px solid rgba(229,9,20,.3);
  border-radius: 12px;
  color: white; text-decoration: none;
  transition: all var(--transition); font-size: 18px;
}
.back-btn:hover {
  background: linear-gradient(135deg, rgba(229,9,20,.4), rgba(178,7,16,.4));
  border-color: rgba(229,9,20,.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(229,9,20,.3);
}

/* ── Content Wrapper ────────────────────────────────────── */
/* z-index:2 creates a stacking context so ALL cards inside it
   paint above the strips (z-index:1). No background keeps the
   transparent gaps, so strips show through between cards.       */
.content-wrapper {
  padding: 60px 0 80px;
  position: relative;
  z-index: 2;
  margin-top: -120px;
  overflow: visible;
}

/* ── Section divider ────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 8%;
}

/* ── Section header ─────────────────────────────────────── */
.section-header {
  text-align: center;
  display: flex; flex-direction: column; gap: .75rem;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}
.section-header p:not(.eyebrow) { color: var(--muted); }

/* ── Movie Rows ─────────────────────────────────────────── */
.movie-row { margin-bottom: 60px; position: relative; overflow: visible; }

.row-title {
  font-size: 28px;
  color: var(--white);
  font-weight: 700;
  margin-left: 60px; margin-right: 60px;
  margin-top: 0; margin-bottom: 24px;
  letter-spacing: -.02em;
  position: relative; display: inline-block;
}
.row-title::after {
  content: '';
  position: absolute; bottom: -6px; left: 0;
  width: 40px; height: 3px;
  background: var(--accent-gradient); border-radius: 2px;
}

.slider-wrapper { position: relative; padding: 0 50px; overflow: visible; }
.movie-slider {
  display: flex; flex-direction: row;
  overflow-y: visible; overflow-x: scroll;
  padding: 30px 20px 40px 20px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.movie-slider::-webkit-scrollbar { display: none; }

/* Slider arrows */
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px;
  background: var(--background-glass);
  backdrop-filter: var(--blur-medium);
  -webkit-backdrop-filter: var(--blur-medium);
  border: 1px solid var(--border-primary);
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  opacity: 0; visibility: hidden;
  transition: all var(--transition); z-index: 10;
  box-shadow: var(--shadow-medium);
}
.movie-row:hover .slider-arrow { opacity: 1; visibility: visible; }
.slider-arrow:hover {
  background: var(--background-glass-hover);
  border-color: var(--red);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-large), var(--shadow-glow);
}
.slider-arrow.left  { left: 10px; }
.slider-arrow.right { right: 10px; }
.slider-arrow:disabled { opacity: .3; cursor: not-allowed; pointer-events: none; }

/* ── Movie Cards ────────────────────────────────────────── */
.movie-card {
  display: flex; flex-direction: column;
  margin-right: 12px;
  position: relative; cursor: pointer;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  min-width: 220px; flex-shrink: 0;
  border-radius: var(--radius-large);
  overflow: hidden;
  background: var(--background-secondary);
  border: 1px solid var(--border-secondary);
  box-shadow: var(--shadow-small);
}
.movie-card img {
  width: 100%; height: 320px;
  object-fit: cover; object-position: top;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  user-select: none;
}
.movie-card:hover {
  transform: translateY(-8px) scale(1.08);
  z-index: 999;
  box-shadow: var(--shadow-large), var(--shadow-glow);
  border-color: var(--red);
}
.movie-card:hover img { transform: scale(1.1); filter: brightness(1.1) contrast(1.1); }
.movie-card:first-of-type { margin-left: 60px; }
.movie-card:last-of-type  { margin-right: 60px; }

.movie-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,15,.4) 0%, rgba(10,10,15,.7) 50%, rgba(10,10,15,.95) 100%);
  backdrop-filter: var(--blur-light);
  -webkit-backdrop-filter: var(--blur-light);
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: var(--radius-large);
}
.movie-card:hover .movie-card-overlay { opacity: 1; visibility: visible; }

.overlay-actions { display: flex; gap: 8px; margin-bottom: auto; }
.overlay-actions button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border-primary);
  background: var(--background-glass);
  backdrop-filter: var(--blur-light);
  -webkit-backdrop-filter: var(--blur-light);
  color: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
  box-shadow: var(--shadow-small);
}
.overlay-actions button:hover {
  background: var(--background-glass-hover);
  border-color: var(--red);
  transform: scale(1.1); box-shadow: var(--shadow-medium);
}
.overlay-actions button:not(.play-btn) { display: none; }
.overlay-actions .play-btn { background: var(--primary-gradient); border-color: transparent; color: var(--white); }
.overlay-actions .play-btn:hover { transform: scale(1.15); box-shadow: var(--shadow-medium), var(--shadow-glow); }

.overlay-content { margin-top: auto; }
.movie-card-overlay h3 { font-size: 16px; color: #fff; font-weight: bold; margin: 0 0 8px; user-select: none; line-height: 1.2; }
.overlay-date   { font-size: 12px; color: rgba(255,255,255,.8); margin-bottom: 8px; }
.overlay-rating { display: flex; gap: 2px; margin-bottom: 8px; }
.star      { width: 14px; height: 14px; color: #fbbf24; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.star.empty{ color: rgba(255,255,255,.2); }
.overlay-genres { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.genre-tag {
  font-size: 10px; font-weight: 500; color: var(--white);
  background: var(--background-glass);
  backdrop-filter: var(--blur-light); -webkit-backdrop-filter: var(--blur-light);
  padding: 4px 10px; border-radius: var(--radius-small);
  border: 1px solid var(--border-primary);
  letter-spacing: -.01em; text-transform: uppercase;
}
.overlay-buttons { display: flex; gap: 10px; }
.overlay-btn {
  background: var(--primary-gradient); color: var(--white); border: none;
  padding: 8px 16px; border-radius: var(--radius-medium);
  cursor: pointer; font-weight: 600; font-size: 12px;
  transition: all var(--transition); letter-spacing: -.01em;
  box-shadow: var(--shadow-small);
}
.overlay-btn:hover { transform: translateY(-1px) scale(1.05); box-shadow: var(--shadow-medium), var(--shadow-glow); }

/* ── Badge ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--red); color: var(--white);
  font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .75rem; border-radius: 3px;
  width: fit-content;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  background: #fff; border-radius: 50%;
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.7); }
}

/* ── Scroll-reveal — bidirectional ──────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity .65s cubic-bezier(.16,1,.3,1),
              transform .65s cubic-bezier(.16,1,.3,1);
}
.reveal.from-above { transform: translateY(-44px); }
.reveal.visible    { opacity: 1; transform: translateY(0) !important; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .22s; }
.reveal-delay-3 { transition-delay: .36s; }

/* ── Browse Page ────────────────────────────────────────── */
.browse-container { padding: 140px 60px 60px; min-height: 100vh; position: relative; z-index: 2; }
.browse-title {
  font-size: 42px; font-weight: 700; margin-bottom: 40px;
  color: var(--white); letter-spacing: -.02em;
  position: relative; display: inline-block;
}
.browse-title::after {
  content: '';
  position: absolute; bottom: -8px; left: 0;
  width: 60px; height: 4px;
  background: var(--secondary-gradient); border-radius: 2px;
}
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px; overflow: visible; padding: 20px 0 40px;
}

.browse-card {
  display: flex; flex-direction: column;
  position: relative; cursor: pointer;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  aspect-ratio: 2/3; border-radius: var(--radius-large);
  overflow: hidden;
  background: var(--background-secondary);
  border: 1px solid var(--border-secondary);
  box-shadow: var(--shadow-small);
}
.browse-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: all .4s cubic-bezier(.4,0,.2,1); user-select: none; }
.browse-card:hover { transform: translateY(-8px) scale(1.05); z-index: 999; box-shadow: var(--shadow-large), var(--shadow-glow); border-color: var(--red); }
.browse-card:hover img { transform: scale(1.1); filter: brightness(1.1) contrast(1.1); }

.browse-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,15,.4) 0%, rgba(10,10,15,.7) 50%, rgba(10,10,15,.95) 100%);
  backdrop-filter: var(--blur-light); -webkit-backdrop-filter: var(--blur-light);
  padding: 20px; opacity: 0; visibility: hidden;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: var(--radius-large);
}
.browse-card:hover .browse-card-overlay { opacity: 1; visibility: visible; }
.browse-card-overlay h3 {
  font-size: 18px; color: var(--white); font-weight: 600;
  margin: 0 0 12px; user-select: none; line-height: 1.2; letter-spacing: -.01em;
}
.no-results { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: #999; }
.no-results i { font-size: 64px; color: var(--red); margin-bottom: 20px; }
.no-results p { font-size: 20px; }
.no-movies { color: var(--muted); padding: 20px 60px; }

/* ── Player & Details sections ──────────────────────────── */
.player-page  { background: var(--bg); }
.player-container { margin-top: 70px; background: #000; max-width: 100%; }
#videoPlayer  { width: 100%; max-height: 80vh; background: #000; }

.movie-details { padding: 40px 50px; background: var(--bg); }
.details-container { max-width: 1200px; margin: 0 auto; }
.movie-title { font-size: 42px; margin-bottom: 15px; color: var(--red); }
.movie-meta  { display: flex; gap: 25px; margin-bottom: 25px; font-size: 16px; color: #e5e5e5; }
.movie-description { font-size: 18px; line-height: 1.8; color: #d0d0d0; max-width: 900px; }

/* ── Footer ─────────────────────────────────────────────── */
.footer, .site-footer {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border-top: 1px solid var(--border-primary);
  padding: 60px 60px 40px;
  margin-top: 80px; position: relative;
}
.footer::before, .site-footer::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 2px;
  background: var(--accent-gradient); border-radius: 2px;
}
.footer-content { max-width: 1400px; margin: 0 auto; text-align: center; }
.footer-content p { color: var(--muted); margin-bottom: 20px; font-size: 14px; font-weight: 400; }
.footer-links { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.footer-links a {
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: all var(--transition); padding: 8px 12px; border-radius: var(--radius-small);
}
.footer-links a:hover { color: var(--white); background: var(--background-glass); backdrop-filter: var(--blur-light); transform: translateY(-1px); }

/* ── Custom scrollbar ───────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── Animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(229,9,20,.4); }
  50%       { box-shadow: 0 0 40px rgba(229,9,20,.6); }
}
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position:  1000px 0; }
}

.fade-in-up    { animation: fadeInUp .8s cubic-bezier(.4,0,.2,1); }
.slide-in-left { animation: slideInLeft .6s cubic-bezier(.4,0,.2,1); }
.glass-effect  { background: var(--background-glass); backdrop-filter: var(--blur-light); -webkit-backdrop-filter: var(--blur-light); border: 1px solid var(--border-primary); }
.loading {
  animation: shimmer 2s infinite;
  background: linear-gradient(to right, #141414 0%, #232323 50%, #141414 100%);
  background-size: 1000px 100%;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { padding: 0 30px; }
  .orb-1 { width: 280px; height: 280px; }
}

@media (max-width: 768px) {
  body { padding-top: 0; }

  /* ── Single-row mobile navbar: [☰] [LOGO] [🔍] ── */
  .navbar {
    background: rgba(20,20,20,.96);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229,9,20,.2);
    min-height: auto;
  }
  .nav-container {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    padding: 0 14px;
    height: 58px;
    gap: 0;
  }

  /* Hamburger — left */
  .mobile-menu-toggle {
    display: flex; align-items: center; justify-content: center;
    position: static;
    width: 40px; height: 40px;
    background: none; border: none;
    color: #e5e5e5; font-size: 20px;
    cursor: pointer; flex-shrink: 0;
    border-radius: 8px;
    transition: color var(--transition), background var(--transition);
  }
  .mobile-menu-toggle:hover { color: var(--red); }

  /* Logo — centre */
  .nav-left {
    flex: 1;
    justify-content: center;
    gap: 0;
  }
  .logo-link { justify-content: center; }
  .logo-img  { height: 32px; max-width: 130px; }
  .logo      { font-size: 22px; text-align: center; }

  /* Hide full search bar on mobile by default */
  .nav-right { display: none !important; }

  /* Slide-down: show the real EnhancedSearch when search icon tapped */
  .navbar.search-open .nav-right {
    display: block !important;
    position: absolute !important;
    top: 58px; left: 0; width: 100%;
    padding: 10px 14px 14px;
    background: rgba(20,20,20,.97);
    border-top: 1px solid rgba(229,9,20,.2);
    z-index: 9999;
  }

  /* Mobile search icon — right */
  .mobile-search-icon {
    display: flex !important; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex-shrink: 0;
    background: none; border: none;
    color: #e5e5e5; font-size: 18px;
    cursor: pointer; border-radius: 8px;
    transition: color var(--transition);
  }
  .mobile-search-icon:hover { color: var(--red); }

  /* Slide-down nav menu */
  .nav-menu {
    position: fixed; top: 58px; left: -100%;
    width: 72%; max-width: 280px;
    background: rgba(20,20,20,.98); flex-direction: column;
    padding: 20px; gap: 12px; transition: left .3s ease;
    height: calc(100vh - 58px); z-index: 10002;
    box-shadow: 4px 0 20px rgba(0,0,0,.6); backdrop-filter: blur(20px);
  }
  .nav-menu.active { left: 0; }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 16px; }

  .hero { height: 75vh; min-height: 450px; padding: 140px 15px 0; align-items: flex-end; padding-bottom: 80px; }
  .hero-content { max-width: 100%; }
  .hero-title   { font-size: 28px; margin-bottom: 12px; }
  .hero-title::after { display: none; }
  .hero-info    { font-size: 13px; gap: 12px; margin-bottom: 12px; }
  .hero-description { font-size: 14px; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-buttons { flex-direction: column; gap: 12px; width: 100%; margin-bottom: 20px; }
  .btn { padding: 14px 24px; font-size: 15px; width: 100%; justify-content: center; min-height: 48px; }
  .film-strips  { display: none; }
  .orb-1, .orb-2 { display: none; }

  .content-wrapper { padding: 20px 15px; margin-top: 0; }
  .movie-row    { margin-bottom: 30px; }
  .row-title    { font-size: 18px; margin-bottom: 12px; margin-left: 0; }
  .slider-wrapper { padding: 0; }
  .slider-arrow { display: none; }
  .movie-slider { padding: 10px 0; overflow-x: auto; }
  .movie-card   { min-width: 120px; }
  .movie-card:first-of-type { margin-left: 15px; }
  .movie-card:last-of-type  { margin-right: 15px; }
  .movie-card-overlay { padding: 10px; }
  .movie-card-overlay h3 { font-size: 12px; margin-bottom: 4px; }

  .browse-container { padding: 180px 15px 30px; }
  .browse-title { font-size: 22px; margin-bottom: 20px; }
  .browse-grid  { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .player-container { margin-top: 160px; }
  #videoPlayer { max-height: 50vh; }
  .movie-details { padding: 20px 15px; }
  .movie-title  { font-size: 24px; margin-bottom: 10px; }
  .movie-meta   { font-size: 13px; gap: 15px; flex-wrap: wrap; }
  .movie-description { font-size: 14px; }

  .footer, .site-footer { padding: 30px 15px; }
  .footer-content p  { font-size: 12px; }
  .footer-links { flex-wrap: wrap; gap: 15px; font-size: 12px; }
  .no-results { padding: 40px 15px; }
  .no-results i { font-size: 48px; }
  .no-results p { font-size: 16px; }
}

@media (max-width: 480px) {
  .logo    { font-size: 20px; }
  .hero-title { font-size: 24px; }
  .hero-info  { font-size: 12px; gap: 10px; }
  .hero-description { font-size: 13px; -webkit-line-clamp: 2; }
  .btn { padding: 10px 20px; font-size: 13px; }
  .movie-card { min-width: 110px; }
  .row-title  { font-size: 16px; }
  .browse-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .browse-title { font-size: 20px; }
  .movie-title  { font-size: 20px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav-container { padding: 0 30px; }
  .hero { padding: 0 30px; }
  .hero-title { font-size: 42px; }
  .content-wrapper, .browse-container, .movie-details { padding: 30px; }
  .movie-card { min-width: 180px; }
  .browse-grid { grid-template-columns: repeat(4,1fr); gap: 12px; }
  .row-title { font-size: 20px; }
}
