/* ═════════════════════════════════════════════════════════════════════
   NETFLIX DESIGN SYSTEM & TOKENS — CineStream
   ═════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --nf-black:        #141414;
  --nf-dark:         #181818;
  --nf-card-bg:      #202020;
  --nf-modal-bg:     #181818;
  --nf-elevated:     #2f2f2f;
  --nf-red:          #E50914;
  --nf-red-hover:    #b81d24;
  --nf-red-glow:     rgba(229, 9, 20, 0.4);
  --nf-white:        #ffffff;
  --nf-light-gray:   #e5e5e5;
  --nf-gray:         #b3b3b3;
  --nf-dark-gray:    #808080;
  --nf-gold:         #46d369; /* Netflix Match Green */
  --nf-gold-star:    #f5c518;
  --nf-border:       rgba(255, 255, 255, 0.12);
  --nf-nav-h:        68px;
  --nf-radius-sm:    4px;
  --nf-radius:       6px;
  --nf-radius-lg:    12px;
  --font:            'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-logo:       'Bebas Neue', Impact, sans-serif;
  --transition:      0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --hover-transition: 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

html {
  scroll-behavior: smooth;
  background-color: var(--nf-black);
}

body {
  font-family: var(--font);
  background-color: var(--nf-black);
  color: var(--nf-light-gray);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ═════════════════════════════════════════════════════════════════════
   NETFLIX NAVBAR
   ═════════════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nf-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  transition: background-color 0.4s ease;
}

.navbar.scrolled {
  background-color: var(--nf-black);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-n {
  font-family: var(--font-logo);
  font-size: 2.4rem;
  color: var(--nf-red);
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
  letter-spacing: -1px;
}

.logo-text {
  font-family: var(--font-logo);
  font-size: 1.7rem;
  color: var(--nf-red);
  letter-spacing: 1.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link {
  color: var(--nf-light-gray);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 400;
  transition: color var(--transition), font-weight var(--transition);
}

.nav-link:hover {
  color: var(--nf-gray);
}

.nav-link.active {
  color: var(--nf-white);
  font-weight: 700;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Netflix Expandable Search */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-btn {
  background: transparent;
  border: none;
  color: var(--nf-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: transform var(--transition);
}

.search-icon-btn svg {
  width: 20px;
  height: 20px;
}

.search-input {
  width: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--nf-white);
  color: var(--nf-white);
  font-family: var(--font);
  font-size: 0.88rem;
  padding: 6px 10px 6px 36px;
  outline: none;
  transition: width 0.35s ease, opacity 0.35s ease;
  position: absolute;
  right: 0;
  z-index: 10;
}

.search-input.open {
  width: 260px;
  opacity: 1;
  pointer-events: all;
  position: relative;
}

.search-input::placeholder {
  color: var(--nf-dark-gray);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-height: 480px;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
  overflow-y: auto;
  display: none;
  z-index: 2000;
}

.search-results.open {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color var(--transition);
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-result-poster {
  width: 44px;
  height: 62px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.search-result-icon {
  width: 44px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nf-card-bg);
  border-radius: 4px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
  overflow: hidden;
}

.search-result-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--nf-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-size {
  font-size: 0.75rem;
  color: var(--nf-gray);
  margin-top: 2px;
}

.search-quality-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(229, 9, 20, 0.2);
  color: #ff6b6b;
  border-radius: 3px;
  padding: 2px 6px;
  flex-shrink: 0;
}

.search-no-results {
  padding: 24px;
  text-align: center;
  color: var(--nf-gray);
  font-size: 0.88rem;
}

/* Nav Icon Buttons & Badges */
.nav-icon-btn {
  background: transparent;
  border: none;
  color: var(--nf-white);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.nav-icon-btn svg {
  width: 20px;
  height: 20px;
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--nf-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notifications Dropdown */
.notifications-wrapper {
  position: relative;
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 320px;
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid var(--nf-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
  display: none;
  z-index: 2000;
}

.notifications-dropdown.open {
  display: block;
}

.notif-header {
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  border-bottom: 1px solid var(--nf-border);
  color: var(--nf-white);
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background-color var(--transition);
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notif-img {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notif-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nf-white);
}

.notif-desc {
  font-size: 0.74rem;
  color: var(--nf-gray);
  margin-top: 2px;
  line-height: 1.3;
}

.notif-time {
  font-size: 0.68rem;
  color: var(--nf-dark-gray);
  margin-top: 4px;
}

/* Profile Avatar & Dropdown */
.profile-wrapper {
  position: relative;
}

.nav-avatar-btn {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.avatar-caret {
  color: var(--nf-white);
  font-size: 0.6rem;
  transition: transform var(--transition);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 200px;
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid var(--nf-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
  display: none;
  z-index: 2000;
  padding: 10px 0;
}

.profile-dropdown.open {
  display: block;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--nf-white);
  font-size: 0.85rem;
  cursor: pointer;
}

.profile-icon-sm {
  width: 24px;
  height: 24px;
  border-radius: 3px;
}

.profile-divider {
  height: 1px;
  background: var(--nf-border);
  margin: 8px 0;
}

.profile-link {
  display: block;
  padding: 8px 16px;
  color: var(--nf-light-gray);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color var(--transition);
}

.profile-link:hover {
  color: var(--nf-white);
  text-decoration: underline;
}

/* ═════════════════════════════════════════════════════════════════════
   NETFLIX BILLBOARD (HERO SECTION)
   ═════════════════════════════════════════════════════════════════════ */
.billboard {
  position: relative;
  height: 85vh;
  min-height: 600px;
  max-height: 880px;
  display: flex;
  align-items: flex-end;
  padding: 0 4% 11%;
  overflow: hidden;
  margin-bottom: -4vw;
  z-index: 1;
}

.billboard-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  transition: background-image 0.8s ease-in-out;
  transform: scale(1.02);
}

.billboard-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(77deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.45) 45%, transparent 85%),
    linear-gradient(180deg, rgba(20,20,20,0.4) 0%, transparent 20%, transparent 60%, var(--nf-black) 100%);
}

.billboard-content {
  position: relative;
  z-index: 5;
  max-width: 620px;
  animation: heroFadeIn 0.8s ease;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.billboard-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.netflix-badge-n {
  font-family: var(--font-logo);
  font-size: 1.4rem;
  color: var(--nf-red);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.netflix-badge-text {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--nf-white);
  text-transform: uppercase;
}

.billboard-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--nf-white);
  margin-bottom: 14px;
  text-shadow: 2px 4px 14px rgba(0, 0, 0, 0.9);
}

.billboard-top10 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.top10-badge {
  background: var(--nf-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  padding: 3px 5px;
  border-radius: 2px;
  letter-spacing: -0.5px;
}

.top10-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--nf-white);
  text-shadow: 1px 2px 8px rgba(0,0,0,0.8);
}

.billboard-desc {
  font-size: 1.05rem;
  color: var(--nf-white);
  line-height: 1.45;
  margin-bottom: 24px;
  text-shadow: 1px 2px 6px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Netflix Play & More Info Buttons */
.btn-netflix-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--nf-white);
  color: #000;
  border: none;
  padding: 11px 28px;
  border-radius: var(--nf-radius-sm);
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-netflix-play svg {
  width: 24px;
  height: 24px;
}

.btn-netflix-play:hover {
  background-color: rgba(255, 255, 255, 0.75);
  transform: scale(1.02);
}

.btn-netflix-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: rgba(109, 109, 110, 0.7);
  color: var(--nf-white);
  border: none;
  padding: 11px 26px;
  border-radius: var(--nf-radius-sm);
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-netflix-info svg {
  width: 24px;
  height: 24px;
}

.btn-netflix-info:hover {
  background-color: rgba(109, 109, 110, 0.4);
  transform: scale(1.02);
}

.billboard-right-meta {
  position: absolute;
  right: 0;
  bottom: 11%;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
}

.billboard-replay-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--nf-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition);
}

.billboard-replay-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.billboard-replay-btn svg {
  width: 18px;
  height: 18px;
}

.maturity-badge {
  background: rgba(51, 51, 51, 0.6);
  border-left: 3px solid var(--nf-light-gray);
  color: var(--nf-white);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 16px 6px 12px;
}

.billboard-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--nf-border);
  color: var(--nf-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease, background-color var(--transition);
}

.billboard:hover .billboard-nav {
  opacity: 1;
}

.billboard-nav:hover {
  background: rgba(229, 9, 20, 0.8);
}

.billboard-nav.prev { left: 1.5%; }
.billboard-nav.next { right: 1.5%; }

.billboard-dots {
  position: absolute;
  bottom: 2.5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.billboard-dot {
  width: 12px;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition), width var(--transition);
}

.billboard-dot.active {
  background: var(--nf-white);
  width: 24px;
}

/* ═════════════════════════════════════════════════════════════════════
   NETFLIX MULTI-ROW SLIDERS
   ═════════════════════════════════════════════════════════════════════ */
.netflix-container {
  padding: 0 4% 80px;
  position: relative;
  z-index: 2;
}

.netflix-row {
  margin-bottom: 3.2vw;
  position: relative;
}

.row-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.8em;
}

.row-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.1rem, 1.4vw, 1.45rem);
  font-weight: 700;
  color: var(--nf-light-gray);
  cursor: pointer;
}

.row-explore {
  font-size: 0.82rem;
  font-weight: 700;
  color: #54b9c5;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}

.row-header:hover .row-explore {
  opacity: 1;
  transform: translateX(0);
}

.row-indicators {
  display: flex;
  gap: 2px;
}

.row-indicator-dash {
  width: 12px;
  height: 2px;
  background: #4d4d4d;
}

.row-indicator-dash.active {
  background: #aaa;
}

/* Slider Track & Chevrons */
.slider-wrapper {
  position: relative;
}

.slider-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 24px 0 36px;
  margin: -24px 0 -36px;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Hide scrollbar for clean Netflix look */
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slider-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4%;
  min-width: 42px;
  background: rgba(20, 20, 20, 0.7);
  color: var(--nf-white);
  border: none;
  font-size: 2.5rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.2s ease;
}

.slider-wrapper:hover .slider-btn {
  opacity: 1;
}

.slider-btn:hover {
  background: rgba(20, 20, 20, 0.95);
  color: var(--nf-white);
}

.slider-btn.prev { left: -4%; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.slider-btn.next { right: -4%; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }

/* ═════════════════════════════════════════════════════════════════════
   NETFLIX MEDIA CARDS & HOVER EXPANSION
   ═════════════════════════════════════════════════════════════════════ */
.netflix-card {
  flex: 0 0 calc((100% - (5 * 8px)) / 6);
  min-width: 170px;
  aspect-ratio: 2/3;
  border-radius: var(--nf-radius-sm);
  background-color: var(--nf-card-bg);
  position: relative;
  cursor: pointer;
  transition: transform var(--hover-transition), box-shadow var(--hover-transition);
  transform-origin: center center;
}

@media (max-width: 1400px) {
  .netflix-card { flex: 0 0 calc((100% - (4 * 8px)) / 5); }
}
@media (max-width: 1100px) {
  .netflix-card { flex: 0 0 calc((100% - (3 * 8px)) / 4); }
}
@media (max-width: 768px) {
  .netflix-card { flex: 0 0 calc((100% - (2 * 8px)) / 3); min-width: 130px; }
}

.netflix-card:hover {
  transform: scale(1.16) translateY(-10px);
  z-index: 50;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85);
}

.card-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--nf-radius-sm);
  display: block;
  background-color: var(--nf-elevated);
}

.card-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f1f1f 0%, #292929 100%);
  border-radius: var(--nf-radius-sm);
  padding: 10px;
  text-align: center;
}

.placeholder-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
  opacity: 0.6;
}

.placeholder-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nf-light-gray);
  line-height: 1.2;
}

/* Quick Hover Overlay with Actions */
.card-hover-info {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20, 20, 20, 0.95) 85%);
  border-radius: var(--nf-radius-sm);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  transition: opacity var(--transition);
}

.netflix-card:hover .card-hover-info {
  opacity: 1;
}

.card-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.quick-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(42, 42, 42, 0.8);
  color: var(--nf-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.quick-btn:hover {
  border-color: var(--nf-white);
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.quick-btn.play-btn {
  background: var(--nf-white);
  color: #000;
  border: none;
}

.quick-btn.play-btn:hover {
  background: rgba(255, 255, 255, 0.85);
}

.quick-btn.more-btn {
  margin-left: auto;
}

.card-quick-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--nf-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.card-quick-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
}

.quick-match {
  color: var(--nf-gold);
  font-weight: 700;
}

.quick-badge {
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1px 4px;
  font-size: 0.62rem;
  border-radius: 2px;
}

.card-quick-genres {
  font-size: 0.68rem;
  color: var(--nf-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

/* ═════════════════════════════════════════════════════════════════════
   NETFLIX TOP 10 NUMBERED ROW
   ═════════════════════════════════════════════════════════════════════ */
.top10-track .netflix-card {
  display: flex;
  aspect-ratio: auto;
  min-width: 220px;
  height: 200px;
  background: transparent;
}

.top10-card-wrap {
  display: flex;
  align-items: center;
  position: relative;
  flex: 0 0 220px;
  cursor: pointer;
  transition: transform var(--hover-transition);
}

.top10-card-wrap:hover {
  transform: scale(1.14) translateY(-8px);
  z-index: 50;
}

.top10-number {
  font-family: var(--font-logo);
  font-size: 9.5rem;
  font-weight: 900;
  line-height: 0.75;
  color: #000;
  -webkit-text-stroke: 4px #595959;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
  position: relative;
  z-index: 1;
  margin-right: -24px;
  user-select: none;
}

.top10-poster {
  width: 130px;
  height: 190px;
  border-radius: var(--nf-radius-sm);
  object-fit: cover;
  position: relative;
  z-index: 2;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
}

/* ═════════════════════════════════════════════════════════════════════
   INFINITE SCROLL GRID SECTION
   ═════════════════════════════════════════════════════════════════════ */
.netflix-infinite-section {
  margin-top: 4vw;
}

.infinite-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.infinite-count {
  font-size: 0.88rem;
  color: var(--nf-dark-gray);
}

.netflix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

/* ═════════════════════════════════════════════════════════════════════
   BROWSER / CATEGORY VIEW
   ═════════════════════════════════════════════════════════════════════ */
.browser-view, .mylist-view {
  padding: calc(var(--nf-nav-h) + 24px) 4% 80px;
  min-height: 100vh;
}

.browser-header {
  margin-bottom: 2rem;
}

.browser-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 1.2rem;
}

.browser-main-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--nf-white);
}

.mylist-subtitle {
  font-size: 0.95rem;
  color: var(--nf-gray);
  margin-top: 6px;
}

.browser-type-tabs {
  display: flex;
  gap: 10px;
}

.type-tab {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--nf-border);
  color: var(--nf-gray);
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.type-tab:hover {
  color: var(--nf-white);
  background: rgba(255, 255, 255, 0.16);
}

.type-tab.active {
  background: var(--nf-red);
  border-color: var(--nf-red);
  color: var(--nf-white);
}

.cat-tabs-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cat-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--nf-gray);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.cat-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--nf-white);
}

.cat-tab.active {
  background: rgba(229, 9, 20, 0.25);
  border-color: var(--nf-red);
  color: var(--nf-white);
}

.browse-count-label {
  font-size: 0.85rem;
  color: var(--nf-dark-gray);
}

.browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 40px 0 20px;
  flex-wrap: wrap;
}

.pg-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--nf-light-gray);
  padding: 8px 14px;
  border-radius: var(--nf-radius-sm);
  font-size: 0.88rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 40px;
}

.pg-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  color: var(--nf-white);
}

.pg-btn.active {
  background: var(--nf-red);
  border-color: var(--nf-red);
  color: var(--nf-white);
  font-weight: 700;
}

.pg-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pg-ellipsis {
  color: var(--nf-dark-gray);
  padding: 0 4px;
}

/* ═════════════════════════════════════════════════════════════════════
   NETFLIX "MORE INFO" DETAIL MODAL
   ═════════════════════════════════════════════════════════════════════ */
.netflix-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.netflix-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.netflix-modal {
  width: 100%;
  max-width: 850px;
  background: var(--nf-modal-bg);
  border-radius: var(--nf-radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
  margin-top: auto;
  margin-bottom: auto;
}

.netflix-modal-overlay.open .netflix-modal {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #181818;
  border: none;
  color: var(--nf-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color var(--transition);
}

.modal-close-btn:hover {
  background: #2a2a2a;
}

.modal-close-btn svg {
  width: 18px;
  height: 18px;
}

/* Modal Hero */
.modal-hero {
  position: relative;
  height: 420px;
  display: flex;
  align-items: flex-end;
  padding: 0 40px 40px;
  overflow: hidden;
}

.modal-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.modal-hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(24, 24, 24, 0.8) 70%, var(--nf-modal-bg) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.6) 0%, transparent 60%);
}

.modal-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.modal-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: var(--nf-white);
  margin-bottom: 16px;
  text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.9);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-round-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(42, 42, 42, 0.7);
  color: var(--nf-white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), background-color var(--transition);
}

.modal-round-btn:hover {
  border-color: var(--nf-white);
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

.modal-round-btn svg {
  width: 20px;
  height: 20px;
}

/* Modal Body */
.modal-body {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  padding: 24px 40px 32px;
}

@media (max-width: 768px) {
  .modal-body { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .modal-hero { height: 300px; padding: 20px; }
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.match-score {
  color: var(--nf-gold);
  font-weight: 800;
}

.modal-year {
  color: var(--nf-gray);
}

.maturity-pill {
  border: 1px solid var(--nf-dark-gray);
  padding: 1px 6px;
  font-size: 0.75rem;
  border-radius: 2px;
  color: var(--nf-light-gray);
}

.modal-duration {
  color: var(--nf-gray);
}

.quality-badge {
  border: 1px solid var(--nf-dark-gray);
  padding: 1px 6px;
  font-size: 0.68rem;
  border-radius: 2px;
  font-weight: 700;
  color: var(--nf-white);
}

.modal-overview {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--nf-light-gray);
}

.modal-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.85rem;
}

.modal-info-item {
  line-height: 1.4;
}

.info-label {
  color: var(--nf-dark-gray);
  margin-right: 6px;
}

.info-value {
  color: var(--nf-white);
}

/* Modal Recommendations (More Like This) */
.modal-recommendations {
  padding: 0 40px 40px;
}

.rec-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--nf-white);
  margin-bottom: 16px;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .rec-grid { grid-template-columns: repeat(2, 1fr); }
}

.rec-card {
  background: var(--nf-card-bg);
  border-radius: var(--nf-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition);
}

.rec-card:hover {
  transform: scale(1.03);
}

.rec-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background-color: var(--nf-elevated);
}

.rec-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rec-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.rec-card:hover .rec-play-overlay {
  opacity: 1;
}

.rec-play-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.8);
  border: 2px solid var(--nf-white);
  color: var(--nf-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-play-circle svg {
  width: 20px;
  height: 20px;
}

.rec-info {
  padding: 14px;
}

.rec-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rec-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--nf-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.rec-desc {
  font-size: 0.78rem;
  color: var(--nf-gray);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═════════════════════════════════════════════════════════════════════
   NETFLIX VIDEO PLAYER MODAL
   ═════════════════════════════════════════════════════════════════════ */
.player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.player-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.player-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #000;
}

.player-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.player-container:hover .player-top-bar,
.player-container.paused .player-top-bar {
  opacity: 1;
}

.player-back-btn {
  background: transparent;
  border: none;
  color: var(--nf-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: transform var(--transition);
}

.player-back-btn:hover {
  transform: scale(1.2);
}

.player-back-btn svg {
  width: 28px;
  height: 28px;
}

.player-top-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--nf-white);
  margin-left: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-top-actions {
  margin-left: auto;
}

.player-top-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--nf-border);
  color: var(--nf-white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition);
}

.player-top-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.player-top-btn svg {
  width: 20px;
  height: 20px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#video-player {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  object-fit: contain;
  background: #000;
}

/* Netflix Video Custom Controls */
.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 30px 24px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, transparent 100%);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-wrapper:hover .custom-controls,
.video-wrapper.paused .custom-controls {
  opacity: 1;
}

.progress-container {
  padding: 12px 0 16px;
  cursor: pointer;
  position: relative;
}

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  transition: height 0.2s ease;
  border-radius: 2px;
}

.progress-container:hover .progress-bar {
  height: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--nf-red);
  width: 0%;
  border-radius: 2px;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--nf-red);
  box-shadow: 0 0 8px var(--nf-red-glow);
  opacity: 0;
  transition: opacity 0.2s ease;
  left: 0%;
}

.progress-container:hover .progress-thumb {
  opacity: 1;
}

.time-tooltip {
  position: absolute;
  bottom: 30px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  display: none;
  transform: translateX(-50%);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--nf-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: transform var(--transition);
}

.ctrl-btn:hover {
  transform: scale(1.2);
}

.ctrl-btn svg {
  width: 26px;
  height: 26px;
}

.volume-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.time-display {
  font-size: 0.88rem;
  color: var(--nf-light-gray);
  font-weight: 500;
}

.time-sep {
  color: var(--nf-dark-gray);
}

.quality-select {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--nf-border);
  color: var(--nf-white);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--nf-radius-sm);
  cursor: pointer;
  outline: none;
}

.quality-select option {
  background: #222;
}

/* ═════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS & SPINNERS
   ═════════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(24, 24, 24, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-radius);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--nf-white);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 260px;
}

.toast.error { border-left: 3px solid var(--nf-red); }
.toast.success { border-left: 3px solid #46d369; }
.toast.info { border-left: 3px solid #4a9eff; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--nf-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeletons */
.skeleton-card {
  flex: 0 0 calc((100% - (5 * 8px)) / 6);
  min-width: 170px;
  aspect-ratio: 2/3;
  border-radius: var(--nf-radius-sm);
  background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ═════════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .billboard { height: 70vh; padding-bottom: 14%; }
  .billboard-title { font-size: 2.2rem; }
  .billboard-desc { font-size: 0.92rem; -webkit-line-clamp: 2; }
}
