:root {
  --bg-main: #0a0a0f;
  --bg-card: #14141c;
  --bg-card-hover: #1c1c28;
  --bg-nav: rgba(10, 10, 15, 0.94);
  --brand-red: #e50914;
  --brand-red-glow: rgba(229, 9, 20, 0.5);
  --brand-gold: #ffd700;
  --brand-gold-glow: rgba(255, 215, 0, 0.4);
  --text-main: #ffffff;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==================== CLEAN MINIMALIST NAVBAR ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  z-index: 1000;
  transition: background 0.3s ease;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.brand-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  text-decoration: none !important;
  user-select: none !important;
  flex-shrink: 0 !important;
}

.brand-logo-img {
  height: 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 2px 8px rgba(229, 9, 20, 0.45)) !important;
}

.brand-text-name {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4.5px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.brand-text-jivika {
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

.brand-text-movies {
  background: linear-gradient(135deg, #ff2a3b 0%, #e50914 55%, #ff8c00 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  filter: drop-shadow(0 0 6px rgba(229, 9, 20, 0.4)) !important;
}

.desktop-categories {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 1024px) {
  .desktop-categories {
    display: none !important;
  }
}

/* Center / Expanded Search Bar */
.nav-center-search {
  flex: 1;
  max-width: 480px;
  min-width: 0;
}

.search-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 22px !important;
  padding: 6.5px 30px 6.5px 36px !important;
  color: #fff !important;
  font-size: 13px !important;
  outline: none !important;
  transition: all 0.25s ease !important;
}

.search-input:focus {
  background: rgba(12, 13, 22, 0.98) !important;
  border-color: var(--brand-red) !important;
  box-shadow: 0 0 12px var(--brand-red-glow) !important;
}

.search-icon-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  position: absolute;
  left: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  z-index: 2;
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  position: absolute;
  right: 10px;
  cursor: pointer;
}

/* Right Hamburger Menu Button (Always Prominent & 100% Accessible) */
.nav-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.hamburger-menu-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 38px;
  padding: 0 12px;
  background: rgba(229, 9, 20, 0.14) !important;
  border: 1px solid rgba(229, 9, 20, 0.4) !important;
  border-radius: 8px !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.hamburger-menu-btn:hover, .hamburger-menu-btn:active {
  background: var(--brand-red) !important;
  border-color: #ff4d5a !important;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.4) !important;
}

.hamburger-icon {
  font-size: 17px;
  line-height: 1;
}

@media (max-width: 600px) {
  .hamburger-menu-btn {
    padding: 0 10px !important;
  }
  .hamburger-text {
    display: none !important;
  }
  .navbar {
    padding: 0 10px !important;
    gap: 8px !important;
  }
  .brand-logo-img {
    height: 28px !important;
  }
  .search-input {
    font-size: 12px !important;
    padding: 5.5px 26px 5.5px 30px !important;
  }
  .search-icon-btn {
    left: 8px !important;
    font-size: 12px !important;
  }
}


/* ==================== CATEGORY FILTER BAR ==================== */
.category-filter-bar {
  background: #0d0d14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-top: 0;
  position: relative;
  z-index: 900;
}

.category-filter-bar::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 6px 14px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s ease;
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.cat-pill.active {
  background: #e50914;
  color: #ffffff;
  border-color: #e50914;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.4);
}

/* Auto-Ingest Engine Status & Controls */
.auto-ingest-badge-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseAnim 1.8s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.btn-auto-ingest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.2) 0%, rgba(255, 77, 90, 0.2) 100%);
  border: 1px solid rgba(229, 9, 20, 0.5);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-auto-ingest:hover {
  background: var(--brand-red);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--brand-red-glow);
}

/* ==================== HERO SPOTLIGHT BANNER ==================== */
.hero-banner {
  position: relative;
  margin-top: 62px; /* Clears fixed navbar completely so zero content is hidden */
  height: calc(85vh - 62px);
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: 30px 40px 40px 40px;
  background-size: cover;
  background-position: center 20%;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* Minimal subtle gradient at the bottom so the full poster/wallpaper is 100% visible */
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    rgba(10, 10, 15, 0.4) 75%,
    var(--bg-main) 100%
  ),
  linear-gradient(
    to right,
    rgba(10, 10, 15, 0.75) 0%,
    rgba(10, 10, 15, 0.25) 35%,
    transparent 65%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 440px; /* Compact side box: occupies small corner, leaves 75% for full thumbnail view */
  background: rgba(10, 10, 15, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.full-movie-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.badge-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-gold {
  background: var(--brand-gold);
  color: #000;
}

.badge-red {
  background: var(--brand-red);
  color: #fff;
}

.badge-outline {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e4e4e7;
}

.hero-title {
  font-size: 22px; /* Slim, refined, elegant - NOT huge bold */
  font-weight: 600; /* Regular thin/medium weight - NOT fat 900 */
  line-height: 1.25;
  letter-spacing: 0.2px;
  color: #ffffff;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #a1a1aa;
  margin-bottom: 10px;
}

.hero-meta .rating {
  color: #4ade80;
  font-weight: 700;
}

.hero-desc {
  font-size: 12.5px;
  color: #d4d4d8;
  line-height: 1.5;
  margin-bottom: 16px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 2 lines max so it remains neat */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-red);
  color: #ffffff;
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 14px var(--brand-red-glow);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #ff1a2b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 500;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

/* ==================== HERO SLIDER ARROWS & DOTS ==================== */
.hero-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 28px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 0.6;
  user-select: none;
}

.hero-banner:hover .hero-nav-arrow {
  opacity: 0.95;
}

.hero-nav-arrow:hover {
  background: rgba(229, 9, 20, 0.85);
  border-color: var(--brand-red);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.5);
  opacity: 1;
}

.hero-prev-arrow {
  left: 24px;
}

.hero-next-arrow {
  right: 24px;
}

.hero-dots-container {
  position: absolute;
  bottom: 22px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.hero-dot.active {
  width: 28px;
  border-radius: 6px;
  background: var(--brand-red);
  border-color: #ff4d5a;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.7);
}

/* ==================== NETFLIX TOP 10/20 RANK STYLED CARDS ==================== */
.trending-rank-card {
  position: relative;
  display: flex !important;
  align-items: flex-end;
  flex: 0 0 340px !important;
  min-height: 180px;
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
  padding-left: 55px;
}

.trending-rank-card:hover {
  transform: translateY(-8px) scale(1.03) !important;
  box-shadow: none !important;
}

.trending-rank-num {
  position: absolute;
  left: -8px;
  bottom: -15px;
  font-size: 110px;
  font-weight: 900;
  line-height: 0.85;
  color: #0b0c13;
  -webkit-text-stroke: 4px #595959;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9);
  z-index: 1;
  pointer-events: none;
  font-family: 'Inter', -apple-system, sans-serif;
  letter-spacing: -6px;
  transition: all 0.3s ease;
}

.trending-rank-card:hover .trending-rank-num {
  color: #1a0808;
  -webkit-text-stroke: 4px var(--brand-red);
  text-shadow: 0 0 20px rgba(229, 9, 20, 0.8);
}

.trending-rank-card .netflix-card-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.trending-rank-card:hover .netflix-card-inner {
  border-color: var(--brand-red);
  box-shadow: 0 14px 30px rgba(229, 9, 20, 0.4);
}

/* ==================== NETFLIX MULTI-ROW RAILS ==================== */
.netflix-content-wrapper {
  padding: 10px 0 40px;
}

.movie-row-section {
  position: relative;
  padding: 20px 40px;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.row-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  background: transparent;
  border: none;
  padding: 4px 0;
  margin: 0;
  text-decoration: none;
}

.row-title:hover {
  color: #ff3344;
}

.row-title:hover .row-title-arrow {
  transform: translateX(4px);
  color: #ff3344;
}

.row-title .accent-bar {
  width: 4px;
  height: 22px;
  background: var(--brand-red);
  border-radius: 2px;
  flex-shrink: 0;
}

.row-count-badge {
  font-size: 12px;
  font-weight: 700;
  color: #ff4d5a;
  background: rgba(229, 9, 20, 0.14);
  border: 1px solid rgba(229, 9, 20, 0.35);
  padding: 2px 10px;
  border-radius: 12px;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.row-title:hover .row-count-badge {
  background: rgba(229, 9, 20, 0.25);
  border-color: rgba(229, 9, 20, 0.6);
  color: #fff;
}

.row-title-arrow {
  font-size: 20px;
  color: var(--brand-red);
  font-weight: 800;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f1f5f9;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-view-all:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.35);
}

.btn-view-all .view-all-arrow {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.2s ease;
}

.btn-view-all:hover .view-all-arrow {
  transform: translateX(3px);
}

.row-rail-container {
  position: relative;
  display: flex;
  align-items: center;
}

.row-rail-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 8px 4px 16px;
  width: 100%;
}

.row-rail-scroll::-webkit-scrollbar { display: none; }

.rail-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 90px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  opacity: 0;
}

.movie-row-section:hover .rail-arrow {
  opacity: 1;
}

.rail-arrow:hover {
  background: rgba(229, 9, 20, 0.85);
}

.rail-arrow.left { left: 4px; }
.rail-arrow.right { right: 4px; }

/* Horizontal Card in Netflix Rail */
.netflix-card {
  flex: 0 0 280px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.netflix-card:hover {
  transform: translateY(-8px) scale(1.04);
  border-color: var(--brand-red);
  box-shadow: 0 16px 35px rgba(229, 9, 20, 0.35);
  z-index: 5;
}

.card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.netflix-card:hover .card-thumb {
  transform: scale(1.08);
}

.card-badge-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.badge-tag-sm {
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.badge-fhd {
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  font-weight: 800;
  letter-spacing: 0.4px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.netflix-card:hover .card-play-overlay {
  opacity: 1;
}

.play-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 15px var(--brand-red-glow);
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.netflix-card:hover .play-circle-btn {
  transform: scale(1);
}

.card-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: auto;
}

.card-channel-tag {
  color: #ffb800;
  font-weight: 600;
}

/* ==================== FILTERED GRID (WHEN CATEGORY IS SELECTED) ==================== */
.filtered-grid-container {
  margin-top: 62px; /* Clears navbar completely */
  padding: 30px 40px 60px;
  min-height: calc(100vh - 62px);
}

.filtered-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ==================== ADSENSE AD UNITS ==================== */
.adsense-wrapper {
  max-width: 1280px;
  margin: 18px auto;
  padding: 0 40px;
}

.ad-card {
  background: rgba(20, 20, 28, 0.75);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ad-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.ad-content-placeholder {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  gap: 4px;
}

/* ==================== CINEMA THEATER MODAL PLAYER ==================== */
.theater-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: none;
  overflow-y: auto; /* Always allow smooth scrolling of the modal itself! */
  overflow-x: hidden;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.theater-modal.active {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.theater-dialog {
  background: #111118;
  width: 100%;
  max-width: 960px; /* Optimal cinema width on desktop/laptop */
  max-height: 94vh;
  max-height: 94dvh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 40px var(--brand-red-glow);
  margin: auto; /* Natural flexbox centering: centered when fits, flows from top when taller */
  position: relative;
  flex-shrink: 0;
}

.theater-header {
  padding: 12px 20px;
  background: #161622;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}

.theater-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}

.close-btn {
  font-size: 20px;
  color: #e4e4e7;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.close-btn:hover {
  color: #fff;
  background: var(--brand-red);
  border-color: var(--brand-red);
  transform: scale(1.05);
}

/* Crucial Video Frame Sizing (Laptop Screen Friendly: Never overflows screen height) */
.theater-player-container {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16/9;
  max-height: 52vh; /* Never takes more than 52% of laptop screen height so all controls fit! */
  max-height: 52dvh;
  margin: 0 auto;
  flex-shrink: 0;
}

.theater-player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.theater-details {
  padding: 16px 20px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 9, 20, 0.6) rgba(255, 255, 255, 0.06);
}

.theater-details::-webkit-scrollbar {
  width: 6px;
}
.theater-details::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}
.theater-details::-webkit-scrollbar-thumb {
  background: rgba(229, 9, 20, 0.6);
  border-radius: 4px;
}

.theater-movie-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.theater-desc {
  font-size: 13.5px;
  color: #d1d5db;
  line-height: 1.55;
  margin: 0;
}

/* Action Buttons Bar right below Video */
.theater-actions-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-theater-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-theater-close {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}
.btn-theater-close:hover {
  background: #ef4444;
  color: #fff;
}

.btn-theater-yt {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}
.btn-theater-yt:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-theater-list {
  background: rgba(255, 255, 255, 0.05);
  color: #a1a1aa;
  border-color: rgba(255, 255, 255, 0.12);
}
.btn-theater-list:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-theater-share {
  background: rgba(255, 255, 255, 0.05);
  color: #a1a1aa;
  border-color: rgba(255, 255, 255, 0.12);
}
.btn-theater-share:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ==================== VIP MODAL ==================== */
.vip-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.vip-modal.active {
  display: flex;
}

.vip-card {
  background: linear-gradient(145deg, #181822 0%, #0d0d14 100%);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  padding: 36px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 35px var(--brand-gold-glow);
  position: relative;
}

.vip-card-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.vip-card-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.vip-card-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.vip-input-group {
  margin-bottom: 18px;
  text-align: left;
}

.vip-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.vip-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
}

.vip-input:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 12px var(--brand-gold-glow);
}

.vip-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  color: #111;
  font-weight: 800;
  font-size: 15px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px var(--brand-gold-glow);
  transition: transform 0.2s;
}

.vip-submit-btn:hover {
  transform: translateY(-2px);
}

/* ==================== FOOTER ==================== */
.footer {
  margin-top: 60px;
  padding: 50px 40px 30px;
  background: #060608;
  border-top: 1px solid var(--border-subtle);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-link:hover {
  color: #fff;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 800px;
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ==================== RESPONSIVE DESIGN (LAPTOP, TABLET & MOBILE) ==================== */
/* High priority: Laptop Zoom & Standard Screens (992px - 1180px) */
@media (max-width: 1180px) {
  .top-nav-menu {
    display: none !important; /* Hide category items inside navbar so right buttons NEVER cut off */
  }
  .navbar {
    padding: 0 16px;
  }
  .search-input {
    width: 120px;
  }
  .search-input:focus {
    width: 160px;
  }
}

@media (max-width: 992px) {
  .navbar { padding: 0 16px; }
  .category-filter-bar { padding: 8px 16px; }
  .movie-row-section { padding: 14px 16px; }
  .hero-banner { margin-top: 62px; padding: 20px 20px 36px; height: 58vh; min-height: 400px; }
  .filtered-grid-container { margin-top: 62px; padding: 20px 20px 50px; }
  .hero-title { font-size: 26px; }
  .netflix-card { flex: 0 0 190px; }
  .card-thumb-wrap { height: 250px; }
}

@media (max-width: 768px) {
  /* ==================== THEATER MODAL (MOBILE FRIENDLY 100%) ==================== */
  .theater-modal {
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
  }

  .theater-dialog {
    max-width: 100%;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    margin: 0;
    box-shadow: none;
  }

  .theater-header {
    padding: 10px 14px;
    background: #14141d;
    height: 48px;
  }

  .theater-title {
    font-size: 13.5px;
    max-width: 82%;
  }

  .close-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 18px;
  }

  .theater-player-container {
    max-height: 36vh;
    max-height: 36dvh;
    background: #000;
  }

  .theater-details {
    padding: 12px 14px 40px;
  }

  .theater-actions-bar {
    gap: 8px;
    padding: 10px 0;
  }

  .btn-theater-action {
    flex: 1 1 calc(50% - 4px);
    font-size: 12px;
    padding: 10px 8px;
  }

  .btn-theater-close {
    flex: 1 1 100%;
    order: -1;
    padding: 11px;
    font-size: 13px;
  }

  /* ==================== NAVBAR (MOBILE 100% VISIBLE & EASY TO TAP) ==================== */
  .navbar {
    padding: 0 12px !important;
    height: 60px !important;
    gap: 10px !important;
  }

  .brand-logo-img {
    height: 36px !important;
    width: 36px !important;
    min-width: 36px !important;
  }

  .brand-text-jivika,
  .brand-text-movies {
    font-size: 15px !important;
  }

  .top-nav-menu {
    display: none !important;
  }

  .nav-right {
    gap: 6px;
    flex-shrink: 0 !important;
  }

  /* Search Box on mobile: BIG, COMFORTABLE TOUCH TARGET */
  .nav-center-search {
    flex: 1 1 auto !important;
    min-width: 110px !important;
    max-width: 100% !important;
  }

  .search-box {
    display: flex !important;
    width: 100% !important;
    height: 40px !important;
    position: relative !important;
  }

  .search-input {
    width: 100% !important;
    height: 40px !important;
    padding: 8px 28px 8px 36px !important;
    font-size: 13.5px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
  }

  .search-input:focus {
    width: 100% !important;
    background: rgba(14, 15, 22, 0.98) !important;
    border-color: #e50914 !important;
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.5) !important;
  }

  .search-icon-btn {
    left: 10px !important;
    font-size: 15px !important;
    width: 20px !important;
    height: 20px !important;
    color: #cbd5e1 !important;
  }

  .search-clear-btn {
    right: 10px !important;
    font-size: 15px !important;
    width: 20px !important;
    height: 20px !important;
  }

  .hamburger-menu-btn {
    height: 40px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
  }

  .search-icon-btn {
    left: 5px !important;
    font-size: 12px !important;
  }

  .install-app-btn {
    padding: 5px 9px !important;
    font-size: 10.5px !important;
    gap: 3px !important;
    border-radius: 14px !important;
  }

  .vip-btn {
    padding: 5px 9px !important;
    font-size: 10.5px !important;
    gap: 3px !important;
    border-radius: 14px !important;
  }

  .admin-gear-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }

  /* ==================== HERO BANNER (MOBILE) ==================== */
  .hero-banner {
    margin-top: 54px;
    height: 50vh;
    min-height: 330px;
    padding: 10px 14px 18px;
    background-position: center 25%;
  }

  .hero-content {
    max-width: 100% !important;
    background: rgba(10, 10, 15, 0.75) !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
  }

  .adsense-wrapper {
    padding: 0 12px !important;
    margin: 12px auto !important;
  }

  .hero-nav-arrow {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
    opacity: 0.85 !important;
    background: rgba(0, 0, 0, 0.6) !important;
  }

  .hero-prev-arrow { left: 8px !important; }
  .hero-next-arrow { right: 8px !important; }

  .hero-dots-container {
    right: 14px !important;
    bottom: 8px !important;
    gap: 5px !important;
  }

  .hero-dot {
    width: 6px !important;
    height: 6px !important;
  }

  .hero-dot.active {
    width: 16px !important;
  }

  .hero-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
  }

  .hero-desc {
    font-size: 11px !important;
    -webkit-line-clamp: 1 !important;
    margin-bottom: 8px !important;
    line-height: 1.35 !important;
  }

  .hero-meta {
    gap: 6px !important;
    font-size: 10px !important;
    margin-bottom: 6px !important;
  }

  .hero-actions {
    gap: 8px !important;
  }

  .btn-primary, .btn-secondary {
    padding: 6px 12px !important;
    font-size: 11px !important;
  }

  /* ==================== NETFLIX RAILS (MOBILE) ==================== */
  .movie-row-section {
    padding: 10px 14px;
  }

  .row-title {
    font-size: 15px;
  }

  .row-rail-scroll {
    gap: 10px;
    padding: 4px 0 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .netflix-card {
    flex: 0 0 150px; /* 2.2 cards visible with sneak-peek for swipe affordance */
    border-radius: var(--radius-sm);
    scroll-snap-align: start;
  }

  .trending-rank-card {
    flex: 0 0 190px !important;
    padding-left: 36px !important;
    min-height: 140px !important;
  }

  .trending-rank-num {
    font-size: 74px !important;
    left: -4px !important;
    bottom: -8px !important;
    -webkit-text-stroke: 2.5px #595959 !important;
  }

  .card-thumb-wrap {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
  }

  .card-info {
    padding: 8px;
  }

  .card-title-text {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .card-meta-line {
    font-size: 10px;
  }

  /* Hide left/right rail arrow buttons on touch screen mobile */
  .rail-arrow {
    display: none !important;
  }

  /* ==================== FILTERED GRID (MOBILE) ==================== */
  .filtered-grid-container {
    margin-top: 64px;
    padding: 14px 14px 40px;
  }

  .filtered-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .category-filter-bar {
    padding: 8px 14px;
  }

  .cat-pill {
    padding: 6px 12px;
    font-size: 11px;
    white-space: nowrap;
  }

  /* Footer on Mobile */
  .footer {
    padding: 30px 16px 20px;
  }

  .footer-links {
    gap: 14px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .navbar {
    padding: 0 8px !important;
    height: 58px !important;
    gap: 8px !important;
  }
  .brand-logo-img {
    height: 33px !important;
    width: 33px !important;
    min-width: 33px !important;
  }
  .brand-text-jivika,
  .brand-text-movies {
    font-size: 13.5px !important;
  }
  .nav-center-search {
    flex: 1 1 auto !important;
    min-width: 100px !important;
  }
  .search-box {
    width: 100% !important;
    height: 38px !important;
  }
  .search-input {
    width: 100% !important;
    height: 38px !important;
    font-size: 13px !important;
    padding: 6px 24px 6px 32px !important;
    border-radius: 19px !important;
  }
  .search-input:focus {
    width: 100% !important;
  }
  .search-icon-btn {
    left: 8px !important;
    font-size: 13px !important;
  }
  .install-app-btn {
    padding: 4px 6px !important;
    font-size: 9.5px !important;
  }
  .vip-btn {
    padding: 4px 6px !important;
    font-size: 9.5px !important;
  }
  .admin-gear-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
  }
  .hero-banner {
    margin-top: 50px !important;
  }
  .filtered-grid-container {
    margin-top: 50px !important;
  }
  .netflix-card {
    flex: 0 0 138px;
  }
  .card-thumb-wrap {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
  }
  .hero-title {
    font-size: 20px;
  }
}


/* ==================== PWA INSTALL BUTTON & MODAL ==================== */
.install-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #e50914 0%, #b80710 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.install-app-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #ff1a26 0%, #d80b15 100%);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.6);
  border-color: rgba(255, 255, 255, 0.45);
}

.install-app-btn .install-icon {
  font-size: 14px;
  animation: installPulse 2s infinite ease-in-out;
}

@keyframes installPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Install Modal Overlay */
.install-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.install-modal-card {
  position: relative;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(229, 9, 20, 0.25);
  animation: slideUp 0.25s ease-out;
  color: #ffffff;
}

.install-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.install-modal-close:hover {
  background: rgba(229, 9, 20, 0.6);
}

.install-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.install-modal-logo {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
}

.install-modal-title {
  margin: 0 0 4px 0;
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
}

.install-modal-sub {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.install-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.install-option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.install-option-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(229, 9, 20, 0.35);
}

.option-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.option-info {
  flex: 1;
}

.option-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 3px;
}

.option-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.option-action-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  transition: all 0.2s;
}

.btn-primary-install {
  background: #e50914;
  color: #ffffff;
}

.btn-primary-install:hover {
  background: #ff1a26;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.5);
}

.btn-secondary-install {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary-install:hover {
  background: rgba(255, 255, 255, 0.2);
}

.guide-badge {
  display: inline-block;
  background: rgba(229, 9, 20, 0.2);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #ff4d5a;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
}

.install-modal-footer {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  padding-top: 10px;
}

@media (max-width: 768px) {
  .install-app-btn {
    padding: 6px 10px;
    font-size: 11px;
    gap: 4px;
    border-radius: 18px;
  }
  .install-option-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .option-action-btn {
    width: 100%;
    text-align: center;
  }
}

/* ==================== YOMOVIES DROPDOWN SUB-MENU SYSTEM ==================== */
.top-nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.nav-item {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #fff;
  background: var(--brand-red);
  box-shadow: 0 2px 10px var(--brand-red-glow);
}

.nav-item-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #141422;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 6px 0;
  min-width: 200px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.85), 0 0 20px rgba(229, 9, 20, 0.25);
  z-index: 1000;
  list-style: none;
}

.nav-item-dropdown:hover .nav-dropdown-menu {
  display: block;
  animation: fadeInDown 0.18s ease-in-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.dropdown-link:hover {
  background: rgba(229, 9, 20, 0.2);
  color: #fff;
  padding-left: 20px;
}

.dropdown-arrow {
  font-size: 9px;
  transition: transform 0.2s ease;
}

.nav-item-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* ==================== CLEAN TOP NAVBAR & DROPDOWNS ==================== */
.top-nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.nav-item {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #fff;
  background: var(--brand-red);
  box-shadow: 0 2px 10px var(--brand-red-glow);
}

.nav-item-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding: 6px 0;
  background: #141422;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  min-width: 195px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.95), 0 0 20px rgba(229, 9, 20, 0.25);
  z-index: 9999;
  list-style: none;
}

/* Invisible bridge so mouse never leaves hover zone */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 12px;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dropdown-link:hover {
  background: rgba(229, 9, 20, 0.22);
  color: #fff;
  padding-left: 20px;
}

.dropdown-arrow {
  font-size: 8px;
  margin-left: 2px;
  opacity: 0.7;
}


/* ==========================================================================
   MOBILE VIEW REDESIGN & OPTIMIZATION (HIGH-PERFORMANCE OTT EXPERIENCE)
   ========================================================================== */

/* Mobile Menu Toggle Button in Navbar */
.mobile-menu-btn {
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mobile-menu-btn:hover, .mobile-menu-btn:active {
  background: var(--brand-red);
  color: #fff;
  border-color: #ff4d5a;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.5);
}

.mobile-menu-btn .menu-icon-bars {
  font-size: 16px;
  line-height: 1;
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Navigation Drawer (Slides from Right) */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 82%;
  max-width: 320px;
  height: 100vh;
  background: #0f1017;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.9);
  z-index: 99999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #141520;
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-drawer-close:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.mobile-drawer-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(20, 21, 32, 0.7);
}

.mobile-drawer-search input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.mobile-drawer-search input:focus {
  border-color: var(--brand-red);
}

.mobile-drawer-search button {
  background: var(--brand-red);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 30px;
  -webkit-overflow-scrolling: touch;
}

.mobile-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #64748b;
  margin-bottom: 8px;
  padding-left: 6px;
}

.mobile-drawer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-drawer-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
}

.mobile-drawer-list li:hover, .mobile-drawer-list li:active {
  background: rgba(229, 9, 20, 0.15);
}

.mobile-drawer-list li .m-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  margin-right: 10px;
}

.mobile-drawer-list li .m-text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: #e2e8f0;
}

.mobile-drawer-list li .m-arrow {
  color: #64748b;
  font-size: 16px;
  font-weight: 700;
}

.mobile-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.m-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.m-vip-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.m-install-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ==================== RESPONSIVE OVERRIDES (MOBILE & TABLET) ==================== */

/* Show mobile menu toggle when top-nav-menu is hidden */
@media (max-width: 1180px) {
  .mobile-menu-btn {
    display: inline-flex !important;
  }
}

/* Mobile Phones (Screen width <= 768px) */
@media (max-width: 768px) {
  /* Top Ad Slot: STRICTLY ONLY 1 SINGLE BANNER (NO 4-5 COLUMNS CLUTTER) */
  #topAdWrapper {
    margin: 8px auto 12px !important;
    padding: 0 12px !important;
  }

  #topAdSlot {
    padding: 8px 12px !important;
    min-height: auto !important;
    max-height: 105px !important;
    overflow: hidden !important;
    border-radius: 10px !important;
  }

  #topAdSlot .ad-label {
    font-size: 9px !important;
    margin-bottom: 4px !important;
  }

  #topAdSlot #container-f2c174d7ca0bb28f786b80a10c031e44 {
    max-height: 80px !important;
    overflow: hidden !important;
    display: flex !important;
  }

  /* Hide any 2nd, 3rd, 4th, 5th ad blocks inside the container */
  #topAdSlot #container-f2c174d7ca0bb28f786b80a10c031e44 > div:nth-child(n+2),
  #topAdSlot #container-f2c174d7ca0bb28f786b80a10c031e44 > a:nth-child(n+2),
  #topAdSlot #container-f2c174d7ca0bb28f786b80a10c031e44 > iframe:nth-child(n+2),
  #topAdSlot #container-f2c174d7ca0bb28f786b80a10c031e44 [class*="item"]:nth-child(n+2) {
    display: none !important;
  }

  /* Hero Banner Compact for Mobile */
  .hero-banner {
    min-height: 370px !important;
    padding: 18px 14px 26px !important;
    margin-top: 56px !important;
  }

  .hero-badges {
    gap: 4px !important;
    margin-bottom: 6px !important;
  }

  .full-movie-badge, .hero-badges .badge-tag {
    font-size: 8px !important;
    padding: 2.5px 6px !important;
    border-radius: 3px !important;
  }

  .hero-title {
    font-size: 19px !important;
    line-height: 1.22 !important;
    margin-bottom: 6px !important;
  }

  .hero-meta {
    font-size: 10px !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }

  .hero-desc {
    font-size: 11px !important;
    line-height: 1.35 !important;
    margin-bottom: 12px !important;
    -webkit-line-clamp: 2 !important;
  }

  /* Card Badges: Sleek & Non-Intrusive on Mobile Posters */
  .card-badge-overlay {
    top: 4px !important;
    left: 4px !important;
    gap: 3px !important;
  }

  .badge-tag-sm {
    font-size: 7.5px !important;
    font-weight: 700 !important;
    padding: 1.5px 4px !important;
    border-radius: 2px !important;
    letter-spacing: 0.2px !important;
  }

  .badge-tag-sm.badge-red {
    background: #e50914 !important;
    color: #fff !important;
  }

  .badge-tag-sm.badge-gold {
    background: #d97706 !important;
    color: #fff !important;
  }

  .badge-tag-sm.badge-fhd {
    background: #0284c7 !important;
    color: #fff !important;
  }

  /* Card Info Typography on Mobile */
  .card-info {
    padding: 6px 6px 8px !important;
  }

  .card-title-text {
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    height: 28px !important;
    margin-bottom: 2px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .card-meta-line {
    font-size: 9px !important;
    color: #94a3b8 !important;
  }

  .card-channel-tag {
    font-size: 8.5px !important;
    max-width: 65px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Horizontal Rail Touch Swipe & Momentum */
  .row-rail-scroll {
    display: flex !important;
    gap: 10px !important;
    padding: 4px 2px 14px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
  }

  /* Top 10 Trending Slider: Fixed Smooth Horizontal Scroll on Mobile */
  .trending-rank-card {
    flex: 0 0 calc(55vw) !important;
    max-width: 215px !important;
    min-width: 175px !important;
    padding-left: 32px !important;
    min-height: 140px !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
    touch-action: pan-x pan-y !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  .trending-rank-num {
    font-size: 66px !important;
    left: -2px !important;
    bottom: -6px !important;
    -webkit-text-stroke: 2px #595959 !important;
    pointer-events: none !important;
  }

  .trending-rank-card .netflix-card-inner {
    border-radius: var(--radius-sm) !important;
  }
}

/* Portrait Mobile Devices (width <= 480px): EXACTLY 2 FULL CARDS PER VIEW */
@media (max-width: 480px) {
  .movie-row-section {
    padding: 10px 12px !important;
  }

  .row-title {
    font-size: 14.5px !important;
  }

  .row-rail-scroll {
    gap: 10px !important;
  }

  /* Exactly 2 full cards fitting cleanly side-by-side */
  .netflix-card {
    flex: 0 0 calc(50vw - 17px) !important;
    min-width: calc(50vw - 17px) !important;
    max-width: calc(50vw - 17px) !important;
    flex-shrink: 0 !important;
    border-radius: var(--radius-sm) !important;
    scroll-snap-align: start !important;
  }

  .card-thumb-wrap {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
  }
}

/* Landscape / Large Mobile Devices (481px to 768px): EXACTLY 3 FULL CARDS */
@media (min-width: 481px) and (max-width: 768px) {
  .netflix-card {
    flex: 0 0 calc(33.33vw - 16px) !important;
    min-width: calc(33.33vw - 16px) !important;
    max-width: calc(33.33vw - 16px) !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
  }

  .card-thumb-wrap {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
  }
}


/* ==========================================================================
   MATHEMATICAL ZERO-CUT-OFF OTT RAIL SYSTEM (DESKTOP, LAPTOP, TABLET, MOBILE)
   Guarantees EXACT full cards per row with ZERO partial or half cut-offs!
   ========================================================================== */

.row-rail-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.row-rail-scroll {
  display: flex !important;
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  padding: 8px 0 16px !important; /* Zero horizontal padding for 100% exact card width math */
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
  overscroll-behavior-x: contain !important;
}

.row-rail-scroll::-webkit-scrollbar {
  display: none !important;
}

.netflix-card {
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  scroll-snap-align: start !important;
}

.trending-rank-card {
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  scroll-snap-align: start !important;
}

/* --------------------------------------------------------------------------
   LEVEL 1: WIDE DESKTOP (Screens >= 1400px)
   Standard: EXACTLY 5 FULL CARDS | Top 10: EXACTLY 3 FULL CARDS
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  .row-rail-scroll {
    gap: 16px !important;
  }
  /* 5 cards: 4 gaps of 16px = 64px */
  .netflix-card {
    flex: 0 0 calc((100% - 64px) / 5) !important;
    min-width: calc((100% - 64px) / 5) !important;
    max-width: calc((100% - 64px) / 5) !important;
  }
  /* 3 cards: 2 gaps of 16px = 32px */
  .trending-rank-card {
    flex: 0 0 calc((100% - 32px) / 3) !important;
    min-width: calc((100% - 32px) / 3) !important;
    max-width: calc((100% - 32px) / 3) !important;
  }
}

/* --------------------------------------------------------------------------
   LEVEL 2: STANDARD DESKTOP & LAPTOPS (Screens 1024px to 1399px)
   Standard: EXACTLY 4 FULL CARDS | Top 10: EXACTLY 3 FULL CARDS
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) and (max-width: 1399px) {
  .row-rail-scroll {
    gap: 16px !important;
  }
  /* 4 cards: 3 gaps of 16px = 48px */
  .netflix-card {
    flex: 0 0 calc((100% - 48px) / 4) !important;
    min-width: calc((100% - 48px) / 4) !important;
    max-width: calc((100% - 48px) / 4) !important;
  }
  /* 3 cards: 2 gaps of 16px = 32px */
  .trending-rank-card {
    flex: 0 0 calc((100% - 32px) / 3) !important;
    min-width: calc((100% - 32px) / 3) !important;
    max-width: calc((100% - 32px) / 3) !important;
  }
}

/* --------------------------------------------------------------------------
   LEVEL 3: TABLETS & SMALL LAPTOPS (Screens 768px to 1023px)
   Standard: EXACTLY 3 FULL CARDS | Top 10: EXACTLY 2 FULL CARDS
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .row-rail-scroll {
    gap: 14px !important;
  }
  /* 3 cards: 2 gaps of 14px = 28px */
  .netflix-card {
    flex: 0 0 calc((100% - 28px) / 3) !important;
    min-width: calc((100% - 28px) / 3) !important;
    max-width: calc((100% - 28px) / 3) !important;
  }
  /* 2 cards: 1 gap of 14px = 14px */
  .trending-rank-card {
    flex: 0 0 calc((100% - 14px) / 2) !important;
    min-width: calc((100% - 14px) / 2) !important;
    max-width: calc((100% - 14px) / 2) !important;
  }
}

/* --------------------------------------------------------------------------
   LEVEL 4: MOBILE PHONES (Screens <= 767px)
   Standard: EXACTLY 2 FULL CARDS | Top 10: EXACTLY 2 FULL CARDS
   ZERO PEEK, ZERO HALF-CARDS CUT OFF!
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .movie-row-section {
    padding: 10px 14px !important;
  }
  .row-rail-scroll {
    gap: 10px !important;
    padding: 4px 0 12px !important;
  }
  /* 2 cards: 1 gap of 10px = 10px */
  .netflix-card {
    flex: 0 0 calc((100% - 10px) / 2) !important;
    min-width: calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
    border-radius: var(--radius-sm) !important;
  }
  /* 2 trending cards: 1 gap of 10px = 10px */
  .trending-rank-card {
    flex: 0 0 calc((100% - 10px) / 2) !important;
    min-width: calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
    padding-left: 24px !important;
    min-height: 130px !important;
  }
  .trending-rank-num {
    font-size: 54px !important;
    left: -2px !important;
    bottom: -4px !important;
    -webkit-text-stroke: 1.8px #595959 !important;
  }
  .card-thumb-wrap {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
  }
}


/* Drawer Quick Action Cards */
.drawer-shortcuts-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.drawer-card-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  width: 100%;
}

.drawer-card-btn .d-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.drawer-card-btn .d-text {
  display: flex;
  flex-direction: column;
}

.drawer-card-btn .d-text strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.drawer-card-btn .d-text small {
  font-size: 11px;
  color: #94a3b8;
}

.drawer-vip {
  border-color: rgba(251, 191, 36, 0.3) !important;
  background: rgba(251, 191, 36, 0.08) !important;
}

.drawer-install {
  border-color: rgba(96, 165, 250, 0.3) !important;
  background: rgba(96, 165, 250, 0.08) !important;
}

.drawer-settings {
  border-color: rgba(168, 85, 247, 0.3) !important;
  background: rgba(168, 85, 247, 0.08) !important;
}


/* ==========================================================================
   MASTER 16:9 WIDESCREEN CINEMA THUMBNAILS & ZERO-CUT-OFF OTT RAIL ENGINE
   ========================================================================== */

/* Universal 16:9 Aspect Ratio: Zero Cropping on all YouTube / Cinema Thumbnails */
.card-thumb-wrap {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  max-height: unset !important;
  background: #0a0a0f !important;
  overflow: hidden !important;
}

.card-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s ease !important;
}

.netflix-card:hover .card-thumb {
  transform: scale(1.06) !important;
}

/* Card Information & Typography */
.card-info {
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.card-title-text {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.card-meta-line {
  font-size: 11px !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 2px !important;
}

/* --------------------------------------------------------------------------
   LEVEL 1: WIDE DESKTOP (Screens >= 1400px): EXACTLY 5 CARDS PER VIEW
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  .row-rail-scroll {
    gap: 16px !important;
  }
  .row-rail-scroll .netflix-card {
    flex: 0 0 calc((100% - 64px) / 5) !important;
    min-width: calc((100% - 64px) / 5) !important;
    max-width: calc((100% - 64px) / 5) !important;
  }
  .row-rail-scroll .trending-rank-card {
    flex: 0 0 calc((100% - 32px) / 3) !important;
    min-width: calc((100% - 32px) / 3) !important;
    max-width: calc((100% - 32px) / 3) !important;
  }
}

/* --------------------------------------------------------------------------
   LEVEL 2: STANDARD DESKTOP & LAPTOPS (Screens 1024px to 1399px): EXACTLY 4 CARDS
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) and (max-width: 1399px) {
  .row-rail-scroll {
    gap: 16px !important;
  }
  .row-rail-scroll .netflix-card {
    flex: 0 0 calc((100% - 48px) / 4) !important;
    min-width: calc((100% - 48px) / 4) !important;
    max-width: calc((100% - 48px) / 4) !important;
  }
  .row-rail-scroll .trending-rank-card {
    flex: 0 0 calc((100% - 32px) / 3) !important;
    min-width: calc((100% - 32px) / 3) !important;
    max-width: calc((100% - 32px) / 3) !important;
  }
}

/* --------------------------------------------------------------------------
   LEVEL 3: TABLETS & SMALL LAPTOPS (Screens 768px to 1023px): EXACTLY 3 CARDS
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .row-rail-scroll {
    gap: 14px !important;
  }
  .row-rail-scroll .netflix-card {
    flex: 0 0 calc((100% - 28px) / 3) !important;
    min-width: calc((100% - 28px) / 3) !important;
    max-width: calc((100% - 28px) / 3) !important;
  }
  .row-rail-scroll .trending-rank-card {
    flex: 0 0 calc((100% - 14px) / 2) !important;
    min-width: calc((100% - 14px) / 2) !important;
    max-width: calc((100% - 14px) / 2) !important;
  }
}

/* --------------------------------------------------------------------------
   LEVEL 4: MOBILE PHONES (Screens <= 767px): EXACTLY 2 FULL CARDS PER VIEW
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .movie-row-section {
    padding: 10px 12px !important;
  }
  .row-rail-scroll {
    gap: 10px !important;
    padding: 4px 0 10px !important;
  }
  .row-rail-scroll .netflix-card {
    flex: 0 0 calc((100% - 10px) / 2) !important;
    min-width: calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
    border-radius: var(--radius-sm) !important;
  }
  .row-rail-scroll .trending-rank-card {
    flex: 0 0 calc((100% - 10px) / 2) !important;
    min-width: calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
    padding-left: 20px !important;
  }
  .trending-rank-num {
    font-size: 48px !important;
    left: -2px !important;
    bottom: -2px !important;
    -webkit-text-stroke: 1.5px #595959 !important;
  }
  .card-info {
    padding: 7px 8px !important;
  }
  .card-title-text {
    font-size: 11.5px !important;
  }
  .card-meta-line {
    font-size: 9.5px !important;
  }
}

/* ==================== FILTERED GRID & CATEGORY VIEW (100% WIDESCREEN 16:9) ==================== */
.filtered-grid-container {
  margin-top: 64px !important;
  padding: 24px 20px 60px !important;
  max-width: 1440px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.filtered-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 18px !important;
  width: 100% !important;
}

.filtered-grid .netflix-card {
  flex: initial !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  border-radius: 10px !important;
  background: var(--bg-card) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
}

.filtered-grid .card-thumb-wrap {
  aspect-ratio: 16 / 9 !important;
  width: 100% !important;
  height: auto !important;
}

@media (min-width: 1400px) {
  .filtered-grid {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

@media (max-width: 1023px) and (min-width: 601px) {
  .filtered-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
  }
}

@media (max-width: 600px) {
  .filtered-grid-container {
    padding: 14px 10px 40px !important;
  }
  .filtered-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .filtered-grid .card-title-text {
    font-size: 11.5px !important;
  }
  .filtered-grid .card-meta-line {
    font-size: 9.5px !important;
  }
  .filtered-grid .card-info {
    padding: 7px 8px !important;
  }
}

/* ==================== ZERO JITTER & LOCKED AD / RAIL STABILITY ==================== */
#topAdSlot {
  height: 220px !important;
  min-height: 220px !important;
  max-height: 220px !important;
  overflow: hidden !important;
}

#topAdSlot iframe, #topAdIframe {
  height: 175px !important;
  min-height: 175px !important;
  max-height: 175px !important;
  overflow: hidden !important;
}

.row-rail-container {
  overflow-y: hidden !important;
  contain: layout paint;
}

.row-rail-scroll {
  overflow-y: hidden !important;
}

@media (max-width: 768px) {
  #topAdSlot {
    height: 310px !important;
    min-height: 310px !important;
    max-height: 310px !important;
  }
  #topAdSlot iframe, #topAdIframe {
    height: 265px !important;
    min-height: 265px !important;
    max-height: 265px !important;
  }
}

/* ==================== MOBILE TOUCH TARGETS (48px minimum) ==================== */
/* Ensure all interactive buttons meet minimum 48x48px touch target requirement */
.hamburger-menu-btn,
.mobile-drawer-close,
.search-icon-btn,
.search-clear-btn,
.vip-btn,
.player-play-trigger,
.share-btn,
.btn-back-browse,
.nav-item,
.drawer-card-btn {
  min-height: 48px;
  min-width: 48px;
}

.hamburger-menu-btn {
  min-height: 48px !important;
  height: 48px !important;
}

.search-icon-btn {
  min-height: 48px;
  height: 100%;
}

.search-clear-btn {
  min-height: 48px;
  height: 100%;
}

/* ==================== AD CONTAINER CLS FIXES (Zero Layout Shift) ==================== */
/* Fixed dimensions + 24px safety margin for all ad placements */
.ad-slot-top,
#topAdSlot,
#topAdContainer {
  min-height: 180px;
  height: 180px;
  width: 100%;
  contain: layout paint;
  margin: 24px 0;
  overflow: hidden;
}

.ad-slot-infeed {
  min-height: 180px;
  height: 180px;
  width: 100%;
  contain: layout paint;
  margin: 24px 0;
  overflow: hidden;
}

/* Header ad banner on watch page */
.header-ad-banner {
  min-height: 210px;
  contain: layout paint;
  margin: 24px auto;
  overflow: hidden;
}

/* ==================== OVERFLOW-X PREVENTION ==================== */
html {
  overflow-x: hidden;
}

.watch-page-wrap,
.content-wrapper,
.netflix-content-wrapper,
#contentWrapper {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ==================== MOBILE RESPONSIVE FIXES ==================== */
@media (max-width: 480px) {
  .watch-grid-layout {
    grid-template-columns: 1fr !important;
  }

  .video-headline-title {
    font-size: 17px !important;
  }

  .hamburger-menu-btn {
    min-width: 48px;
    height: 48px !important;
    padding: 0 10px !important;
  }

  .nav-center-search {
    max-width: calc(100vw - 160px);
  }

  /* At least 24px separation between ad containers and interactive elements */
  .header-ad-banner {
    margin-bottom: 24px;
  }

  .share-btn {
    min-height: 48px;
    padding: 8px 12px;
  }
}

/* Cinema Spotlight & AdBlock-Proof Containers */
.cinema-spotlight-rail,
.cinema-header-feature {
  width: 100%;
  display: block;
  contain: layout style;
}

.cinema-partner-card {
  width: 100%;
  box-sizing: border-box;
}

.cinema-fallback-promo {
  width: 100%;
  box-sizing: border-box;
}


/* ==================== STRICT MOBILE AD CONTROL (ONLY 1 AD AFTER BANNER) ==================== */
@media (max-width: 768px) {
  /* Container sizing */
  #container-f2c174d7ca0bb28f786b80a10c031e44 {
    display: block !important;
    overflow: hidden !important;
    max-height: 180px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Flex wrapper inside adsterra */
  #container-f2c174d7ca0bb28f786b80a10c031e44 [class*="__stand"] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  /* HIDE 2nd, 3rd, 4th, and all subsequent ads on mobile - ONLY 1 AD VISIBLE */
  #container-f2c174d7ca0bb28f786b80a10c031e44 [class*="__bn-container"]:not(:first-child),
  #container-f2c174d7ca0bb28f786b80a10c031e44 [class*="__stand"] > div:not(:first-child),
  #container-f2c174d7ca0bb28f786b80a10c031e44 [class*="__bn"]:not(:first-child),
  #container-f2c174d7ca0bb28f786b80a10c031e44 > div > div:not(:first-child),
  #container-f2c174d7ca0bb28f786b80a10c031e44 > div:nth-child(n+2) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Style the single visible first ad cleanly for mobile */
  #container-f2c174d7ca0bb28f786b80a10c031e44 [class*="__bn-container"]:first-child,
  #container-f2c174d7ca0bb28f786b80a10c031e44 [class*="__stand"] > div:first-child {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 2px !important;
    display: block !important;
  }

  #container-f2c174d7ca0bb28f786b80a10c031e44 [class*="__bn"] {
    max-width: 100% !important;
    margin: 0 auto !important;
  }
}


    /* ==================== HERO BANNER 16:9 EXACT THUMBNAIL (ZERO CROP, ZERO ZOOM) ==================== */
    @media (max-width: 768px) {
      .hero-banner {
        margin-top: 54px !important;
        width: 100% !important;
        aspect-ratio: 16 / 9 !important; /* Matches 1280x720 YouTube Thumbnail Exactly */
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        padding: 0 !important;
        background-size: 100% 100% !important; /* 100% of original thumbnail visible with 0% crop */
        background-repeat: no-repeat !important;
        background-position: center center !important;
        background-color: #000000 !important;
        display: flex !important;
        align-items: flex-end !important;
        position: relative !important;
        touch-action: pan-y !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        cursor: grab !important;
        overflow: hidden !important;
      }

      /* Very subtle bottom vignette: only at the very bottom edge */
      .hero-overlay {
        background: linear-gradient(
          to bottom,
          transparent 0%,
          transparent 65%,
          rgba(0, 0, 0, 0.4) 82%,
          rgba(0, 0, 0, 0.9) 100%
        ) !important;
      }

      /* Ultra-sleek bottom bar: keeps 85%+ of original thumbnail completely clear */
      .hero-content {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.3) 70%, transparent 100%) !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        padding: 18px 12px 8px !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
      }

      /* Hide duplicate HTML text so the original thumbnail title & graphics are 100% visible */
      .hero-title,
      .hero-desc,
      #heroChannel {
        display: none !important;
      }

      .hero-badges {
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
      }

      .full-movie-badge {
        font-size: 8.5px !important;
        padding: 2.5px 7px !important;
        border-radius: 4px !important;
        background: #e50914 !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
      }

      .hero-badges .badge-tag:not(.full-movie-badge) {
        display: none !important;
      }

      .hero-meta {
        margin: 0 !important;
        font-size: 10px !important;
        color: #f1f5f9 !important;
        font-weight: 700 !important;
      }

      /* Sleek Watch Now button on bottom-right */
      .hero-actions {
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
      }

      .hero-actions .btn-primary {
        padding: 5px 14px !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        border-radius: 5px !important;
        height: 28px !important;
        background: #e50914 !important;
        box-shadow: 0 2px 10px rgba(229, 9, 20, 0.5) !important;
      }

      .hero-actions .btn-secondary {
        display: none !important;
      }

      /* Compact navigation arrows */
      .hero-nav-arrow {
        width: 26px !important;
        height: 26px !important;
        font-size: 15px !important;
        background: rgba(0, 0, 0, 0.45) !important;
        opacity: 0.75 !important;
        top: 36% !important;
      }

      .hero-prev-arrow { left: 4px !important; }
      .hero-next-arrow { right: 4px !important; }

      /* Centered dots indicator */
      .hero-dots-container {
        bottom: 5px !important;
        right: unset !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        gap: 4px !important;
      }

      .hero-dot {
        width: 5px !important;
        height: 5px !important;
        background: rgba(255, 255, 255, 0.4) !important;
      }

      .hero-dot.active {
        width: 14px !important;
        background: #e50914 !important;
      }
    }


/* ==================== CLEAN ELEGANT ROW HEADERS ==================== */
.row-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
  gap: 8px;
}

.row-title {
  font-size: 17px !important;
  font-weight: 600 !important; /* Slim, refined semi-bold - NOT thick/fat 800/900 */
  color: #f1f5f9 !important;
  letter-spacing: 0.15px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  user-select: none !important;
  background: transparent !important;
  border: none !important;
  padding: 2px 0 !important;
  margin: 0 !important;
  text-decoration: none !important;
}

.row-title:hover {
  color: #ff3344 !important;
}

.row-title:hover .row-title-arrow {
  transform: translateX(4px) !important;
  color: #ff3344 !important;
}

.row-title .accent-bar {
  width: 3px !important;
  height: 16px !important;
  background: var(--brand-red) !important;
  border-radius: 2px !important;
  flex-shrink: 0 !important;
}

.row-title-arrow {
  font-size: 15px !important;
  color: var(--brand-red) !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Hide unused badges and view-all buttons completely across entire site */
.row-count-badge,
.btn-view-all {
  display: none !important;
}

@media (max-width: 768px) {
  .row-header {
    margin-bottom: 8px !important;
  }

  .row-title {
    font-size: 14.5px !important;
    font-weight: 600 !important; /* Refined slim font for mobile */
    gap: 6px !important;
  }

  .row-title .accent-bar {
    width: 2.5px !important;
    height: 14px !important;
  }

  .row-title-arrow {
    font-size: 13.5px !important;
  }
}


/* ==================== 4-MOVIE 2-ROW GRID & TALL POSTER THUMBNAILS ON MOBILE ==================== */
@media (max-width: 768px) {
  /* Show at least 4 movies per title on mobile: 2 on top, 2 on bottom */
  .row-rail-scroll {
    display: grid !important;
    grid-template-rows: repeat(2, auto) !important;
    grid-auto-flow: column !important;
    grid-auto-columns: calc((100vw - 36px) / 2) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    gap: 16px 10px !important;
    padding: 6px 14px 16px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Each card is a clean vertical column */
  .netflix-card,
  .row-rail-scroll .netflix-card {
    scroll-snap-align: start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    flex: unset !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(18, 19, 29, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  }

  /* Trending Rank Cards in 2-row layout */
  .trending-rank-card,
  .row-rail-scroll .trending-rank-card {
    scroll-snap-align: start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    flex: unset !important;
    padding-left: 22px !important;
    display: flex !important;
    position: relative !important;
  }

  .trending-rank-card .netflix-card-inner {
    width: 100% !important;
    background: rgba(18, 19, 29, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .trending-rank-num {
    font-size: 46px !important;
    left: -2px !important;
    bottom: 26px !important;
    line-height: 1 !important;
  }

  /* 100% ORIGINAL UNCUT CINEMA THUMBNAIL (16:9 Widescreen - Zero Crop) */
  .card-thumb-wrap,
  .netflix-card .card-thumb-wrap,
  .trending-rank-card .card-thumb-wrap,
  .row-rail-scroll .card-thumb-wrap {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important; /* Exact 16:9 ratio of original thumbnail - ZERO side cropping */
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    background: #0a0a0f !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .card-thumb,
  .netflix-card .card-thumb,
  .card-thumb-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* In 16:9 container: full 100% width, movie title, actors & art are never cropped */
    display: block !important;
  }

  /* Play button centered and subtle */
  .card-play-overlay {
    opacity: 0.9 !important;
  }

  .play-circle-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 14px !important;
    background: rgba(229, 9, 20, 0.85) !important;
  }

  /* TEXT IS PLACED CLEARLY BELOW THE PHOTO */
  .card-info {
    padding: 8px 10px 10px !important;
    background: rgba(14, 15, 22, 0.95) !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
  }

  .card-title-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1.32 !important;
    margin-bottom: 4px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
  }

  .card-meta-line {
    font-size: 11px !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  .card-channel-tag {
    font-size: 10px !important;
    color: #ffaa00 !important;
    max-width: 100px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}
