/* ============================================================
   NETFLIX CLONE – Premium UI
   ============================================================ */

/* ===== RESET & TOKENS ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --netflix-red: #E50914;
  --netflix-red-dark: #b20710;
  --netflix-red-hover: #f40612;
  --bg-dark: #141414;
  --bg-card: #1a1a1a;
  --bg-overlay: rgba(0, 0, 0, 0.75);
  --text-white: #ffffff;
  --text-light: #d2d2d2;
  --text-muted: #999999;
  --match-green: #46d369;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --navbar-h: 68px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --transition-fast: 150ms ease;
  --transition-med: 250ms ease;
  --transition-slow: 350ms ease;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.8);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  height: var(--navbar-h);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
  transition: background var(--transition-slow), box-shadow var(--transition-slow);
}

.navbar.scrolled {
  background: #141414;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* ---- Logo ---- */
.navbar-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

/* Real Netflix PNG/SVG Wordmark */
.netflix-wordmark {
  width: 104px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: brightness(1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
  transition: opacity var(--transition-fast);
}

.logo-link:hover .netflix-wordmark {
  opacity: 0.88;
}

/* ---- Nav Links ---- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.nav-link {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
  transition: color var(--transition-fast);
  white-space: nowrap;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-white);
  transform: scaleX(0);
  transition: transform var(--transition-med);
  border-radius: 1px;
}

.nav-link:hover {
  color: var(--text-white);
}

.nav-link.active {
  color: var(--text-white);
  font-weight: 600;
}

/* ---- Navbar Right ---- */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  position: relative;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn:hover {
  opacity: 0.85;
  transform: scale(1.08);
  background: none;
}

.kids-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  padding: 2px 6px;
  border-radius: 2px;
}

.notif-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  background: var(--netflix-red);
  border-radius: 50%;
  border: 1.5px solid #141414;
}

/* Profile Menu */
.profile-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  transition: opacity var(--transition-fast);
}

.profile-avatar:hover {
  opacity: 0.85;
}

/* SVG caret replaces fa-caret-down */
.profile-caret-svg {
  flex-shrink: 0;
  transition: transform var(--transition-med);
  opacity: 0.85;
}

.profile-menu:hover .profile-caret-svg {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  right: -10px;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  min-width: 220px;
  padding: 6px 0 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-med);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

/* Dropdown arrow pointer */
.profile-dropdown::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 22px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid rgba(255, 255, 255, 0.15);
}

.profile-dropdown::after {
  content: '';
  position: absolute;
  top: -6px;
  right: 23px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(0, 0, 0, 0.9);
}

/* Profile row at top of dropdown */
.profile-dropdown-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 10px;
}

.dropdown-avatar {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-dropdown-profile-row span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-white);
}

.profile-dropdown-item {
  padding: 9px 16px;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color var(--transition-fast);
}

.profile-dropdown-item i {
  width: 16px;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.8;
}

.profile-dropdown-item:hover {
  color: var(--text-white);
}

.profile-dropdown-item.sign-out {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.83rem;
  justify-content: center;
  border-top: none;
  margin-top: 2px;
}

.profile-dropdown-item.sign-out:hover {
  color: #fff;
}

.profile-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 6px 16px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero-video-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-fallback-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 50%, #0d0d0d 100%);
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      rgba(20, 20, 20, 0.95) 0%,
      rgba(20, 20, 20, 0.7) 40%,
      rgba(20, 20, 20, 0.2) 65%,
      rgba(20, 20, 20, 0) 100%),
    linear-gradient(to top,
      rgba(20, 20, 20, 0.8) 0%,
      rgba(20, 20, 20, 0) 30%);
  z-index: 1;
}

.hero-content {
  position: absolute;
  bottom: 25%;
  left: 4%;
  z-index: 10;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: heroFadeIn 1s ease forwards;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-badge,
.hero-top10 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
}

.hero-top10 {
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}

.netflix-n {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
  color: var(--text-light);
  line-height: 1.5;
  max-width: 420px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-match {
  color: var(--match-green);
  font-weight: 700;
  font-size: 0.95rem;
}

.hero-year,
.hero-seasons {
  font-size: 0.88rem;
  color: var(--text-light);
}

.hero-rating {
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 1px 6px;
  font-size: 0.8rem;
  color: var(--text-light);
  border-radius: 2px;
}

.hero-hd {
  font-size: 0.8rem;
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-play,
.btn-more-info {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-main);
  padding: 10px 24px;
  cursor: pointer;
  transition: all var(--transition-med);
  white-space: nowrap;
}

.btn-play {
  background: var(--text-white);
  color: #000;
}

.btn-play:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.03);
}

.btn-more-info {
  background: rgba(109, 109, 110, 0.7);
  color: var(--text-white);
  backdrop-filter: blur(4px);
}

.btn-more-info:hover {
  background: rgba(109, 109, 110, 0.5);
  transform: scale(1.03);
}

.hero-controls-right {
  position: absolute;
  right: 0;
  bottom: 28%;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 10;
}

.hero-mute-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-med);
  backdrop-filter: blur(4px);
}

.hero-mute-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
  border-color: #fff;
}

/* Maturity Rating Badge (top right of hero) */
.hero-rating-badge {
  border-left: 3px solid #dcdcdc;
  background: rgba(0, 0, 0, 0.4);
}

.maturity-rating {
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.2;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.5);
}

.maturity-rating span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
}

/* Hero Bottom Fade */
.hero-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to top, var(--bg-dark) 0%, transparent 100%);
  z-index: 2;
}

/* ============================================================
   CONTENT ROWS
   ============================================================ */
.content-rows {
  position: relative;
  z-index: 5;
  padding-bottom: 60px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-dark) 5%);
  /* Never clip vertically — hover cards must overflow freely */
  overflow: visible;
}

.content-row {
  padding: 0 4%;
  margin-bottom: 44px;
  /* Allow hover cards to overflow vertically */
  overflow: visible;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.row-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.row-title:hover {
  color: #aaa;
}

.explore-all {
  font-size: 0.85rem;
  color: #54b9c5;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-med);
  white-space: nowrap;
}

.content-row:hover .explore-all {
  opacity: 1;
  transform: translateX(0);
}

.explore-all:hover {
  color: #fff;
}

/* ---- Slider Container ---- */
.row-slider-container {
  position: relative;
  /* Must NOT clip overflow — hover panel lives here */
  overflow: visible;
}

.row-slider {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /*
   * The overflow-y trick:
   * CSS won't let you have overflow-x:auto + overflow-y:visible.
   * Instead, add large padding-bottom so hover cards have room,
   * then cancel it with negative margin-bottom — net visual = zero.
   * This lets the expanded card + info panel appear fully in view.
   */
  padding: 32px 0 220px 0;
  margin-bottom: -200px;
}

.row-slider::-webkit-scrollbar {
  display: none;
}

/* ---- Slider Arrows ---- */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 44px;
  height: 100%;
  max-height: 120px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity var(--transition-med), background var(--transition-fast);
  backdrop-filter: blur(4px);
}

.slider-arrow:hover {
  background: rgba(0, 0, 0, 0.9);
}

.row-slider-container:hover .slider-arrow {
  opacity: 1;
}

.slider-arrow-left {
  left: -44px;
}

.slider-arrow-right {
  right: -44px;
}

/* ============================================================
   MOVIE CARDS
   ============================================================ */
.movie-card {
  flex-shrink: 0;
  width: 215px;
  scroll-snap-align: start;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-slow), z-index 0s;
  border-radius: var(--radius-sm);
  overflow: visible;
}

.movie-card:hover {
  transform: scale(1.28);
  z-index: 100;
  transition: transform var(--transition-slow) 300ms;
}

/* Ensure first and last cards expand inward */
.movie-card:first-child:hover {
  transform: scale(1.28) translateX(10%);
}

.movie-card:last-child:hover {
  transform: scale(1.28) translateX(-10%);
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0a0a0a;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow), opacity 0.4s ease;
  opacity: 0;
  background: #1a1a1a;
}

.card-image-wrapper img.loaded,
.card-image-wrapper img[complete] {
  opacity: 1;
}

/* Ensure img shows when loaded — via JS or natively */
.card-image-wrapper img {
  opacity: 1;
  /* Fallback for browsers that don't fire load event */
}

.movie-card:hover .card-image-wrapper {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  box-shadow: var(--shadow-hover);
}

.movie-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 4px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-fast);
}

.movie-card:hover .card-title {
  display: none;
}

/* ================================================================
   NETFLIX HOVER PANEL — slides down from below the image
   The overlay is a sibling of .card-image-wrapper inside .movie-card
   .movie-card has position:relative & overflow:visible
   The image-wrapper has aspect-ratio 16/9, so its height = width*(9/16)
   We position the overlay at top = 56.25% of the card width (= image height)
   ================================================================ */
.card-hover-overlay {
  position: absolute;
  top: 56.25%;
  /* = 9/16 × 100% — sits right below the 16:9 image */
  left: 0;
  right: 0;
  background: #181818;
  border-radius: 0 0 6px 6px;
  padding: 12px 12px 14px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.2s ease 0.35s,
    transform 0.22s ease 0.35s,
    visibility 0s linear 0.57s;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
  z-index: 10;
}

.movie-card:hover .card-hover-overlay {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.2s ease 0.35s,
    transform 0.25s ease 0.35s,
    visibility 0s linear 0.35s;
}

/* ---- Top row: play + action buttons ---- */
.card-hover-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.push-right {
  margin-left: auto !important;
}

/* All circular icon buttons */
.card-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(36, 36, 36, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.card-icon-btn:hover {
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(65, 65, 65, 0.95);
  transform: scale(1.12);
}

/* ▶ Play — solid white circle */
.play-icon {
  background: #fff !important;
  border-color: #fff !important;
  color: #000 !important;
  font-size: 0.82rem;
}

.play-icon:hover {
  background: rgba(255, 255, 255, 0.88) !important;
}

/* ⌄ Chevron — slightly smaller */
.info-icon i {
  font-size: 0.7rem;
}

/* ---- Info area ---- */
.card-hover-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-match {
  color: #46d369;
  font-weight: 700;
  font-size: 0.75rem;
}

.card-rating {
  font-size: 0.63rem;
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  color: #d2d2d2;
  white-space: nowrap;
}

.card-duration {
  font-size: 0.72rem;
  color: #d2d2d2;
}

.card-hd {
  font-size: 0.62rem;
  color: #d2d2d2;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* "Recently Added" pill — matches the red badge in your screenshot */
.card-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  background: #E50914;
  /* Netflix Red */
  border-radius: 4px;
  padding: 3px 8px;
  letter-spacing: 0.3px;
  width: fit-content;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.card-genres {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.card-genres span {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.7);
}

.card-genres .dot {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.5rem;
}


/* ============================================================
   NUMBERED (TRENDING) CARDS
   ============================================================ */
.numbered-card {
  display: flex;
  align-items: flex-end;
  padding-left: 20px;
  width: 260px;
}

.rank-number {
  font-size: 10rem;
  font-weight: 800;
  line-height: 0.8;
  color: #000;
  -webkit-text-stroke: 4px #595959;
  margin-right: -24px;
  flex-shrink: 0;
  user-select: none;
  transition: -webkit-text-stroke-color var(--transition-fast);
  z-index: 0;
}

.numbered-card:hover .rank-number {
  -webkit-text-stroke-color: #777;
}

.numbered-card .card-image-wrapper {
  flex: 1;
  z-index: 1;
  min-width: 150px;
}

/* ============================================================
   PROGRESS (CONTINUE WATCHING) CARDS
   ============================================================ */
.progress-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 5;
}

.progress-bar {
  height: 100%;
  background: var(--netflix-red);
  border-radius: 0 1px 1px 0;
  transition: width 0.5s ease;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-dark);
  padding: 60px 4% 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-social {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}

.social-icon {
  color: var(--text-light);
  font-size: 1.5rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.social-icon:hover {
  color: var(--text-white);
  transform: scale(1.15);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--transition-fast), text-decoration var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text-white);
  text-decoration: underline;
}

.footer-service-code {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
  padding: 6px 12px;
  border-radius: 2px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.footer-service-code:hover {
  color: var(--text-white);
  border-color: var(--text-white);
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .logo-text {
    font-size: 1.6rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    max-width: 420px;
  }
}

@media (max-width: 768px) {
  .hero-content {
    bottom: 20%;
    max-width: 90%;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 0.88rem;
  }

  .hero-rating-badge {
    display: none;
  }

  .row-title {
    font-size: 1.1rem;
  }

  .movie-card {
    width: 160px;
  }

  .numbered-card {
    width: 200px;
  }

  .rank-number {
    font-size: 5rem;
  }

  .content-row {
    padding: 0 3%;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-play,
  .btn-more-info {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0 3%;
  }

  .hero-content {
    bottom: 18%;
    gap: 8px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-buttons {
    gap: 8px;
  }

  .movie-card {
    width: 130px;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .kids-text {
    display: none;
  }
}

/* ============================================================
   IMAGE FALLBACK (broken/slow images)
   ============================================================ */
.img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  z-index: 1;
}

.img-fallback span {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  padding: 0 8px;
  letter-spacing: 0.5px;
}

/* Portrait TMDB posters: show top of image (title area) in 16:9 crop */
.card-image-wrapper img {
  object-position: center top;
}