/**
 * JStream - Netflix Clone Styles
 * Modern, responsive design with Netflix-inspired UI
 */

/* CSS Variables */
:root {
  /* Netflix Colors - Updated for Step 7 */
  --netflix-red: #e50914;
  --netflix-black: #000000;
  --netflix-dark-gray: #141414;
  --netflix-gray: #2f2f2f;
  --netflix-light-gray: #b3b3b3;
  --netflix-white: #ffffff;
  --netflix-hover-gray: #333333;
  
  /* Primary Theme Colors */
  --primary-red: #e50914;
  --primary-black: #141414;
  --primary-dark: #0d0d0d;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  
  /* Typography */
  --font-family: 'Netflix Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-xxl: 32px;
  --font-size-hero: 48px;
  
  /* Layout */
  --header-height: 68px;
  --border-radius: 4px;
  --border-radius-lg: 8px;
  
  /* Shadows - Enhanced for Step 7 */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.8);
  
  /* Transitions - Enhanced for Step 7 */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* New UI additions */
  --gradient-accent: linear-gradient(135deg, #e50914 0%, #ff3d2e 100%);
  --surface-alt: #1d1d1d;
  --text-muted: #8b8b8b;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--primary-black);
  color: var(--netflix-white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Enhanced Header - Step 7 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: linear-gradient(180deg, rgba(20,20,20,0.9) 0%, rgba(20,20,20,0.7) 50%, transparent 100%);
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header.scrolled {
  background-color: var(--primary-black);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

/* Hide full top header/nav on small screens (320, 360, 375, 425, 768) */
@media (max-width: 768px) {
  .header { display: none !important; }
  body.mobile-header-init .header,
  body.header-visible .header { display: none !important; }
}

/* Search Hero Template */
.search-hero { padding: clamp(48px,8vw,120px) 0 32px; text-align:center; max-width:1000px; margin:0 auto; }
.search-hero-title { font-size:clamp(2rem,5.5vw,3rem); font-weight:700; line-height:1.15; margin:0 0 18px; letter-spacing:-0.5px; }
.search-hero-tagline { font-size:clamp(.95rem,1.4vw,1.1rem); color:var(--text-muted); margin:0 0 30px; }
.search-panel { max-width:620px; margin:0 auto; background:linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02)); border:1px solid rgba(255,255,255,0.08); padding:24px 26px 30px; border-radius:28px; display:flex; flex-direction:column; gap:16px; backdrop-filter:blur(6px); box-shadow:0 4px 24px -8px rgba(0,0,0,.6); }
.search-panel:focus-within { border-color:rgba(255,255,255,0.18); box-shadow:0 4px 32px -4px rgba(0,0,0,.7); }
.search-scope select { width:100%; background:#101010; color:#fff; font-size:14px; border:1px solid rgba(255,255,255,0.14); border-radius:14px; padding:13px 44px 13px 16px; outline:none; appearance:none; line-height:1.2; box-shadow:0 2px 4px rgba(0,0,0,.4) inset; }
.search-scope select:focus { border-color:var(--netflix-red); box-shadow:0 0 0 2px rgba(229,9,20,.35), 0 2px 4px rgba(0,0,0,.5) inset; }
.search-field { position:relative; }
.search-field svg { position:absolute; top:50%; left:16px; transform:translateY(-50%); width:22px; height:22px; color:var(--text-muted); }
.search-field input { width:100%; background:#101010; border:1px solid rgba(255,255,255,0.14); border-radius:14px; padding:15px 18px 15px 52px; color:#fff; font-size:16px; line-height:1.3; outline:none; transition:.25s border-color,.25s box-shadow; }
.search-field input:focus { border-color:var(--netflix-red); box-shadow:0 0 0 2px rgba(229,9,20,.35); }
.results-heading { margin:42px 0 24px; font-size:1.4rem; font-weight:600; text-align:left; padding-left:8px; }
.visually-hidden { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0 0 0 0)!important; white-space:nowrap!important; border:0!important; }
@media (max-width:680px){ .search-panel { padding:20px 20px 24px; border-radius:22px; } .search-hero { padding-top:40px; } .search-hero-title { font-size:clamp(1.9rem,7vw,2.4rem); } }
@media (max-width:480px){ .search-panel { gap:14px; } .results-heading { font-size:1.2rem; margin-top:36px; } }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--spacing-xxl);
  max-width: 1920px;
  margin: 0 auto;
}

/* Enhanced Logo - Step 7 */
.nav-brand .logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--netflix-red);
  text-decoration: none;
  text-shadow: 0 2px 4px rgba(229, 9, 20, 0.3);
  transition: all var(--transition-fast);
  letter-spacing: -1px;
}

.nav-brand .logo:hover {
  transform: scale(1.05);
  text-shadow: 0 4px 8px rgba(229, 9, 20, 0.5);
}

/* Enhanced Navigation Menu - Step 7 */
.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
  align-items: center;
}

/* Mobile navigation toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  gap: 3px;
}

.hamburger-line {
  width: 22px;
  height: 2px;
  background: var(--netflix-white);
  transition: all 0.3s ease;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-link {
  color: var(--netflix-white);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
}

.nav-link:hover {
  color: var(--netflix-light-gray);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--netflix-white);
  background: rgba(229, 9, 20, 0.2);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--netflix-red);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.6);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* Search */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-btn {
  background: none;
  border: none;
  color: var(--netflix-white);
  cursor: pointer;
  padding: var(--spacing-sm);
  border-radius: var(--border-radius);
  transition: background-color var(--transition-fast);
}

.search-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.search-input {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--netflix-gray);
  border-radius: var(--border-radius);
  color: var(--netflix-white);
  font-size: var(--font-size-sm);
  opacity: 0;
  transition: all var(--transition-normal);
}

.search-container.active .search-input {
  width: 250px;
  opacity: 1;
}

.search-input::placeholder {
  color: var(--netflix-light-gray);
}

/* Notifications and Profile */
/* Notification & profile styles removed per UI simplification */

/* Hero Section */
 .hero {
  position: relative;
  min-height: 82vh; /* keep overall height */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: stretch;
  padding: 0; /* remove padding so slide backdrop is full bleed */
  overflow: hidden;
 }

 /* Layered gradient & fade for better readability */
 .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 35%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.75) 100%), /* vertical fade */
    linear-gradient(110deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.15) 72%, rgba(0,0,0,0) 100%); /* side directional */
  mix-blend-mode: normal;
  z-index: 1;
  pointer-events:none;
 }

 .hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  animation: heroDropIn .9s cubic-bezier(.65,.05,.36,1) 40ms both;
 }

@keyframes heroDropIn {
  0% { transform: translateY(-18px); opacity:0; }
  60% { transform: translateY(6px); opacity:1; }
  100% { transform: translateY(0); opacity:1; }
}

.hero-title {
  font-size: var(--font-size-hero);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-description {
  font-size: var(--font-size-lg);
  line-height: 1.4;
  margin-bottom: var(--spacing-xl);
  color: var(--netflix-light-gray);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Shift focal point ~40% toward top (default 50% center -> 50% 40%) */
  object-position: 50% 40%;
}

/* Hero Carousel */
/* Horizontal hero carousel implementation */
.hero-slides { position:absolute; inset:0; width:100%; height:100%; display:flex; z-index:1; transition:transform .75s cubic-bezier(.55,.1,.25,1); will-change:transform; }
.hero-slide { position:relative; flex:0 0 100%; width:100%; height:100%; display:flex; align-items:flex-start; opacity:0; transition:opacity .5s ease .1s; }
.hero, .hero-slides, .hero-slide { min-height:82vh; }
/* Explicit fallback height so percentage heights resolve */
.hero { height:82vh; overflow:hidden; }
.hero-slide.active { opacity:1; }
.hero-slide .hero-backdrop { position:absolute; inset:0; z-index:0; }
.hero-slide::after { content:""; position:absolute; inset:0; z-index:1; pointer-events:none; background:
  linear-gradient(45deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.65) 30%, rgba(0,0,0,0.38) 55%, rgba(0,0,0,0.15) 75%, rgba(0,0,0,0) 100%);
  /* 45deg = to top-right, so first (dark) stop sits at bottom-left */
}
.hero-slide .hero-content { position:relative; z-index:2; padding:140px var(--spacing-xxl) 160px; width:100%; display:flex; align-items:flex-start; }
@media (max-width:900px){ .hero-slide .hero-content { padding:120px 48px 140px; } }
@media (max-width:600px){ .hero-slide .hero-content { padding:110px 28px 120px; } }
.hero-carousel-controls { position:absolute; bottom:34px; right:42px; display:flex; align-items:center; gap:12px; z-index:5; }
.hero-nav { background:rgba(0,0,0,0.45); border:1px solid rgba(255,255,255,0.2); backdrop-filter:blur(6px); color:#fff; width:42px; height:42px; display:flex; align-items:center; justify-content:center; font-size:26px; line-height:1; border-radius:50%; cursor:pointer; transition:.3s background,.3s transform; }
.hero-nav:hover { background:rgba(0,0,0,0.65); transform:translateY(-2px); }
.hero-dots { display:flex; gap:8px; }
.hero-dot { width:14px; height:14px; border-radius:50%; border:2px solid rgba(255,255,255,0.55); background:rgba(255,255,255,0.18); cursor:pointer; padding:0; transition:.35s all; position:relative; }
.hero-dot.active { background:var(--netflix-red); border-color:var(--netflix-red); box-shadow:0 0 0 4px rgba(229,9,20,0.35); }
.hero-dot:hover { background:rgba(255,255,255,0.4); }
.skeleton-bg { background:linear-gradient(110deg,#1d1d1d 8%,#262626 18%,#1d1d1d 33%); background-size:200% 100%; animation:skeletonGlow 1.4s linear infinite; width:100%; height:100%; }
@keyframes skeletonGlow { to { background-position:-200% 0; } }
/* Breakpoint: <= 900px */
@media (max-width:900px){
  .hero-slide .hero-content { padding:120px 56px 150px; }
  .hero-title { font-size: clamp(2rem,4.6vw,3rem); }
  .hero-description { font-size: clamp(0.95rem,1.5vw,1.15rem); max-width: 640px; }
  .hero-carousel-controls { bottom:28px; right:28px; }
  .hero-nav { width:40px; height:40px; font-size:22px; }
  .hero-dot { width:12px; height:12px; }
  .hero-actions .btn { padding:12px 22px; font-size:15px; }
}
/* Breakpoint: <= 768px (includes 760 & 720 targets) */
@media (max-width:768px){
  .hero, .hero-slides, .hero-slide { min-height: 74vh; }
  .hero-slide .hero-content { padding:110px 44px 140px; }
  .hero-title { font-size: clamp(1.9rem,5.4vw,2.6rem); }
  .hero-description { font-size: 0.95rem; line-height:1.35; max-width:560px; }
  .hero-actions { gap:14px; }
  .hero-actions .btn { padding:11px 20px; font-size:14px; }
  .hero-carousel-controls { bottom:26px; right:24px; }
  .hero-nav { width:38px; height:38px; font-size:21px; }
}
/* Breakpoint: <= 720px (fine tune) */
@media (max-width:720px){
  .hero-slide .hero-content { padding:104px 40px 132px; }
  .hero-title { font-size: clamp(1.85rem,5.8vw,2.45rem); }
  .hero-description { font-size:0.92rem; }
  .hero-carousel-controls { bottom:24px; right:22px; }
}
/* Breakpoint: <= 600px general (before very small sizes) */
@media (max-width:600px){
  .hero, .hero-slides, .hero-slide { min-height: 70vh; }
  .hero-slide .hero-content { padding:100px 32px 120px; }
  .hero-title { font-size: clamp(1.75rem,6.2vw,2.2rem); }
  .hero-description { font-size:0.9rem; max-width:500px; }
  .hero-actions .btn { padding:10px 18px; font-size:13.5px; }
  .hero-carousel-controls { bottom:22px; right:20px; }
  .hero-nav { width:34px; height:34px; font-size:19px; }
}
/* Breakpoint: <= 425px */
@media (max-width:425px){
  .hero, .hero-slides, .hero-slide { min-height: 66vh; }
  .hero-slide .hero-content { padding:92px 24px 110px; }
  .hero-title { font-size: clamp(1.55rem,7vw,2rem); }
  .hero-description { font-size:0.85rem; max-width:440px; }
  .hero-actions { flex-wrap:wrap; gap:10px; }
  .hero-actions .btn { padding:9px 16px; font-size:13px; }
  .hero-carousel-controls { bottom:18px; right:18px; gap:10px; }
  .hero-nav { width:32px; height:32px; font-size:18px; }
  .hero-dot { width:10px; height:10px; }
}
/* Breakpoint: <= 375px */
@media (max-width:375px){
  .hero, .hero-slides, .hero-slide { min-height: 60vh; }
  .hero-slide .hero-content { padding:86px 20px 106px; }
  .hero-title { font-size: clamp(1.45rem,7.8vw,1.85rem); }
  .hero-description { font-size:0.8rem; }
  .hero-actions .btn { padding:8px 14px; font-size:12.5px; }
  .hero-carousel-controls { bottom:16px; right:16px; }
  .hero-nav { width:30px; height:30px; font-size:17px; }
  .hero-dot { width:9px; height:9px; }
}
/* Breakpoint: <= 360px */
@media (max-width:360px){
  .hero-slide .hero-content { padding:80px 18px 98px; }
  .hero-title { font-size: clamp(1.35rem,8.2vw,1.7rem); }
  .hero-description { font-size:0.78rem; }
  .hero-actions .btn { padding:8px 12px; font-size:12px; }
  .hero-carousel-controls { bottom:14px; right:14px; }
}
/* Breakpoint: <= 320px */
@media (max-width:320px){
  .hero, .hero-slides, .hero-slide { min-height:56vh; }
  /* Removed horizontal 16px padding for full-bleed hero at very small widths */
  .hero-slide .hero-content { padding:72px 0 92px; }
  .hero-title { font-size: clamp(1.2rem,8.8vw,1.55rem); }
  .hero-description { font-size:0.74rem; line-height:1.28; }
  .hero-actions { gap:8px; }
  .hero-actions .btn { padding:7px 11px; font-size:11.5px; }
  .hero-carousel-controls { bottom:12px; right:12px; }
  .hero-nav { width:28px; height:28px; font-size:16px; }
  .hero-dot { width:8px; height:8px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--netflix-white);
  color: var(--netflix-black);
}

.btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.btn-secondary {
  background-color: rgba(109, 109, 110, 0.7);
  color: var(--netflix-white);
}

.btn-secondary:hover {
  background-color: rgba(109, 109, 110, 0.4);
}

.btn-icon {
  padding: var(--spacing-sm);
  border-radius: 50%;
  background-color: rgba(42, 42, 42, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--netflix-white);
}

/* Main Content */
.main-content {
  /* Adjusted to prevent Top 10 overlaying hero */
  margin-top: 0;
  padding-top: 40px; /* space buffer below hero fold */
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, var(--primary-black) 0%, var(--netflix-black) 60%);
  padding-bottom: var(--spacing-xxl);
}

/* Enhanced Category Sections - Step 7 */
.category {
  margin-bottom: var(--spacing-xxl);
  padding: 0 var(--spacing-xxl);
  position: relative;
}
  /* Person detail modal */
  .person-modal { position:fixed; inset:0; background:rgba(0,0,0,.72); backdrop-filter:blur(6px); z-index:1200; display:flex; align-items:flex-start; justify-content:center; padding:60px 20px 40px; overflow-y:auto; opacity:0; pointer-events:none; transition:.25s opacity; }
  .person-modal.open { opacity:1; pointer-events:auto; }
  .person-dialog { background:#111; border:1px solid #262626; border-radius:18px; max-width:960px; width:100%; display:flex; flex-direction:column; position:relative; overflow:hidden; box-shadow:0 10px 40px -10px rgba(0,0,0,.6); }
  .person-close { position:absolute; top:10px; right:12px; background:#1c1c1c; border:1px solid #333; color:#bbb; width:36px; height:36px; border-radius:50%; cursor:pointer; font-size:22px; line-height:1; display:flex; align-items:center; justify-content:center; }
  .person-close:hover { background:#272727; color:#fff; }
  .person-header { display:flex; gap:24px; padding:32px 32px 18px; }
  .person-photo-wrap { width:180px; min-width:180px; aspect-ratio:2/3; border-radius:12px; overflow:hidden; background:#222; position:relative; }
  .person-photo { width:100%; height:100%; object-fit:cover; display:block; }
  .person-head-meta { flex:1; display:flex; flex-direction:column; gap:10px; }
  .person-name { font-size:1.9rem; margin:0; line-height:1.1; }
  .person-sub { font-size:.8rem; letter-spacing:.5px; text-transform:uppercase; color:#aaa; }
  .person-ext-links { display:flex; flex-wrap:wrap; gap:8px; }
  .person-ext-links a { font-size:.7rem; text-decoration:none; padding:6px 10px; background:#1f1f1f; border:1px solid #2e2e2e; border-radius:20px; letter-spacing:.5px; text-transform:uppercase; color:#ddd; }
  .person-ext-links a:hover { background:#272727; border-color:#3a3a3a; color:#fff; }
  .person-body { padding:0 32px 34px; display:flex; flex-direction:column; gap:34px; }
  .person-bio { font-size:.9rem; line-height:1.5; color:#ccc; }
  .person-knownfor-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:14px; margin-top:14px; }
  .kf-card { position:relative; cursor:pointer; background:#181818; border-radius:10px; overflow:hidden; border:1px solid #252525; transition:.25s border,.25s transform; }
  .kf-card img { width:100%; height:170px; object-fit:cover; display:block; }
  .kf-card:hover { border-color:#e50914; transform:translateY(-3px); }
  .kf-meta { padding:6px 8px 10px; display:flex; flex-direction:column; gap:4px; }
  .kf-title { font-size:.7rem; font-weight:600; line-height:1.2; }
  .kf-year { font-size:.6rem; color:#aaa; letter-spacing:.5px; }
  .person-credits-list { display:flex; flex-direction:column; gap:20px; margin-top:12px; }
  .cr-year h4 { margin:0 0 6px; font-size:.85rem; letter-spacing:.5px; text-transform:uppercase; color:#bbb; }
  .cr-items { display:flex; flex-direction:column; gap:4px; }
  .cr-item { font-size:.78rem; padding:6px 10px; border:1px solid #252525; border-radius:6px; background:#161616; cursor:pointer; display:inline-flex; flex-wrap:wrap; gap:6px; align-items:center; }
  .cr-item:hover { border-color:#e50914; background:#1c1c1c; }
  .cr-title { font-weight:600; }
  .cr-role { font-size:.65rem; letter-spacing:.5px; text-transform:uppercase; color:#888; }
  @media (max-width:860px){
    .person-header { flex-direction:column; padding:26px 24px 12px; }
    .person-body { padding:0 24px 28px; }
    .person-photo-wrap { width:160px; min-width:160px; }
    .person-name { font-size:1.6rem; }
  }
  @media (max-width:520px){
    .person-modal { padding:50px 12px 30px; }
    .person-dialog { border-radius:16px; }
    .person-header { gap:18px; }
    .person-photo-wrap { width:140px; min-width:140px; }
    .person-name { font-size:1.45rem; }
    .person-knownfor-grid { grid-template-columns:repeat(auto-fill,minmax(100px,1fr)); gap:12px; }
    .kf-card img { height:150px; }
  }

.category h2 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--netflix-white);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  position: relative;
}

.category h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--netflix-red);
  border-radius: 1px;
}

/* Section header enhancements */
.section-header { display:flex; align-items:baseline; gap:24px; flex-wrap:wrap; }
.section-header h2 { margin-bottom:4px; }
.section-header .section-sub { font-size:12px; text-transform:uppercase; letter-spacing:2px; color:var(--text-muted); }
.section-actions { margin-left:auto; }
.mini-link { background:none; border:none; color:var(--netflix-light-gray); font-size:12px; cursor:pointer; text-transform:uppercase; letter-spacing:1px; padding:4px 8px; border-radius:4px; transition:var(--transition-fast); }
.mini-link:hover { background:rgba(255,255,255,0.08); color:var(--netflix-white); }

/* Tabs */
.section-tabs { display:flex; gap:8px; flex-wrap:wrap; }
.section-tabs.small { gap:6px; }
.tab-btn { background:var(--surface-alt); border:1px solid #262626; color:var(--netflix-light-gray); padding:6px 14px; font-size:13px; border-radius:999px; cursor:pointer; position:relative; overflow:hidden; transition:var(--transition-fast); }
.tab-btn::before { content:''; position:absolute; inset:0; background:var(--gradient-accent); opacity:0; transition:var(--transition-fast); }
.tab-btn span, .tab-btn { position:relative; z-index:1; }
.tab-btn.active, .tab-btn:hover { color:#fff; border-color:#3a3a3a; }
.tab-btn.active::before { opacity:0.15; }

/* Numbered Top 10 cards */
.number-row .card { counter-increment: top10; }
.number-row { counter-reset: top10; }
.number-row .card { position:relative; }
.number-row .card::after { content:counter(top10); position:absolute; top:4px; left:6px; font-size:64px; font-weight:900; font-family:Impact, var(--font-family); color:rgba(255,255,255,0.06); text-shadow:0 0 0 rgba(0,0,0,0.4); pointer-events:none; z-index:0; }
.number-row .card img { position:relative; z-index:1; }

/* Carousel nav buttons */
.carousel-prev, .carousel-next { opacity:0; transition:opacity .3s ease, background .3s ease; }
.category:hover .carousel-prev, .category:hover .carousel-next { opacity:1; }
.carousel-prev:hover, .carousel-next:hover { background:rgba(0,0,0,0.7)!important; }

/* Seasonal spotlight */
.seasonal { background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)); padding-top:32px; border-top:1px solid rgba(255,255,255,0.06); }

/* Genres carousel */
#genreTabs .tab-btn { font-size:12px; padding:5px 12px; }

/* Footer */
.site-footer { background:#0b0b0b; padding:60px 40px 40px; border-top:1px solid #1f1f1f; margin-top:40px; }
.footer-inner { max-width:1400px; margin:0 auto; display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:40px; }
.footer-logo { font-size:22px; color:var(--netflix-red); margin-bottom:8px; }
.tagline { font-size:13px; color:var(--text-muted); max-width:200px; }
.link-col h4 { font-size:13px; text-transform:uppercase; letter-spacing:1px; color:var(--netflix-light-gray); margin-bottom:12px; }
.link-col ul { list-style:none; display:grid; gap:6px; }
.link-col a { color:var(--text-muted); text-decoration:none; font-size:13px; transition:var(--transition-fast); }
.link-col a:hover { color:var(--netflix-white); }
.meta-col { grid-column:1/-1; border-top:1px solid #1f1f1f; padding-top:24px; font-size:12px; color:var(--text-muted); }

@media (max-width:900px){ .site-footer { padding:48px 24px 32px; } }
@media (max-width:600px){ .footer-inner { grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:28px; } .meta-col { text-align:center; } }

/* Enhanced Content Rows - Step 7 */
.row {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: var(--spacing-md) 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  position: relative;
}

.row[tabindex] { outline:none; }
.row:focus-visible { outline:2px solid var(--netflix-red); outline-offset:4px; }
/* Drag-to-scroll disabled: removed grabbing interaction */
/* .row.dragging rules removed intentionally */
.row { cursor: grab; }

/* Ultra-tall mobile (e.g., 1080x2400) spacing optimizations */
@media (max-width: 1200px) and (min-height: 1900px) {
  .main-content { padding-top: 18px; }
  /* Bring first visible category (Top 10) closer to hero */
  .main-content > .category:first-of-type { margin-top: 0; }
  #top10Section { padding-top: 0; }
  /* Slightly tighten vertical rhythm for all categories */
  .category { margin-bottom: 40px; }
  /* Reduce Top 10 heading gap */
  #top10Section .section-header h2 { margin-bottom: 10px; }
  /* Compact row padding to fit more content above the fold */
  .row { padding: 10px 0; }
}
.row.grabbing { cursor: grabbing; user-select:none; }
body.no-select { user-select:none !important; }

.row::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
  background: transparent;
}

/* Step 8 - Enhanced Card Container Animations */
.card {
  flex: 0 0 200px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, z-index 0s;
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--netflix-gray);
}

.card:hover {
  /* Hover pop removed; subtle lift only */
  transform: translateY(-4px);
  z-index: 5;
  box-shadow: 0 10px 22px -8px rgba(0,0,0,0.75);
}

.content-card {
  flex: 0 0 200px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, z-index 0s;
  position: relative;
  scroll-snap-align: start;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.content-card:hover {
  transform: translateY(-4px);
  z-index: 5;
  box-shadow: 0 10px 22px -8px rgba(0,0,0,0.75);
}

.card a {
  display: block;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  display:block;
  background:#1a1a1a;
}
/* Remove zoom on hover */
.card:hover img { transform:none; box-shadow:none; }

/* Enhanced Card overlay for play button - Step 7 */
/* Remove heavy dual overlay; replaced below with simple sim-card style gradient */
/* (Old ::before removed) */

/* (Old ::after removed) */

/* Enhanced Play Overlay - Step 7 */
.card .play-overlay {
  display:none; /* deprecated */
}

/* New hover overlay */
.card-info-overlay { position:absolute; inset:0; display:flex; align-items:flex-end; background:none; opacity:0; transition:opacity .35s ease; padding:12px; z-index:3; }
.card:hover .card-info-overlay { opacity:1; }
.overlay-meta { width:100%; }
.overlay-title { font-size:14px; line-height:1.2; margin:6px 0 0; font-weight:600; color:#fff; text-shadow:0 2px 6px rgba(0,0,0,.6); max-height:2.4em; overflow:hidden; }
.media-pill { display:inline-block; font-size:10px; letter-spacing:.5px; text-transform:uppercase; background:rgba(255,255,255,.14); color:#fff; padding:3px 8px; border-radius:20px; backdrop-filter:blur(4px); }

.card .play-btn,
.card .info-btn {
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--netflix-black);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.card .play-btn:hover,
.card .info-btn:hover {
  background-color: var(--netflix-white);
  transform: scale(1.15);
  box-shadow: var(--shadow-lg);
}

.card .play-btn {
  background-color: var(--netflix-red);
  color: var(--netflix-white);
}

.card .play-btn:hover {
  background-color: #ff0a1a;
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

/* Enhanced Content Rows (legacy support) - Step 7 */
.content-rows {
  padding: 0 var(--spacing-xxl);
  background: var(--primary-black);
}

.content-row {
  margin-bottom: var(--spacing-xxl);
  position: relative;
}

.row-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--netflix-white);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.row-content {
  position: relative;
  overflow: hidden;
}

/* Enhanced Row Items - Step 7 */
.row-items {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: var(--spacing-md) 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}

.row-items::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
  background: transparent;
}

/* Enhanced Content Cards - Step 8 */
.content-card {
  flex: 0 0 200px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, z-index 0s;
  position: relative;
  scroll-snap-align: start;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.content-card:hover {
  transform: translateY(-6px);
  z-index: 5;
  box-shadow: 0 14px 32px -10px rgba(0,0,0,.9);
}

/* Enhanced hover effects for edge cards */
.content-card:first-child:hover { transform-origin:left center; transform:translateY(-6px) translateX(0); }

.content-card:nth-last-child(-n+2):hover { transform-origin:right center; transform:translateY(-6px) translateX(0); }

.card-image {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--netflix-gray) 0%, var(--netflix-hover-gray) 100%);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s, box-shadow 0.3s;
  border-radius: var(--border-radius-lg);
}

.content-card:hover .card-image img { transform:none; box-shadow:none; }

/* Enhanced Card Overlay - Step 7 */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    transparent 0%, 
    rgba(0,0,0,0.3) 40%,
    rgba(0,0,0,0.7) 70%, 
    rgba(0,0,0,0.9) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  opacity: 0;
  transition: all var(--transition-normal);
  border-radius: var(--border-radius-lg);
}

.content-card:hover .card-overlay {
  opacity: 1;
}

/* Step 8 - Enhanced Button Animations */
.card .play-btn,
.card .info-btn,
.card-play-btn,
.card-info-btn {
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--netflix-black);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.card .play-btn:hover,
.card .info-btn:hover,
.card-play-btn:hover,
.card-info-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 10px 20px rgba(0,0,0,0.6);
  background-color: var(--netflix-white);
}

.card .play-btn,
.card-play-btn {
  background-color: var(--netflix-red);
  color: var(--netflix-white);
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.card .play-btn:hover,
.card-play-btn:hover {
  background-color: #ff0a1a;
  transform: scale(1.15);
  box-shadow: 0 10px 20px rgba(229, 9, 20, 0.6);
}

.card-info {
  padding: var(--spacing-sm) 0;
}

.card-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--netflix-white);
}

.card-year {
  font-size: var(--font-size-xs);
  color: var(--netflix-light-gray);
}

/* Player Modal */
.player-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--spacing-lg);
}

.player-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  background-color: var(--netflix-dark-gray);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.player-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: none;
  border: none;
  color: var(--netflix-white);
  cursor: pointer;
  z-index: 10;
  padding: var(--spacing-sm);
  border-radius: 50%;
  transition: background-color var(--transition-fast);
}

.player-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.player-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--netflix-gray);
}

.player-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.player-meta {
  font-size: var(--font-size-sm);
  color: var(--netflix-light-gray);
}

/* ================= TV PAGE (Unified Styling) ================= */
/* Hero for TV show details */
.show-hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: flex-end;
  padding: 140px var(--spacing-xxl) 120px;
  background: #000;
  overflow: hidden;
}
.show-hero .hero-bg { position:absolute; inset:0; background-size:cover; background-position:center; filter:brightness(.55) contrast(1.05); }
.show-hero .hero-overlay { position:absolute; inset:0; pointer-events:none; background:
  linear-gradient(135deg,
    rgba(0,0,0,0.92) 0%,      /* bottom-left darkest */
    rgba(0,0,0,0.75) 30%,
    rgba(0,0,0,0.45) 55%,
    rgba(0,0,0,0.18) 75%,
    rgba(0,0,0,0.05) 88%,
    rgba(0,0,0,0) 100%)
  ,radial-gradient(circle at 18% 78%, rgba(0,0,0,0.55), rgba(0,0,0,0) 60%);
mix-blend-mode:normal; }
.hero-content-wrapper { position:relative; z-index:2; max-width:720px; }
.show-title { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight:700; line-height:1.05; margin:0 0 18px; letter-spacing:-1px; text-shadow:0 4px 16px rgba(0,0,0,.7); }
.show-inline-meta { display:flex; flex-wrap:wrap; gap:14px; margin-bottom:14px; font-size:14px; color:var(--netflix-light-gray); }
.show-inline-meta span { display:inline-flex; align-items:center; gap:4px; }
.genre-pills { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.genre-pills .pill { background:rgba(255,255,255,.12); padding:6px 12px; font-size:12px; border-radius:999px; letter-spacing:.5px; color:#fff; backdrop-filter:blur(6px); position:relative; overflow:hidden; }
.genre-pills .pill::after { content:''; position:absolute; inset:0; background:linear-gradient(135deg, rgba(229,9,20,0.25), rgba(229,9,20,0)); opacity:0; transition:var(--transition-fast); }
.genre-pills .pill:hover::after { opacity:1; }
.show-overview { font-size: clamp(14px, 1.3vw, 18px); line-height:1.5; color:var(--netflix-light-gray); max-width:680px; margin:0 0 24px; }
.hero-actions .circle-btn { background:rgba(255,255,255,.15); border:none; color:#fff; padding:10px 18px; border-radius:999px; cursor:pointer; font-size:12px; letter-spacing:.5px; text-transform:uppercase; display:inline-flex; align-items:center; gap:6px; transition:var(--transition-fast); }
.hero-actions .circle-btn:hover { background:rgba(255,255,255,.25); transform:translateY(-2px); }

/* Episodes Section */
.episodes-section { padding:40px var(--spacing-xxl) 0; }
.episodes-section .section-head { display:flex; flex-wrap:wrap; align-items:center; gap:18px; margin-bottom:24px; }
.episodes-section h2 { font-size:26px; letter-spacing:.5px; margin:0; }
.ep-tools { display:flex; flex-wrap:wrap; gap:14px; align-items:center; }
.season-select { background:#1f1f1f; color:#fff; border:1px solid #333; padding:8px 14px; border-radius:6px; font-size:14px; cursor:pointer; }
.season-select:focus { outline:2px solid var(--netflix-red); }
.episode-search-wrapper { display:flex; align-items:center; gap:8px; background:#1f1f1f; padding:6px 12px; border-radius:6px; border:1px solid #2a2a2a; }
.episode-search-wrapper input { background:transparent; border:none; outline:none; color:#fff; font-size:14px; width:180px; }
.episode-search-wrapper svg { opacity:.7; }
.episodes-scroll { display:grid; gap:18px; }
.episode-row { display:grid; grid-template-columns:180px 1fr; gap:22px; background:#161616; padding:14px; border-radius:10px; border:1px solid #1f1f1f; position:relative; overflow:hidden; transition:var(--transition-normal); cursor:pointer; }
.episode-row::before { content:''; position:absolute; inset:0; background:linear-gradient(120deg, rgba(229,9,20,0.08), rgba(229,9,20,0)); opacity:0; transition:var(--transition-fast); }
.episode-row:hover { transform:translateY(-3px); box-shadow:0 6px 18px -6px rgba(0,0,0,.7); }
.episode-row:hover::before { opacity:1; }
.episode-row.active { border-color:var(--netflix-red); box-shadow:0 0 0 1px var(--netflix-red); }
.thumb { border-radius:6px; overflow:hidden; aspect-ratio:16/9; background:#222; position:relative; }
.thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.ep-info { display:flex; flex-direction:column; gap:8px; }
.ep-head { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; }
.ep-num { background:var(--netflix-red); font-size:11px; font-weight:700; padding:4px 8px; border-radius:999px; letter-spacing:.5px; }
.ep-title { font-size:16px; font-weight:600; line-height:1.3; }
.runtime { font-size:12px; color:var(--text-muted); }
.ep-overview { font-size:13px; color:var(--netflix-light-gray); line-height:1.45; }
.ep-meta { font-size:11px; display:flex; gap:12px; flex-wrap:wrap; color:var(--text-muted); }

/* Cast Grid */
.cast-wrapper { padding:60px var(--spacing-xxl) 0; }
.cast-wrapper h2 { font-size:26px; margin:0 0 28px; position:relative; }
.cast-wrapper h2::after { content:''; position:absolute; bottom:-6px; left:0; width:60px; height:2px; background:var(--netflix-red); }
.actor-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:20px; }
.actor-card { background:#161616; border:1px solid #1f1f1f; border-radius:10px; overflow:hidden; cursor:pointer; transition:var(--transition-fast); position:relative; }
.actor-card:hover { transform:translateY(-4px); box-shadow:0 10px 24px -8px rgba(0,0,0,.9); }
.actor-img { aspect-ratio:2/3; background:#222; overflow:hidden; }
.actor-img img { width:100%; height:100%; object-fit:cover; display:block; }
.actor-meta { padding:10px 12px 14px; }
.actor-meta h4 { font-size:14px; font-weight:600; margin:0 0 4px; line-height:1.2; }
.actor-meta p { font-size:12px; color:var(--text-muted); margin:0; }

/* Similar / Browse Grid */
.similar-wrapper { padding:60px var(--spacing-xxl) 40px; }
.similar-wrapper h2 { font-size:26px; margin:0 0 28px; position:relative; }
.similar-wrapper h2::after { content:''; position:absolute; bottom:-6px; left:0; width:60px; height:2px; background:var(--netflix-red); }
.similar-grid.modern, #browseGrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:18px; }
.sim-card { position:relative; border-radius:10px; overflow:hidden; background:#1a1a1a; cursor:pointer; border:1px solid #1f1f1f; transition:var(--transition-fast); }
.sim-card img { width:100%; height:100%; object-fit:cover; aspect-ratio:2/3; display:block; }
.sim-card::after { content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.85) 100%); opacity:0; transition:var(--transition-normal); }
.sim-card:hover { transform:translateY(-6px); box-shadow:0 14px 32px -10px rgba(0,0,0,.9); }
.sim-card:hover::after { opacity:1; }
.sim-overlay { position:absolute; left:0; right:0; bottom:0; padding:100% 10px 14px; z-index:2; }
.sim-overlay h5 { font-size:13px; line-height:1.25; margin:0; font-weight:600; color:#fff; max-height:2.5em; overflow:hidden; }
.sim-card.active { outline:2px solid var(--netflix-red); outline-offset:2px; }

/* Browse Section (Popular shows when no id) */
.browse-section { padding:40px var(--spacing-xxl) 0; }
.browse-section h2 { font-size:26px; margin:0 0 28px; position:relative; }
.browse-section h2::after { content:''; position:absolute; bottom:-6px; left:0; width:60px; height:2px; background:var(--netflix-red); }

/* Responsive adjustments */
@media (max-width:1200px){ .show-hero{ padding:120px 80px 100px; } }
@media (max-width:900px){ 
  .show-hero{ padding:120px 48px 90px; min-height:70vh; }
  .episodes-section, .cast-wrapper, .similar-wrapper, .browse-section { padding-left:48px; padding-right:48px; }
  .episode-row{ grid-template-columns:140px 1fr; }
}
@media (max-width:700px){ 
  .show-hero{ padding:110px 32px 80px; }
  .episodes-section, .cast-wrapper, .similar-wrapper, .browse-section { padding-left:32px; padding-right:32px; }
  .show-title{ font-size:clamp(2.1rem,7vw,3rem); }
  .episode-row{ grid-template-columns:120px 1fr; }
}
@media (max-width:520px){
  .episodes-section, .cast-wrapper, .similar-wrapper, .browse-section { padding-left:20px; padding-right:20px; }
  .episode-row{ grid-template-columns:100px 1fr; }
  .ep-overview{ display:none; }
}

.player-content {
  position: relative;
}

.resume-prompt {
  padding: var(--spacing-xl);
  text-align: center;
  background-color: var(--netflix-gray);
}

.resume-text {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-lg);
}

.resume-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
}

.iframe-container {
  aspect-ratio: 16/9;
  background-color: var(--netflix-black);
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Movie Page Styles */
.movie-content {
  padding: var(--spacing-xxl);
  max-width: 1200px;
  margin: 0 auto;
}

.container {
  width: 100%;
}

#movie-info {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg);
  background-color: var(--netflix-dark-gray);
  border-radius: var(--border-radius-lg);
}

#movie-info h1 {
  font-size: var(--font-size-hero);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--netflix-white);
}

#movie-info p {
  font-size: var(--font-size-lg);
  line-height: 1.6;
  color: var(--netflix-light-gray);
  margin-bottom: var(--spacing-md);
}

.movie-meta {
  display: flex;
  gap: var(--spacing-lg);
  font-size: var(--font-size-sm);
  color: var(--netflix-light-gray);
}

.movie-meta span {
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--netflix-gray);
  border-radius: var(--border-radius);
}

#player {
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--spacing-xxl);
  background-color: var(--netflix-black);
}

/* Cast Section */
.cast-section,
.similar-section,
.reviews-section {
  margin-bottom: var(--spacing-xxl);
}

.cast-section h2,
.similar-section h2,
.reviews-section h2 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--netflix-white);
}

.cast-grid,
.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-lg);
}

.cast-member,
.similar-item {
  text-align: center;
  transition: transform var(--transition-normal);
}

.cast-member:hover,
.similar-item:hover {
  transform: scale(1.05);
}

.cast-member img,
.similar-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}

.cast-member:hover img,
.similar-item:hover img {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.6);
}

.cast-member h3,
.similar-item h3 {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--netflix-white);
  margin-bottom: var(--spacing-xs);
}

.cast-member p {
  font-size: var(--font-size-sm);
  color: var(--netflix-light-gray);
}

.similar-item a {
  text-decoration: none;
  color: inherit;
}

/* Reviews Section */
.reviews-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.review {
  padding: var(--spacing-lg);
  background-color: var(--netflix-dark-gray);
  border-radius: var(--border-radius-lg);
  border-left: 4px solid var(--netflix-red);
}

.review h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--netflix-white);
  margin-bottom: var(--spacing-sm);
}

.review p {
  font-size: var(--font-size-md);
  line-height: 1.6;
  color: var(--netflix-light-gray);
  margin-bottom: var(--spacing-sm);
}

.review-rating {
  font-size: var(--font-size-sm);
  color: var(--netflix-red);
  font-weight: 600;
}

/* Responsive Design for Movie Page */
@media (max-width: 768px) {
  .movie-content {
    padding: var(--spacing-lg);
  }

  #movie-info h1 {
    font-size: var(--font-size-xxl);
  }

  .movie-meta {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .cast-grid,
  .similar-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
  }

  #player {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .movie-content {
    padding: var(--spacing-md);
  }

  .cast-grid,
  .similar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #player {
    height: 250px;
  }
}

/* Loading Spinner */
.loading-spinner {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Ensure [hidden] actually hides even if display is set above */
.loading-spinner[hidden] {
  display: none !important;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid var(--netflix-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .navbar {
    padding: 0 var(--spacing-lg);
  }
  
  .hero {
    padding-left: var(--spacing-lg);
  }
  
  .content-rows {
    padding: 0 var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--primary-black);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: var(--spacing-xl);
    gap: var(--spacing-lg);
    transition: left 0.3s ease;
    z-index: 999;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li {
    width: 100%;
  }
  
  .nav-link {
    display: block;
    width: 100%;
    padding: var(--spacing-md) 0;
    font-size: var(--font-size-lg);
    border-bottom: 1px solid var(--netflix-gray);
  }
  
  .hero-title {
    font-size: var(--font-size-xxl);
  }
  
  .hero-description {
    font-size: var(--font-size-md);
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .content-card {
    flex: 0 0 120px;
  }
  
  .search-container.active .search-input {
    width: 200px;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0 var(--spacing-md);
  }
  
  .hero {
    padding-left: var(--spacing-md);
  }
  
  .content-rows {
    padding: 0 var(--spacing-md);
  }
  
  .hero-content {
    max-width: 300px;
  }
  
  .hero-title {
    font-size: var(--font-size-xl);
  }
  
  .content-card {
    flex: 0 0 100px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero {
    background-attachment: scroll;
  }
}

/* Focus Styles */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--netflix-red);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .header,
  .player-modal,
  .loading-spinner {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* ------------------------------ */
/* Mobile Responsive Tweaks       */
/* Targeted for 425px / 375px / 320px */
/* ------------------------------ */

@media (max-width: 425px) {
  /* Header / Navbar */
  .navbar { padding: 0 var(--spacing-md); }
  .nav-brand .logo { font-size: 18px; letter-spacing: 0; }
  /* Reworked mobile nav: show ALL items in vertical list with scroll if overflow */
  .nav-menu { 
    gap: var(--spacing-sm); 
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto; 
    padding: var(--spacing-xl) var(--spacing-md); 
  }
  .nav-menu::-webkit-scrollbar { width: 6px; }
  .nav-menu::-webkit-scrollbar-track { background: #0d0d0d; }
  .nav-menu::-webkit-scrollbar-thumb { background: #262626; border-radius: 3px; }
  .nav-menu li { display: block; width:100%; }
  .nav-link { font-size: var(--font-size-md); padding: var(--spacing-sm) 0; border-bottom:1px solid #1f1f1f; margin:0; }
  .nav-menu li:last-child .nav-link { border-bottom:none; }
  .notifications { display: none; }
  .profile-dropdown .avatar { width: 28px; height: 28px; font-size: 12px; }
  .search-container { display: flex; align-items: center; gap: var(--spacing-sm); }
  .search-input { width: 0; opacity: 0; transition: width .25s ease, opacity .2s ease; }
  .search-container.active .search-input { width: 160px; opacity: 1; }

  /* Main spacing */
  .main-content { padding-top: calc(var(--header-height) + 8px); }
  .category { margin: 20px 0; padding: 0 var(--spacing-md); }
  .category h2, .row-title { margin-bottom: var(--spacing-sm); font-size: 18px; text-shadow: none; }

  /* Hero */
  .hero { min-height: 46vh; }
  .hero-title { font-size: 22px; line-height: 1.2; }
  .hero-description { font-size: 14px; max-height: 3.2em; overflow: hidden; }
  .hero-actions .btn { padding: 8px 12px; font-size: 14px; gap: 6px; }

  /* Rows / Cards */
  .row { gap: var(--spacing-sm); padding: 10px 0; }
  .card { flex: 0 0 140px; border-radius: 6px; }
  .card img { height: 210px; border-radius: 6px; }
  .content-card { flex: 0 0 140px; }
  .card-image { border-radius: 6px; }
  .card-image img { border-radius: 6px; }
  .play-overlay { bottom: 8px; left: 8px; right: 8px; }
  .card .play-btn, .card .info-btn { width: 34px; height: 34px; }

  /* Continue Watching */
  .continue-watching-section { margin-bottom: 16px; }
  .continue-watching-card .continue-progress-bar { height: 3px; }
  .continue-info h3 { font-size: 12px; }
  .continue-info p { font-size: 11px; }

  /* Search page */
  .search-main { padding-top: calc(var(--header-height) + 8px); }
  .results-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .result-title { font-size: 14px; }
  .result-overview { font-size: 13px; }
  .search-filters { flex-wrap: wrap; }
  .filter-btn { padding: 6px 10px; font-size: 13px; }

  /* Cast / Similar grids */
  .cast-grid, .similar-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  .cast-member img, .similar-item img { aspect-ratio: 2/3; }

  /* TV Episodes */
  .episodes-grid { grid-template-columns: 1fr; gap: 12px; }
  .episode-info h3 { font-size: 14px; }
  .episode-overview { font-size: 13px; }

  /* Player Modal */
  .player-container { max-width: 100vw; border-radius: 8px; }
  .player-iframe { width: 100%; height: 50vh; }
  .player-title { font-size: 18px; }
}

@media (max-width: 375px) {
  .nav-brand .logo { font-size: 17px; }
  /* Slightly reduce nav link size for very small width */
  .nav-link { font-size: 14px; }
  .search-container.active .search-input { width: 140px; }
  .hero-title { font-size: 20px; }
  .hero-description { font-size: 13px; }
  .card { flex: 0 0 130px; }
  .card img { height: 195px; }
  .content-card { flex: 0 0 130px; }
  .results-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .player-iframe { height: 46vh; }
}

@media (max-width: 320px) {
  .navbar { padding: 0 10px; }
  .nav-brand .logo { font-size: 16px; }
  /* Compress nav links further for 320px */
  .nav-link { font-size: 13px; padding: 6px 0; }
  .search-container.active .search-input { width: 120px; }
  .hero { min-height: 42vh; }
  .hero-title { font-size: 18px; }
  .hero-description { font-size: 12px; }
  .hero-actions .btn { padding: 7px 10px; font-size: 13px; }
  .category { margin: 16px 0; }
  .category h2, .row-title { font-size: 16px; }
  .row { gap: 6px; }
  .card { flex: 0 0 120px; }
  .card img { height: 180px; }
  .content-card { flex: 0 0 120px; }
  .results-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .result-title { font-size: 13px; }
  .result-overview { font-size: 12px; }
  .player-iframe { height: 42vh; }
}

/* TV Show Page Specific Styles */
.tv-meta {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.tv-meta span {
    color: #aaa;
    font-size: 14px;
}

.season-selector {
    margin: 20px 0;
}

.season-selector label {
    color: #fff;
    font-weight: bold;
    margin-right: 10px;
}

.season-selector select {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.episode-card {
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.episode-card.active {
    border: 2px solid var(--netflix-red);
}

.episode-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.episode-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s, box-shadow 0.3s;
}

.episode-card:hover .episode-image img {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
}

.episode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.episode-card:hover .episode-overlay {
    opacity: 1;
}

.episode-play-btn {
    background: var(--netflix-red);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.episode-play-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.6);
}

.episode-info {
    padding: 15px;
}

.episode-info h3 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.2;
}

.episode-overview {
    color: #aaa;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.episode-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.content-section {
    margin: 40px 0;
}

.cast-grid, .similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cast-member, .similar-item {
    text-align: center;
}

.cast-member img, .similar-item img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.cast-member h3, .similar-item h3 {
    color: #fff;
    font-size: 14px;
    margin: 5px 0;
}

.cast-member p {
    color: #aaa;
    font-size: 12px;
}

.similar-item a {
    text-decoration: none;
    color: inherit;
}

.review {
    background: #222;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.review h4 {
    color: #fff;
    margin: 0 0 10px 0;
}

.review p {
    color: #aaa;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.review-rating {
    color: var(--netflix-red);
    font-weight: bold;
    font-size: 14px;
}

/* Movie Page Specific Styles */
.movie-meta {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.movie-meta span {
    color: #aaa;
    font-size: 14px;
}

/* Additional Responsive Design for TV/Movie Pages */
@media (max-width: 768px) {
    .episodes-grid {
        grid-template-columns: 1fr;
    }
    
    .cast-grid, .similar-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .tv-meta, .movie-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* Step 7 Enhancements - Netflix Dark UI */

/* Enhanced Loading States */
.loading-card {
    background: linear-gradient(90deg, var(--netflix-gray) 0%, var(--netflix-hover-gray) 50%, var(--netflix-gray) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-lg);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Enhanced Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

.row,
.row-items {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    will-change: transform;
}

/* Enhanced Focus States for Accessibility */
.card:focus-visible,
.content-card:focus-visible {
    outline: 3px solid var(--netflix-red);
    outline-offset: 2px;
    transform: scale(1.05);
}

/* Performance Optimizations */
.card,
.content-card,
.card img,
.card-image img {
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Enhanced Dark Theme Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--primary-black) 0%, #0a0a0a 100%);
    z-index: -2;
    pointer-events: none;
}

/* ===================================================== */
/* Mobile Hero Compact Overrides (reduce height from bottom) */
/* Requirement: On devices ≤768px wide, shorten hero so Top 10 is visible */
/* We keep top spacing (title position) and trim bottom padding only.       */
/* Placed late in cascade to override earlier breakpoint rules.            */
/* ===================================================== */
@media (max-width: 768px){
  .hero, .hero-slides, .hero-slide { min-height:60vh; height:60vh; }
  .hero-slide .hero-content { padding:110px 44px 80px; }
  .main-content { padding-top:0; }
}
@media (max-width: 600px){
  .hero, .hero-slides, .hero-slide { min-height:56vh; height:56vh; }
  .hero-slide .hero-content { padding:100px 32px 72px; }
}
@media (max-width: 425px){
  .hero, .hero-slides, .hero-slide { min-height:52vh; height:52vh; }
  .hero-slide .hero-content { padding:92px 24px 66px; }
}
@media (max-width: 375px){
  .hero, .hero-slides, .hero-slide { min-height:50vh; height:50vh; }
  .hero-slide .hero-content { padding:86px 20px 60px; }
}
@media (max-width: 320px){
  .hero, .hero-slides, .hero-slide { min-height:48vh; height:48vh; }
  /* Adjusted padding: keep hero title position, add slight horizontal space, trim bottom further */
  .hero-slide .hero-content { padding:60px 12px 48px; }
}

/* ===================================================== */
/* Mobile Bottom Navigation (replaces hamburger <768px) */
/* ===================================================== */
.mobile-bottom-nav { position:fixed; left:0; right:0; bottom:0; height:62px; background:rgba(0,0,0,0.9); backdrop-filter:blur(14px); border-top:1px solid rgba(255,255,255,0.08); display:none; align-items:center; justify-content:space-around; z-index:1200; padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.mobile-bottom-nav .mbn-item { background:none; border:none; color:var(--netflix-light-gray); font:inherit; display:flex; flex-direction:column; align-items:center; gap:4px; font-size:11px; letter-spacing:.3px; cursor:pointer; padding:6px 14px 4px; border-radius:10px; position:relative; transition:background var(--transition-fast), color var(--transition-fast), transform .25s; }
.mobile-bottom-nav .mbn-item svg { width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.6; }
.mobile-bottom-nav .mbn-item.active, .mobile-bottom-nav .mbn-item:focus-visible { color:#fff; background:rgba(255,255,255,0.1); }
.mobile-bottom-nav .mbn-item:active { transform:translateY(2px); }
body.menu-open { overflow:hidden; }

.mobile-menu-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.75); backdrop-filter:blur(18px); z-index:1199; display:none; align-items:flex-end; justify-content:center; padding:0 0 calc(62px + env(safe-area-inset-bottom)) 0; }
.mobile-menu-overlay.active { display:flex; animation:fadeIn .35s ease; }
.mobile-menu-panel { width:100%; max-width:620px; background:linear-gradient(180deg,#161616,#0d0d0d); border-top:1px solid #262626; padding:28px 24px 42px; box-shadow:0 -8px 32px -4px rgba(0,0,0,.6); animation:slideUp .4s cubic-bezier(.25,.75,.25,1); }
.mobile-menu-grid { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:18px 14px; }
.mobile-menu-grid a { text-decoration:none; background:#1e1e1e; border:1px solid #272727; padding:14px 12px; border-radius:12px; display:flex; flex-direction:column; gap:10px; color:#ccc; font-size:13px; position:relative; overflow:hidden; transition:background .3s, border-color .3s, color .3s, transform .35s; }
.mobile-menu-grid a svg { width:26px; height:26px; stroke:currentColor; stroke-width:1.4; }
.mobile-menu-grid a:before { content:''; position:absolute; inset:0; background:linear-gradient(135deg,rgba(229,9,20,0.15),rgba(229,9,20,0)); opacity:0; transition:opacity .35s; }
.mobile-menu-grid a:hover { background:#242424; color:#fff; border-color:#333; transform:translateY(-4px); }
.mobile-menu-grid a:hover:before { opacity:1; }
.mobile-menu-grid a.active { color:#fff; border-color:var(--netflix-red); box-shadow:0 4px 18px -6px rgba(229,9,20,.5); }
.mobile-menu-close { position:absolute; top:10px; right:16px; background:none; border:none; color:#bbb; cursor:pointer; padding:8px; border-radius:50%; transition:background .25s, color .25s; }
.mobile-menu-close:hover { color:#fff; background:rgba(255,255,255,.08); }

@keyframes slideUp { from { transform:translateY(40px); opacity:0; } to { transform:translateY(0); opacity:1; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* Hide default hamburger + adapt header when bottom nav present */
@media (max-width: 768px){
  .nav-toggle { display:none !important; }
  .mobile-bottom-nav { display:flex; }
  /* Keep header content accessible; nav-menu stays off-canvas */
  .nav-menu { left:-100% !important; }
}

/* Removed previous pulse animation to match static lift style of TV sim-card */

/* Netflix Red Glow Effects */
.card .play-btn:hover,
.card-play-btn:hover {
    box-shadow: 
        0 0 20px rgba(229, 9, 20, 0.4),
        0 6px 20px rgba(229, 9, 20, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Enhanced Typography */
.row-title,
.category h2 {
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--netflix-white) 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Step 8 Animation Summary:
 * - All images use consistent 0.3s transitions for transform and box-shadow
 * - Hover effects scale images to 1.1x with 0 10px 20px rgba(0,0,0,0.6) shadow
 * - Buttons and interactive elements have smooth 0.3s transitions
 * - Card containers use 0.3s transitions for smooth hover animations
 * - Episode cards, cast members, and similar items all follow same animation pattern
 * - Play buttons have enhanced hover effects with Netflix red glow
 */

/* Step 9 - Continue Watching Styles */
.continue-watching-section {
    margin-bottom: var(--spacing-xl);
}

.continue-watching-card {
    position: relative;
}

.continue-poster-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
}

.continue-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 5;
}

.continue-progress {
    height: 100%;
    background: var(--netflix-red);
    transition: width 0.3s ease;
}

.continue-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.continue-watching-card:hover .continue-overlay {
    opacity: 1;
}

.continue-play-btn,
.continue-remove-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--netflix-black);
}

.continue-play-btn {
    background: var(--netflix-red);
    color: var(--netflix-white);
}

.continue-play-btn:hover {
    background: #ff0a1a;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.continue-remove-btn {
    width: 32px;
    height: 32px;
}

.continue-remove-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.continue-info {
    padding: var(--spacing-sm) 0;
}

.continue-info h3 {
    font-size: var(--font-size-sm);
    color: var(--netflix-white);
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
}

.continue-info p {
    font-size: var(--font-size-xs);
    color: var(--netflix-light-gray);
}

/* Search Results Styles - Step 9 */
.search-main {
    padding-top: calc(var(--header-height) + var(--spacing-lg));
    min-height: 100vh;
    background: var(--primary-black);
}

@media (max-width: 768px) {
  .search-main { padding-top: 0 !important; }
}

.search-input {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--netflix-gray);
  border-radius: var(--border-radius);
  color: var(--netflix-white);
  font-size: var(--font-size-sm);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: width var(--transition-normal), opacity var(--transition-fast), visibility 0s linear var(--transition-fast);
}
.search-container.active .search-input {
  width: 250px;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: width var(--transition-normal), opacity var(--transition-fast);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--netflix-white);
    color: var(--netflix-black);
    border-color: var(--netflix-white);
}

.search-empty,
.search-loading,
.search-no-results {
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--netflix-light-gray);
}

.empty-icon {
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.search-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--netflix-gray);
    border-top: 4px solid var(--netflix-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-lg);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:var(--spacing-lg);
    margin-top:var(--spacing-lg);
}
/* Force 3 columns for mobile breakpoints (320,375,425,768) */
@media (max-width: 768px){
  .results-grid { grid-template-columns:repeat(3,1fr); gap:10px; }
}
@media (max-width: 425px){
  .results-grid { grid-template-columns:repeat(3,1fr); gap:9px; }
}
@media (max-width: 375px){
  .results-grid { grid-template-columns:repeat(3,1fr); gap:8px; }
}
@media (max-width: 340px){
  .results-grid { grid-template-columns:repeat(3,1fr); gap:7px; }
}

.search-result-card {
    background: var(--netflix-gray);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.result-image {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-result-card:hover .result-image img {
    transform: scale(1.05);
}

.result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-result-card:hover .result-overlay {
    opacity: 1;
}

.result-play-btn {
    background: var(--netflix-red);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.result-play-btn:hover {
    background: #ff0a1a;
    transform: scale(1.1);
}

.result-info {
    position:absolute;
    inset:auto 0 0 0;
    padding:8px 8px 10px;
    background:linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.55) 45%, rgba(0,0,0,0) 85%);
    transform:translateY(0);
    display:flex;
    flex-direction:column;
    gap:4px;
}
.search-result-card { position:relative; }
.result-image { aspect-ratio:2/3; }
.result-title { font-size:.7rem; margin:0; }
.result-meta { margin:0; font-size:.55rem; gap:6px; }
.result-overview { display:none; }
@media (min-width: 769px){
  .result-title { font-size:.8rem; }
  .result-meta { font-size:.6rem; }
}
@media (hover:hover){
  .search-result-card:hover .result-info { background:linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.55) 50%, rgba(0,0,0,0) 90%); }
}

.result-title {
    color: var(--netflix-white);
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
}

.result-meta {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-xs);
    color: var(--netflix-light-gray);
}

.result-overview {
    color: var(--netflix-light-gray);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.trending-section {
    margin-top: var(--spacing-xxl);
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.trending-tag {
    background: var(--netflix-gray);
    border: none;
    color: var(--netflix-white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.trending-tag:hover {
    background: var(--netflix-light-gray);
    color: var(--netflix-black);
    transform: translateY(-2px);
}

/* ==========================================================
  OVERRIDES (Requested): Remove heavy gradient overlay from
  homepage/cards and align card appearance with TV page cards
  without the dual gradient + red radial effects.
  ========================================================== */
/* Re-aligned main .card styling to mirror TV page .sim-card */
.card { position:relative; background:#1a1a1a; border:1px solid #1f1f1f; box-shadow:none; }
.card::after { content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.85) 100%); opacity:0; transition:var(--transition-normal); }
.card:hover { transform:translateY(-6px); box-shadow:0 14px 32px -10px rgba(0,0,0,.9); }
.card:hover::after { opacity:1; }
.card:hover .play-btn { box-shadow:0 6px 16px rgba(0,0,0,.6); }
.card-info-overlay { background:none !important; }

/* Movies Listing Styles */
.movies-header {
  background: linear-gradient(135deg, var(--netflix-dark-gray) 0%, var(--netflix-black) 100%);
  padding: var(--spacing-xxl) 0;
  margin-top: var(--header-height);
}

.movies-header h1 {
  font-size: var(--font-size-hero);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--netflix-white);
}

.movies-header p {
  font-size: var(--font-size-lg);
  color: var(--netflix-light-gray);
  margin-bottom: var(--spacing-xl);
}

.movies-filters {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: center;
}

.section-head .movies-filters {
  margin-left: auto;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.filter-btn {
  background: transparent;
  border: 2px solid var(--netflix-gray);
  color: var(--netflix-light-gray);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--netflix-white);
  color: var(--netflix-white);
}

.filter-btn.active {
  background: var(--netflix-red);
  border-color: var(--netflix-red);
  color: var(--netflix-white);
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  padding: var(--spacing-xl) 0;
}

.movies-grid .sim-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.movies-grid .sim-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: var(--shadow-hover);
}

.movies-grid .sim-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.movies-grid .sim-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  padding: var(--spacing-lg);
  color: var(--netflix-white);
}

.movies-grid .sim-overlay h5 {
  font-size: var(--font-size-md);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  line-height: 1.3;
}

.movie-year {
  font-size: var(--font-size-sm);
  color: var(--netflix-light-gray);
  margin-bottom: var(--spacing-xs);
}

.movie-rating {
  font-size: var(--font-size-sm);
  color: #ffd700;
  font-weight: 500;
}

.loading {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--netflix-light-gray);
  font-size: var(--font-size-lg);
}

/* Reviews section styling to match TV page */
.reviews-wrapper {
  padding: var(--spacing-xl) var(--spacing-lg);
  background: var(--netflix-dark-gray);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-xl);
}

.reviews-wrapper h2 {
  color: var(--netflix-white);
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-lg);
}

.review-card {
  background: var(--netflix-gray);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.review-header h4 {
  color: var(--netflix-white);
  font-size: var(--font-size-md);
  font-weight: 600;
  margin: 0;
}

.review-rating {
  color: #ffd700;
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.review-content {
  color: var(--netflix-light-gray);
  line-height: 1.6;
  margin: 0;
}

.empty {
  text-align: center;
  color: var(--netflix-light-gray);
  padding: var(--spacing-xl);
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-md);
  }
  
  .movies-header h1 {
    font-size: var(--font-size-xxl);
  }
  
  .filter-btn {
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs) var(--spacing-md);
  }
  
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .section-head .movies-filters {
    margin-left: 0;
  }
  
  .review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }
}

/* Ensure footer isn't obscured by mobile bottom nav (height ~62px) */
@media (max-width: 768px){
  .site-footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
}

/* ===================================================== */
/* Targeted Device Width Refinements                     */
/* 932px, 915px, 896px, 844px, 740px, 667px              */
/* Goal: hero fully visible sooner (Top 10 in view),     */
/* reduce typography, buttons, controls, spacing & top   */
/* padding (minimize large vertical offset).             */
/* Placed at file end to override earlier hero rules.    */
/* ===================================================== */

/* 932px down (above our existing 900 breakpoint window) */
@media (max-width: 932px) and (min-width: 901px){
  .hero, .hero-slides, .hero-slide { min-height:76vh; }
  .hero-slide .hero-content { padding: calc(var(--header-height) + 12px) 64px 90px; }
  .hero-title { font-size: clamp(2.15rem,4vw,2.85rem); margin-bottom:14px; }
  .hero-description { font-size: clamp(.9rem,1.25vw,1.05rem); margin-bottom:30px; }
  .hero-actions .btn { padding:11px 22px; font-size:14px; }
  .hero-carousel-controls { bottom:26px; right:30px; }
  .hero-nav { width:40px; height:40px; font-size:22px; }
  .hero-dot { width:12px; height:12px; }
}

/* 915px & 896px (narrow landscape tablets) */
@media (max-width: 915px) and (min-width: 845px){
  .hero, .hero-slides, .hero-slide { min-height:72vh; }
  .hero-slide .hero-content { padding: calc(var(--header-height) + 8px) 56px 84px; }
  .hero-title { font-size: clamp(2rem,4.2vw,2.65rem); margin-bottom:12px; }
  .hero-description { font-size:.9rem; margin-bottom:26px; }
  .hero-actions { gap:14px; }
  .hero-actions .btn { padding:10px 20px; font-size:13.5px; }
  .hero-carousel-controls { bottom:24px; right:26px; }
  .hero-nav { width:38px; height:38px; font-size:21px; }
  .hero-dot { width:11px; height:11px; }
}
@media (max-width: 896px) and (min-width: 845px){
  .hero, .hero-slides, .hero-slide { min-height:70vh; }
  .hero-slide .hero-content { padding: calc(var(--header-height) + 6px) 54px 80px; }
  .hero-title { font-size: clamp(1.95rem,4.4vw,2.55rem); }
  .hero-description { margin-bottom:24px; }
}

/* 844px (iPad / iPhone landscape group just above 820) */
@media (max-width: 844px) and (min-width: 769px){
  .hero, .hero-slides, .hero-slide { min-height:68vh; }
  .hero-slide .hero-content { padding: calc(var(--header-height) + 4px) 50px 74px; }
  .hero-title { font-size: clamp(1.9rem,4.6vw,2.45rem); margin-bottom:10px; }
  .hero-description { font-size:0.88rem; margin-bottom:22px; line-height:1.32; }
  .hero-actions .btn { padding:9px 18px; font-size:13px; }
  .hero-carousel-controls { bottom:22px; right:24px; }
  .hero-nav { width:36px; height:36px; font-size:20px; }
  .hero-dot { width:10px; height:10px; }
}

/* 740px (between 768 & 720 existing) */
@media (max-width: 740px) and (min-width: 701px){
  .hero, .hero-slides, .hero-slide { min-height:62vh; }
  .hero-slide .hero-content { padding:60px 44px 70px; }
  .hero-title { font-size: clamp(1.85rem,5.4vw,2.3rem); margin-bottom:10px; }
  .hero-description { font-size:0.86rem; margin-bottom:20px; }
  .hero-actions { gap:12px; }
  .hero-actions .btn { padding:9px 16px; font-size:12.5px; }
  .hero-carousel-controls { bottom:20px; right:22px; }
  .hero-nav { width:34px; height:34px; font-size:19px; }
  .hero-dot { width:10px; height:10px; }
}

/* 667px (common older iPhone landscape) */
@media (max-width: 667px) and (min-width: 641px){
  .hero, .hero-slides, .hero-slide { min-height:58vh; }
  .hero-slide .hero-content { padding:54px 40px 64px; }
  .hero-title { font-size: clamp(1.75rem,5.8vw,2.15rem); margin-bottom:8px; }
  .hero-description { font-size:0.82rem; margin-bottom:18px; }
  .hero-actions .btn { padding:8px 15px; font-size:12px; }
  .hero-carousel-controls { bottom:18px; right:20px; }
  .hero-nav { width:32px; height:32px; font-size:18px; }
  .hero-dot { width:9px; height:9px; }
}

/* Edge case: <=640px already covered by earlier mobile rules */

/* ===================================================== */
/* Additional Compact Hero Overrides                     */
/* Breakpoints: 740px, 667px, 540px, 412px               */
/* Top padding reduced to 5px; smaller fonts & buttons.  */
/* ===================================================== */
@media (max-width: 740px) and (min-width: 701px){
  .hero-slide .hero-content { padding:5px 32px 60px; }
  .hero-title { font-size: clamp(1.65rem,5vw,2.05rem); margin-bottom:8px; }
  .hero-description { font-size:0.8rem; margin-bottom:16px; line-height:1.28; }
  .hero-actions { gap:10px; }
  .hero-actions .btn { padding:7px 14px; font-size:12px; }
  .hero-carousel-controls { bottom:16px; right:18px; }
  .hero-nav { width:30px; height:30px; font-size:17px; }
  .hero-dot { width:9px; height:9px; }
}
@media (max-width: 667px) and (min-width: 541px){
  .hero-slide .hero-content { padding:5px 28px 56px; }
  .hero-title { font-size: clamp(1.55rem,5.6vw,1.9rem); margin-bottom:6px; }
  .hero-description { font-size:0.78rem; margin-bottom:14px; }
  .hero-actions .btn { padding:6px 12px; font-size:11.5px; }
  .hero-carousel-controls { bottom:14px; right:16px; }
  .hero-nav { width:28px; height:28px; font-size:16px; }
  .hero-dot { width:8px; height:8px; }
}
@media (max-width: 540px) and (min-width: 413px){
  .hero, .hero-slides, .hero-slide { min-height:56vh; }
  .hero-slide .hero-content { padding:5px 22px 52px; }
  .hero-title { font-size: clamp(1.45rem,6vw,1.8rem); margin-bottom:6px; }
  .hero-description { font-size:0.74rem; margin-bottom:12px; line-height:1.24; }
  .hero-actions { gap:9px; }
  .hero-actions .btn { padding:6px 11px; font-size:11px; }
  .hero-carousel-controls { bottom:12px; right:14px; }
  .hero-nav { width:26px; height:26px; font-size:15px; }
  .hero-dot { width:7px; height:7px; }
}
@media (max-width: 412px){
  .hero, .hero-slides, .hero-slide { min-height:52vh; }
  .hero-slide .hero-content { padding:5px 16px 48px; }
  .hero-title { font-size: clamp(1.35rem,7vw,1.65rem); margin-bottom:5px; }
  .hero-description { font-size:0.7rem; margin-bottom:10px; max-height:2.6em; }
  .hero-actions { gap:8px; }
  .hero-actions .btn { padding:5px 10px; font-size:10.5px; }
  .hero-carousel-controls { bottom:10px; right:12px; }
  .hero-nav { width:24px; height:24px; font-size:14px; }
  .hero-dot { width:6px; height:6px; }
}
