/* ============================================================
   NOBARGASI — Apple TV+ Minimalist Dark Design System (app.css)
   Clean, Lightweight, High Performance & 60fps Experience
   ============================================================ */

:root {
  --bg-dark: #000000;
  --bg-surface: #0e1015;
  --bg-surface-elevated: #16181f;
  --bg-surface-hover: #1f222b;
  --bg-glass: rgba(22, 24, 31, 0.72);
  --bg-glass-elevated: rgba(30, 34, 45, 0.82);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-focus: rgba(255, 255, 255, 0.4);

  --text-main: #f5f5f7;
  --text-muted: #9496a1;
  --text-dim: #636570;

  --accent-white: #ffffff;
  --accent-blue: #38bdf8;
  --accent-cyan: #02e7f5;
  --accent-vip: #f5b942;
  --accent-green: #10b981;
  --accent-red: #ef4444;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --sidebar-w: 230px;
  --sidebar-expanded: 230px;
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base setup */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient glow & backdrop overlay */
#ambientBg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center top;
  filter: blur(80px) saturate(140%) brightness(0.28);
  opacity: 0.85;
  transition: background-image 1.2s ease, opacity 0.8s ease;
  transform: scale(1.1);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 20%, transparent 0%, rgba(0,0,0,0.7) 70%, #000 100%);
}

/* Hide scrollbar cleanly */
.no-scrollbar::-webkit-scrollbar,
.custom-scrollbar-x::-webkit-scrollbar {
  display: none;
}
.no-scrollbar,
.custom-scrollbar-x {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* App Shell Layout */
.app-shell {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100vh;
}

/* Modern Left Sidebar (Apple TV+ Style) */
.app-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  background: rgba(12, 14, 19, 0.88);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 24px 16px;
  z-index: 120;
  transition: width 0.3s var(--transition-smooth), transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease;
}
.sidebar-logo:hover {
  transform: scale(1.02);
}
.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.sidebar-nav-item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 14px;
  color: #9496a1;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  outline: none;
}
.sidebar-nav-item svg,
.sidebar-nav-item .nav-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.sidebar-nav-item:hover {
  color: var(--accent-white);
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-nav-item:hover svg,
.sidebar-nav-item:hover .nav-icon {
  transform: scale(1.08);
}
.sidebar-nav-item.dplus-nav-active,
.sidebar-nav-item.active {
  color: #000000 !important;
  background: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.16);
}
.sidebar-nav-item.dplus-nav-active svg,
.sidebar-nav-item.active svg {
  color: #000000 !important;
}
.sidebar-nav-item .vip-badge-icon {
  margin-left: auto;
  font-size: 14px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
}

.user-avatar-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.user-avatar-btn:hover {
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.06);
}

/* Main Content Area */
.app-main {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding-left: 0;
  padding-bottom: 90px;
}
@media (min-width: 1024px) {
  .app-main {
    padding-left: var(--sidebar-w);
    padding-bottom: 40px;
  }
}

/* Top Floating Bar (Search & Quick Status) */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.3s ease;
}
@media (min-width: 1024px) {
  .top-navbar {
    padding: 16px 36px;
  }
}

.top-search-box {
  position: relative;
  width: 100%;
  max-width: 440px;
}
.top-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 13px;
  padding: 10px 18px 10px 42px;
  outline: none;
  font-family: inherit;
  transition: all 0.25s ease;
}
.top-search-input:focus {
  background: rgba(20, 22, 28, 0.95);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
.top-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
}
.search-shortcut-hint {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 12px;
  z-index: 130;
}
@media (min-width: 1024px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}
.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.mobile-nav-btn svg,
.mobile-nav-btn .nav-icon {
  font-size: 18px;
  line-height: 1;
}
.mobile-nav-btn.active,
.mobile-nav-btn:hover {
  color: var(--accent-white);
}

/* Content Container */
.content-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .content-container {
    padding: 0 24px;
  }
}
@media (min-width: 1024px) {
  .content-container {
    padding: 0 36px;
  }
}

/* HERO SECTION (Apple TV+ Widescreen Cinematic) */
#heroSection {
  position: relative;
  width: 100%;
  margin-bottom: 32px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.hero-card-inner {
  position: relative;
  width: 100%;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
}
@media (min-width: 768px) {
  .hero-card-inner {
    min-height: 560px;
    align-items: center;
  }
}
#heroContent {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transition: background-image 0.6s ease;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.65) 45%, rgba(0,0,0,0.15) 100%),
              linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 10;
  max-width: 640px;
  padding: 28px 20px;
}
@media (min-width: 768px) {
  .hero-copy {
    padding: 48px 48px;
  }
}
#heroTitle {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 10px 0;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}
@media (min-width: 640px) {
  #heroTitle {
    font-size: 44px;
  }
}
@media (min-width: 1024px) {
  #heroTitle {
    font-size: 52px;
  }
}

#heroMeta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
}

#heroDesc {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(245, 245, 247, 0.85);
  margin: 0 0 24px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Clean Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-white);
  color: #000;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 26px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(255,255,255,0.18);
}
.btn-primary:hover {
  background: #e6e6ea;
  transform: scale(1.04);
}
.btn-primary:active {
  transform: scale(0.98);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-white);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.04);
}
.btn-glass:active {
  transform: scale(0.98);
}

.btn-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}
.btn-icon-circle:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.08);
}

/* Hero Carousel Controls */
.hero-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s ease;
  opacity: 0;
}
#heroSection:hover .hero-nav-arrow {
  opacity: 1;
}
.hero-nav-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.08);
}
.hero-nav-arrow.left-arrow { left: 16px; }
.hero-nav-arrow.right-arrow { right: 16px; }

#heroDots {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 20;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.25s ease;
  cursor: pointer;
}
.hero-dot.active {
  width: 24px;
  background: var(--accent-white);
}

/* Category & Mood Chip Rails */
.mood-chips-rail,
.genre-strip-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px 0;
  margin-bottom: 20px;
}
.mood-chip,
.nb-genre-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.mood-chip:hover,
.nb-genre-pill:hover,
.nb-genre-pill.nb-pill-active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--accent-white);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Brand Hub / Platform Rail */
#nbBrandHub {
  position: relative;
  width: 100%;
  margin-bottom: 32px;
}
.brand-hub-rail {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px;
  scroll-snap-type: x mandatory;
}
.brand-tile {
  flex: 0 0 130px;
  height: 72px;
  background: rgba(20, 23, 31, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.25s var(--transition-smooth);
}
@media (min-width: 640px) {
  .brand-tile {
    flex: 0 0 160px;
    height: 84px;
  }
}
.brand-tile:hover {
  background: rgba(35, 40, 55, 0.9);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.5);
}
.brand-hub-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(14, 16, 22, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  opacity: 0;
}
#nbBrandHub:hover .brand-hub-arrow {
  opacity: 1;
}
.brand-hub-arrow.left-arrow { left: -14px; }
.brand-hub-arrow.right-arrow { right: -14px; }

/* Content Row Shells */
.row-shell {
  position: relative;
  margin-bottom: 32px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 320px;
}
.row-shell .overflow-x-auto {
  align-items: flex-start;
}
.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.row-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (min-width: 768px) {
  .row-title {
    font-size: 22px;
  }
}
.explore-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.explore-btn:hover {
  color: var(--accent-white);
  background: rgba(255, 255, 255, 0.06);
}

.row-arrow-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}
.row-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Movie Card Components */
.movie-card {
  position: relative;
  flex: 0 0 135px;
  width: 135px;
  max-width: 135px;
  min-width: 0;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.28s var(--transition-smooth), box-shadow 0.28s ease;
  user-select: none;
}
.movie-card * {
  min-width: 0;
}
.movie-card h3 {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
@media (min-width: 640px) {
  .movie-card {
    flex: 0 0 165px;
    width: 165px;
    max-width: 165px;
  }
}
@media (min-width: 1024px) {
  .movie-card {
    flex: 0 0 185px;
    width: 185px;
    max-width: 185px;
  }
}
.movie-card:hover {
  transform: translateY(-6px) scale(1.03);
  z-index: 20;
}
.movie-card:hover .fav-btn {
  opacity: 1;
}

.poster-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #141720;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transition: border-color 0.2s ease;
}
.movie-card:hover .poster-container {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 36px rgba(0,0,0,0.8);
}
.poster-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 35;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
}
.fav-btn:hover {
  transform: scale(1.15);
  background: rgba(0,0,0,0.85);
}

.card-play-pill {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}
.movie-card:hover .card-play-pill {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Resume Progress Bar */
.resume-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
  z-index: 25;
}
.resume-progress {
  height: 100%;
  background: var(--accent-white);
  box-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* Skeleton Loading */
.skeleton {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(90deg, #12141c 0%, #1c202d 50%, #12141c 100%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Top 10 Ranking Outline Numbers (Apple TV+ / Netflix Style) */
.netflix-number {
  font-size: 80px;
  font-weight: 900;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2.5px rgba(255, 255, 255, 0.45);
  margin-right: -18px;
  z-index: 10;
  user-select: none;
  font-family: var(--font-family);
  transition: -webkit-text-stroke 0.2s ease;
}
@media (min-width: 640px) {
  .netflix-number {
    font-size: 92px;
    -webkit-text-stroke: 3px rgba(255, 255, 255, 0.45);
    margin-right: -22px;
  }
}
@media (min-width: 1024px) {
  .netflix-number {
    font-size: 100px;
    margin-right: -24px;
  }
}
.movie-card:hover ~ .netflix-number,
.flex:hover .netflix-number {
  -webkit-text-stroke: 3px var(--accent-white);
}

/* Actor Circle Chip */
.actor-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s ease;
}
.actor-avatar-wrap:hover .actor-circle {
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}

/* Grid View Section */
#gridSection {
  padding-top: 10px;
}
#gridResults {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
@media (min-width: 640px) {
  #gridResults {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
  }
}
@media (min-width: 1024px) {
  #gridResults {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 24px;
  }
}
#gridResults .movie-card {
  flex: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Filter Controls */
.filter-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}
.filter-select:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

/* ============================================================ */
/* BODY SCROLL LOCK & MODAL OVERLAY ISOLATION                   */
/* ============================================================ */
html.player-open,
body.player-open,
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  height: 100% !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

/* Sembunyikan navigasi & elemen mengambang latar belakang saat menonton film */
body.player-open .mobile-bottom-nav,
body.player-open .top-navbar,
body.player-open .app-sidebar,
body.player-open #nbAdPromoPopup,
body.player-open #backToTopBtn,
body.player-open #nbHoverCard {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* CINEMA PLAYER (Apple TV+ Minimalist Bioskop) */
#playerContainer {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(36px);
  -webkit-backdrop-filter: blur(36px);
  overscroll-behavior: contain !important;
}
#playerModalBox {
  background: rgba(14, 16, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
}

/* Cegah scroll bocor ke background pada seluruh modal overlay */
#detailModal,
#trailerModal,
#nbVoucherModal,
#nbQrisPaymentModal,
#adminModal,
#nobarModal,
#mobileMoreMenu,
#nbResellerRegisterModal,
#nbResellerDashboardModal,
#nbPublicStoreView {
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
}

#videoPlayer {
  border-radius: var(--radius-md);
  background: #000;
}
.server-pill-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 9999px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.server-pill-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.server-pill-btn.active-server {
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 700 !important;
  border-color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
}

/* Cards in Similar Grid (Player Side Panel) */
#similarContainer .movie-card {
  flex: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Lanjutkan Menonton: Standard Uniform Card Size with all other rows */
#rowHistory .movie-card {
  flex: 0 0 135px;
  width: 135px;
  max-width: 135px;
  min-width: 0;
}
@media (min-width: 640px) {
  #rowHistory .movie-card {
    flex: 0 0 165px;
    width: 165px;
    max-width: 165px;
  }
}
@media (min-width: 1024px) {
  #rowHistory .movie-card {
    flex: 0 0 185px;
    width: 185px;
    max-width: 185px;
  }
}
#rowHistory .poster-container {
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
}

/* Detail Modal Sheet (Apple TV+ Widescreen) */
#detailModal {
  background: #000000;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}
#detailBackdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72vh;
  min-height: 480px;
  background-size: cover;
  background-position: center top;
  background-image: url('../brand/hero-default.jpg');
  filter: brightness(0.85);
  pointer-events: none;
  z-index: 0;
}
.detail-trailer-preview-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72vh;
  min-height: 480px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.detail-trailer-iframe-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.77vh;
  pointer-events: none;
}
.detail-trailer-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  transform: scale(1.25);
  pointer-events: none;
  border: 0;
}
.detail-backdrop-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72vh;
  min-height: 480px;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 55%, #000000 100%),
              linear-gradient(90deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 38%, rgba(0,0,0,0.1) 75%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}
.detail-poster {
  width: 200px;
  aspect-ratio: 2/3;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
@media (min-width: 768px) {
  .detail-poster {
    width: 260px;
  }
}

/* Detail Modal Apple TV+ Tabs & Cast */
.detail-tab-btn {
  font-size: 14px;
  font-weight: 700;
  color: #8e8e93;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  position: relative;
  transition: color 0.2s ease;
}
.detail-tab-btn:hover {
  color: #ffffff;
}
.detail-tab-btn.active {
  color: #ffffff;
}
.detail-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

.detail-cast-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 6px 16px 6px 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.detail-cast-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.detail-cast-chip img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Player Episode Cards & Navigation */
.player-episode-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}
.player-episode-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}
.player-episode-item.active-ep {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  position: relative;
}
.player-episode-item.active-ep::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 4px;
  background: #ffffff;
}

/* Toast Notification */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.nb-toast {
  pointer-events: auto;
  background: rgba(20, 22, 28, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s var(--transition-smooth);
}
.nb-toast.nb-toast-visible {
  opacity: 1;
  transform: translateY(0);
}
.nb-toast.nb-toast-out {
  opacity: 0;
  transform: translateY(-8px);
}

/* Back to Top Floating Button */
#backToTopBtn {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 100;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20, 22, 30, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}
#backToTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}
#backToTopBtn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}
@media (min-width: 1024px) {
  #backToTopBtn {
    bottom: 28px;
    right: 28px;
  }
}

/* Hover Card on Desktop */
#nbHoverCard {
  position: fixed;
  z-index: 400;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: rgba(18, 20, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 48px rgba(0,0,0,0.8);
  width: 280px;
  overflow: hidden;
}
#nbHoverCard.nb-hover-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Modal & Overlay Hidden Enforcement (Scoped to avoid breaking Tailwind responsive classes) */
#nbLoginOverlay.hidden,
#nbVoucherModal.hidden,
#nbGuestLockModal.hidden,
#adminModal.hidden,
#detailModal.hidden,
#trailerModal.hidden,
#mobileMoreMenu.hidden,
#allServersModal.hidden,
#subServerHubContainer.hidden {
  display: none !important;
}

/* Login Starfield & Overlay */
#nbLoginOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#loginStarfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.nb-login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
  background: rgba(18, 20, 28, 0.88);
  backdrop-filter: blur(32px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.85);
  text-align: center;
}
.nb-form-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px 0;
}
.nb-form-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 20px 0;
}
.nb-input-group {
  margin-bottom: 12px;
}
.nb-input-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}
.nb-input-group input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
}
.nb-btn {
  width: 100%;
  background: var(--accent-white);
  color: #000;
  font-weight: 800;
  font-size: 13px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s ease;
}
.nb-btn:hover {
  background: #e6e6ea;
  transform: scale(1.02);
}
.nb-btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 12px;
  margin-top: 8px;
}
.nb-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-white);
  border-color: rgba(255, 255, 255, 0.2);
}

.row-nav-controls {
  display: none !important;
}

/* ============================================================
   NOBARGASI — WATCH PARTY (NOBAR) REALTIME STYLES
   Apple TV+ Glassmorphism, Floating Reactions & Sync Overlays
   ============================================================ */

/* Floating Reaction Bubbles Animation */
.nobar-floating-reaction {
  position: absolute;
  bottom: 24px;
  font-size: 32px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  animation: nobar-float-reaction 2.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.75));
  z-index: 35;
  will-change: transform, opacity;
}

@keyframes nobar-float-reaction {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5) rotate(0deg);
  }
  12% {
    opacity: 1;
    transform: translateY(-28px) scale(1.25) rotate(-6deg);
  }
  45% {
    transform: translateY(-115px) scale(1.05) rotate(6deg);
  }
  80% {
    opacity: 0.9;
    transform: translateY(-210px) scale(0.95) rotate(-4deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-300px) scale(0.65) rotate(8deg);
  }
}

/* Sync Countdown Overlay Animation */
.nobar-countdown-ring {
  animation: nobar-pulse-ring 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes nobar-pulse-ring {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(245, 185, 66, 0.6);
  }
  70% {
    transform: scale(1.06);
    box-shadow: 0 0 0 24px rgba(245, 185, 66, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(245, 185, 66, 0);
  }
}

/* Chat Messages */
.nobar-chat-bubble {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 11.5px;
  line-height: 1.45;
  word-break: break-word;
  animation: nobar-fade-slide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.nobar-chat-me {
  background: rgba(147, 51, 234, 0.32);
  border: 1px solid rgba(192, 132, 252, 0.35);
  color: #ffffff;
  margin-left: 24px;
  border-bottom-right-radius: 4px;
}

.nobar-chat-other {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
  margin-right: 24px;
  border-bottom-left-radius: 4px;
}

@keyframes nobar-fade-slide {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Quick Reaction Button */
.nobar-reaction-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nobar-reaction-btn:hover {
  transform: scale(1.35);
}

.nobar-reaction-btn:active {
  transform: scale(0.85);
}

/* Mobile Glass Drawer */
#nobarGlassDrawer {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#nobarGlassDrawer.drawer-closed {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

#nobarGlassDrawer.drawer-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}


