body {
  -webkit-tap-highlight-color: transparent;
  background-color: #08080a;
  color: #f4f4f5;
  overflow-x: hidden;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* CSS Scroll Snapping for horizontal rows */
.row-scroll-container {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  margin-top: -1rem;
  margin-bottom: -1rem;
}

/* --- Card base + hover (single source of truth — this used to be defined
   twice with conflicting scale/border values, which is why hover felt
   inconsistent) --- */
.poster-card,
.vertical-preview-card,
.live-card {
  scroll-snap-align: start;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  will-change: transform, box-shadow;
  position: relative;
  z-index: 1;
  transform: translateZ(0); /* hardware acceleration */
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background-color: #08080a;
}

.poster-card:hover,
.vertical-preview-card:hover {
  transform: scale(1.05) translateY(-4px);
  z-index: 20;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8),
              0 0 15px rgba(255, 255, 255, 0.05);
}

.live-card:hover {
  transform: scale(1.05) translateY(-4px);
  z-index: 20;
  border-color: rgba(0, 230, 118, 0.6);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8),
              0 0 30px rgba(0, 230, 118, 0.3);
}

/* Shimmering Skeletons */
.shimmer {
  background: linear-gradient(90deg, #121216 25%, #1d1d26 50%, #121216 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite linear;
}
@keyframes loading-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Modal overlay + sheet (single source of truth — mobile is a
   full-screen sheet that slides up, desktop is a centered 920px card) --- */
.modal-ambient-glow {
  box-shadow: 0 0 140px 40px rgba(229, 9, 20, 0.22), 0 30px 60px -15px rgba(0, 0, 0, 0.95);
}

.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.35s ease;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  touch-action: none;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  touch-action: auto;
}

.modal-content {
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.modal-overlay.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

#sheetBody {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
  border: none;
}

@media (min-width: 768px) {
  .modal-content {
    transform: translateY(40px) scale(0.95);
  }
  .modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
  }
  #sheetBody {
    width: 920px;
    height: auto;
    max-height: 88vh;
    max-height: 88dvh;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* iPad / tablet band gets a slightly different sheet size than desktop */
@media (min-width: 768px) and (max-width: 1024px) {
  #sheetBody {
    width: 92vw;
    max-height: 85vh;
    max-height: 85dvh;
  }
}

.player-layer { opacity: 0; pointer-events: none; transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.player-layer.active { opacity: 1; pointer-events: auto; }

.nav-gradient { background: linear-gradient(to bottom, rgba(8,8,10,0.98) 0%, rgba(8,8,10,0.7) 70%, rgba(8,8,10,0) 100%); }

.hero-mask {
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 35%, rgba(0,0,0,0.6) 75%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 35%, rgba(0,0,0,0.6) 75%, rgba(0,0,0,0) 100%);
}

/* Glassmorphism (single definition — was duplicated with a weaker blur) */
.glass-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.modal-hero-gradient {
  background: linear-gradient(to top, #121216 0%, rgba(18, 18, 22, 0.8) 40%, rgba(0, 0, 0, 0.25) 100%);
}

 

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .pb-safe {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
}

/* Plyr theme tuning so the trailer player matches the app instead of
   Plyr's default blue */
:root {
  --plyr-color-main: #E50914;
  --plyr-video-background: #08080a;
  --plyr-menu-background: rgba(18, 18, 22, 0.95);
}

/* Respect the OS-level "reduce motion" setting instead of forcing every
   card hover / shimmer / modal slide on people who've asked for less
   animation — a small thing real streaming apps get right. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* Enhanced Glass Navigation Active State */
.nav-tab-active, 
#mobileNavContainer button.active {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 20px rgba(0, 0, 0, 0.3) !important;
  transform: translateY(-2px);
}

/* Fix the Live Card hover border collision */
.live-card {
  border: 1px solid rgba(255, 255, 255, 0.05);
}

 /* Subtle scroll state: slightly darkens the glass and strengthens the border */
.nav-scrolled {
  background-color: rgba(9, 9, 11, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Active Nav State */
.nav-tab-active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}