: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;
}

/* ==================== NAVBAR ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  transition: background 0.3s ease;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  min-width: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  height: 40px;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.top-nav-menu {
  display: flex;
  align-items: center;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.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);
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view-all:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  box-shadow: 0 4px 12px var(--brand-red-glow);
  transform: translateX(2px);
}

.row-count-badge {
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  vertical-align: middle;
}

.btn-back-browse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.btn-back-browse:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
}

.search-clear-btn:hover {
  color: #fff;
}

.admin-gear-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 15px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.admin-gear-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(45deg);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Search Input */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  position: absolute;
  left: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  z-index: 2;
  transition: transform 0.2s, color 0.2s;
}

.search-icon-btn:hover {
  color: #fff;
  transform: scale(1.15);
}

.search-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 6px 24px 6px 30px;
  color: var(--text-main);
  font-size: 12.5px;
  width: 140px;
  transition: all 0.25s ease;
}

.search-input:focus {
  outline: none;
  width: 190px;
  border-color: var(--brand-red);
  background: rgba(10, 10, 15, 0.95);
  box-shadow: 0 0 10px var(--brand-red-glow);
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
  font-size: 13px;
  pointer-events: none;
}

/* VIP Button */
.vip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  color: #111;
  font-weight: 800;
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.vip-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 215, 0, 0.6);
}

.vip-badge-active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

/* ==================== 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: 14px;
}

.row-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-title .accent-bar {
  width: 4px;
  height: 20px;
  background: var(--brand-red);
  border-radius: 2px;
}

.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 & NO CUTOFF) ==================== */
  .navbar {
    padding: 0 10px;
    height: 54px;
  }

  .brand-logo-img {
    height: 28px !important;
  }

  .top-nav-menu {
    display: none !important;
  }

  .nav-right {
    gap: 6px;
  }

  /* Search Box on mobile: compact and ALWAYS visible */
  .search-box {
    display: flex !important;
  }

  .search-input {
    width: 85px !important;
    padding: 4px 18px 4px 24px !important;
    font-size: 11px !important;
  }

  .search-input:focus {
    width: 130px !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 {
    height: 210px;
  }

  .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 6px;
    height: 50px;
  }
  .brand-logo-img {
    height: 24px !important;
  }
  .nav-right {
    gap: 4px;
  }
  .search-input {
    width: 68px !important;
    font-size: 10px !important;
    padding: 3px 14px 3px 20px !important;
  }
  .search-input:focus {
    width: 105px !important;
  }
  .search-icon-btn {
    left: 4px !important;
    font-size: 10px !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 {
    height: 190px;
  }
  .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;
  }
}
