/* ─── RESET & BASE ─────────────────────────────────────────── */
:root {
  --primary: #7c3aed;
  --primary-hover: #9061f9;
  --primary-glow: rgba(124, 58, 237, 0.4);
  --bg-dark: #09090b;
  --bg-card: #18181b;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --border-color: rgba(255, 255, 255, 0.08);
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --bg-header: rgba(9, 9, 11, 0.92);
  --bg-footer: #060608;
  --hero-overlay: linear-gradient(to top, var(--bg-dark) 15%, rgba(9, 9, 11, 0.4) 70%, rgba(9, 9, 11, 0.8) 100%);
}

body.light-mode {
  --bg-dark: #f4f4f5;
  --bg-card: #ffffff;
  --text-main: #09090b;
  --text-muted: #52525b;
  --border-color: rgba(9, 9, 11, 0.08);
  --bg-header: rgba(244, 244, 245, 0.92);
  --bg-footer: #e4e4e7;
  --hero-overlay: linear-gradient(to top, var(--bg-dark) 15%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0.6) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.5;
  transition: background var(--transition-smooth), color var(--transition-smooth);
  -webkit-overflow-scrolling: touch;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ─── LOGO ───────────────────────────────────────────────── */
.logo-img { height: 32px; width: auto; object-fit: contain; }

/* ─── HEADER ─────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 5%;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}

.header-left { display: flex; align-items: center; flex: 1; justify-content: flex-start; }
.header-center { display: flex; align-items: center; justify-content: center; }
.header-right { display: flex; align-items: center; flex: 1; justify-content: flex-end; }

.theme-toggle {
  background: transparent;
  border: none;
  width: auto;
  height: auto;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--text-main);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text-main);
}

.globe-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}
.globe-toggle:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--primary);
}
.globe-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text-main);
}

/* Language Dropdown */
.language-dropdown {
  position: relative;
}
.globe-toggle {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #ffffff;
}
.globe-toggle svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}
.language-list {
  position: absolute;
  right: 0;
  top: 45px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 0;
  width: 150px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1100;
  display: none;
}
.language-list.open { display: block; }
.language-list button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  padding: 8px 16px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.language-list button:hover { background: rgba(124, 58, 237, 0.15); color: var(--primary-hover); }

/* ─── SLIDE MENU ─────────────────────────────────────────── */
.slide-menu-overlay,
.slide-menu {
  display: none; /* No slide menu now */
}

/* ─── FLOATING BOTTOM NAVIGATION BAR ─────────────────────── */
#bottomNav {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 460px);
  height: 62px;
  background: rgba(18, 18, 22, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 2000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  padding: 0 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
body.light-mode #bottomNav {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
body.no-nav #bottomNav { display: none; }

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 48px;
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  padding: 2px 0;
}
.nav-item:hover { color: var(--text-main); }
.nav-item.active {
  color: #ffffff;
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.4);
}
body.light-mode .nav-item.active {
  color: var(--primary);
  background: rgba(139, 92, 246, 0.15);
}
.nav-item svg {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}
.nav-item.active svg {
  transform: scale(1.08);
}
.nav-item span { font-size: 10px; font-weight: 600; font-family: 'Inter', sans-serif; letter-spacing: 0.2px; }

/* ─── FLOATING SEARCH ────────────────────────────────────── */
.floating-search {
  position: fixed;
  bottom: 80px;
  right: 24px;
  z-index: 900;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.floating-search:hover { transform: scale(1.08); background: var(--primary-hover); }
.floating-search svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
}

/* ─── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  padding: 70px 0 20px;
  background: radial-gradient(circle at 50% 30%, rgba(124, 58, 237, 0.12) 0%, transparent 70%), #09090b;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* Arrow buttons without circular border - clean edge controls */
.hero-arrow {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  z-index: 30;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  padding: 12px 16px;
  transition: transform 0.25s ease, color 0.25s ease, opacity 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.hero-arrow:hover {
  color: #ffffff;
  transform: translateY(-50%) scale(1.2);
}
.hero-arrow-left { left: 4px; }
.hero-arrow-right { right: 4px; }

@media (min-width: 768px) {
  .hero-arrow-left { left: 24px; font-size: 56px; }
  .hero-arrow-right { right: 24px; font-size: 56px; }
}

/* Carousel Container */
.hero-carousel-container {
  width: 100%;
  max-width: 1200px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 200px; /* Default height for mobile */
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 480px) {
  .hero-carousel { height: 250px; }
}
@media (min-width: 768px) {
  .hero-carousel { height: 340px; }
}
@media (min-width: 1024px) {
  .hero-carousel { height: 400px; }
}

/* Banner Card Styling with 3D Overlays */
.banner-card {
  position: absolute;
  width: 72%;
  max-width: 720px;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease, z-index 0.6s ease;
  user-select: none;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.banner-card img.banner-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 2;
}

.banner-card-logo-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10%;
  z-index: 3;
}

.banner-logo-img {
  max-width: 80%;
  max-height: 65%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.9));
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.banner-title-text {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  font-family: 'Playfair Display', serif;
  text-shadow: 0 4px 16px rgba(0,0,0,0.9);
}

@media (min-width: 768px) {
  .banner-title-text { font-size: 36px; }
}

/* 3D Carousel Card Positioning Classes */
.banner-card.active {
  transform: translateX(0) scale(1) translateZ(0);
  opacity: 1;
  z-index: 20;
  filter: brightness(1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(124, 58, 237, 0.2);
}

.banner-card.prev {
  transform: translateX(-42%) scale(0.82) translateZ(-100px);
  opacity: 0.65;
  z-index: 10;
  filter: brightness(0.65);
}

.banner-card.next {
  transform: translateX(42%) scale(0.82) translateZ(-100px);
  opacity: 0.65;
  z-index: 10;
  filter: brightness(0.65);
}

.banner-card.hidden-card {
  transform: translateX(0) scale(0.6) translateZ(-200px);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

/* Hero Details below cards */
.hero-details {
  position: relative;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  padding: 16px 20px 0;
  width: 100%;
}

.hero-overview {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 520px;
}

@media (min-width: 768px) {
  .hero-overview {
    font-size: 15px;
    margin-bottom: 18px;
    -webkit-line-clamp: 3;
  }
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 16px -8px var(--primary-glow); }
.btn-secondary { background: rgba(255, 255, 255, 0.12); color: #fff; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-2px); }

.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  border: none;
  transition: background 0.3s, width 0.3s;
}
.hero-dot.active { background: var(--primary); width: 22px; border-radius: 4px; }
.hero-dot:hover { background: rgba(255,255,255,0.6); }

/* ─── EPISODE RELEASE CARDS ─────────────────────────────── */
.episode-release-card {
  min-width: 240px;
  max-width: 280px;
}
.episode-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #8b5cf6;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.landscape-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── SECTIONS & HORIZONTAL ROWS ─────────────────────────── */
section { padding: 24px 5%; max-width: 1400px; margin: 0 auto; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 4px solid #8b5cf6;
  padding-left: 12px;
}
.section-title { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; font-family: 'Playfair Display', serif; margin: 0; line-height: 1.2; }
.section-subtitle { font-size: 13px; color: var(--text-muted); font-family: 'Inter', sans-serif; font-weight: 400; }

.landscape-featured h2,
.movie-grid-section h2,
.tv-grid-section h2,
.category-movie-grid h2,
.library-section h2 {
  border-left: 4px solid #8b5cf6;
  padding-left: 12px;
  line-height: 1.2;
}
.see-all-btn {
  background: transparent;
  color: var(--primary-hover);
  border: 1px solid var(--border-color);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Playfair Display', serif;
}
.see-all-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.scroll-container-relative {
  position: relative;
  width: 100%;
}

.horizontal-scroll-wrapper {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
}
.horizontal-scroll-wrapper::-webkit-scrollbar { display: none; }

/* Scroll Arrow Navigation Buttons */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(9, 9, 11, 0.85);
  border: 1px solid var(--border-color);
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.25s ease, background 0.2s, transform 0.2s, border-color 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.scroll-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}
.scroll-btn.left {
  left: -14px;
}
.scroll-btn.right {
  right: -14px;
}
.scroll-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ─── MEDIA CARDS (Vertical Posters 2:3) ─────────────────── */
.movie-card-link {
  flex: 0 0 140px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: var(--transition-smooth);
  min-width: 0;
}
.movie-card-link:hover { transform: none; }
.movie-card-link .poster-wrap {
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #000;
  border-radius: 10px;
}
.movie-card-link .poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.movie-card-link:hover .poster-wrap img { transform: scale(1.05); }
.movie-info { padding: 8px 0 0; }
.movie-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
  font-family: 'Playfair Display', serif;
}
.movie-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Inter', -apple-system, sans-serif;
  flex-wrap: wrap;
}
.movie-meta .type {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-hover);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Grid card overrides for movies/tv/categories pages */
.movie-grid,
.tv-grid,
#categoryMovieGrid,
#viewAllGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 5%;
  max-width: 1400px;
  margin: 0 auto;
}

#searchMovieGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 12px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  #searchMovieGrid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }
}

/* Custom Page Visual Banner for Movies & TV Shows */
.page-hero-banner {
  position: relative;
  width: 100%;
  padding: 85px 5% 38px;
  background-color: #09090b;
  background-image:
    linear-gradient(to bottom, rgba(9, 9, 11, 0.65), rgba(9, 9, 11, 0.96)),
    radial-gradient(circle at 50% 30%, rgba(139, 92, 246, 0.25) 0%, rgba(9, 9, 11, 0.9) 75%),
    url("https://wsrv.nl/?url=https://image.tmdb.org/t/p/original/m2v1pA1E9lC7V2NInO15IuE311W.jpg&q=60&output=webp");
  background-size: cover;
  background-position: center 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.page-hero-banner.tv-banner {
  background-image:
    linear-gradient(to bottom, rgba(9, 9, 11, 0.65), rgba(9, 9, 11, 0.96)),
    radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.25) 0%, rgba(9, 9, 11, 0.9) 75%),
    url("https://wsrv.nl/?url=https://image.tmdb.org/t/p/original/9faGSFi5jam2p8e92L3l92bO9.jpg&q=60&output=webp");
}

.page-hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15), transparent 70%);
  pointer-events: none;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #a78bfa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.page-hero-title {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 30%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Inter', -apple-system, sans-serif;
  margin-bottom: 8px;
  text-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.page-hero-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .page-hero-banner {
    padding: 75px 16px 25px;
  }
  .page-hero-title {
    font-size: 32px;
    letter-spacing: 1px;
  }
  .page-hero-subtitle {
    font-size: 13px;
  }
}

/* Mobile: 2 columns for movies, tv, categories with tight side padding */
@media (max-width: 767px) {
  .categories-page-header,
  .movies-page-header,
  .tv-page-header,
  .landscape-featured,
  .category-movie-grid,
  .movie-grid-section,
  .tv-grid-section {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .movie-grid,
  .tv-grid,
  #categoryMovieGrid,
  #viewAllGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0;
  }
}

/* Desktop columns */
@media (min-width: 768px) {
  .movie-grid,
  .tv-grid,
  #categoryMovieGrid,
  #viewAllGrid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

.movie-grid .movie-card-link,
.tv-grid .movie-card-link,
#categoryMovieGrid .movie-card-link,
#viewAllGrid .movie-card-link,
#searchMovieGrid .movie-card-link {
  flex: none;
  width: 100%;
}

/* ─── LANDSCAPE CARDS (Backdrop 16:9, Logo Overlay) ──────── */
.landscape-card-link {
  flex: 0 0 240px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: var(--transition-smooth);
  min-width: 0;
}
.landscape-card-link:hover { transform: none; }
.landscape-card-link .landscape-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
  border-radius: 10px;
  position: relative;
}
.landscape-card-link .landscape-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.landscape-card-link:hover .landscape-wrap img { transform: scale(1.05); }
.landscape-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;
  width: 80% !important;
  height: 65% !important;
  max-width: 80% !important;
  max-height: 65% !important;
  object-fit: contain !important;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.95));
  transition: none !important;
  box-sizing: border-box;
}
.landscape-info { padding: 6px 0 0; }
.landscape-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); font-family: 'Inter', -apple-system, sans-serif; }

/* ─── TOP 10 ITEMS ───────────────────────────────────────── */
.top10-item {
  flex: 0 0 135px;
  text-decoration: none;
  color: inherit;
  position: relative;
  display: flex;
  flex-direction: column;
  margin-left: 12px;
  padding: 0;
  min-width: 0;
  overflow: visible;
}
.top10-item .rank {
  position: absolute;
  left: -12px;
  bottom: 30px;
  z-index: 3;
  font-size: 88px;
  font-weight: 900;
  color: #121212;
  -webkit-text-stroke: 3.5px #ffffff;
  paint-order: stroke fill;
  line-height: 0.8;
  pointer-events: none;
  overflow: visible;
  font-family: 'Inter', -apple-system, sans-serif;
  letter-spacing: -2px;
}
.top10-item .poster-wrap {
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  z-index: 1;
  margin-left: 0;
}
.top10-item .poster-wrap img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.top10-item .info { 
  padding: 6px 0 0; 
  text-align: left;
  min-width: 0;
}
.top10-item .info .title {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Playfair Display', serif;
}
.top10-item .info .meta { 
  font-size: 10px; 
  color: var(--text-muted); 
  font-family: 'Inter', -apple-system, sans-serif;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* ─── PILL TABS ─────────────────────────────────────────– */
.pill-tabs {
  position: sticky;
  top: 57px;
  z-index: 950;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 5%;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 1px solid var(--border-color);
}
.pill-tabs::-webkit-scrollbar { display: none; }

.pill-tab {
  flex: 0 0 auto;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Playfair Display', serif;
}
.pill-tab:hover { background: rgba(124, 58, 237, 0.1); border-color: var(--primary); color: var(--primary-hover); }
.pill-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 8px var(--primary-glow); }

/* ─── STREAMING PROVIDERS SECTION ──────────────────────── */
.section-header-provider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-header-provider .accent-bar {
  width: 3px;
  height: 38px;
  background-color: #e50914;
  border-radius: 2px;
  flex-shrink: 0;
}
.provider-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}
.highlight-provider {
  color: #e50914;
  font-weight: 800;
}

.providers-wrapper {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 16px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.providers-wrapper::-webkit-scrollbar { display: none; }

.provider-item {
  flex: 0 0 140px;
  height: 64px;
  background: rgba(20, 22, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}
.provider-item:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(32, 35, 45, 0.9);
  transform: translateY(-2px);
}
.provider-item.active {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.provider-logo-img {
  max-width: 100%;
  max-height: 34px;
  object-fit: contain;
  filter: brightness(0.9) contrast(1.1);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.provider-item:hover .provider-logo-img,
.provider-item.active .provider-logo-img {
  filter: brightness(1.1) contrast(1.15);
  transform: scale(1.04);
}

/* ─── POPULAR GENRES GRID SECTION ──────────────────────── */
.popular-genres-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 600px) {
  .popular-genres-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .popular-genres-grid { grid-template-columns: repeat(6, 1fr); }
}

.genre-card {
  position: relative;
  border-radius: 14px;
  padding: 22px 16px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.genre-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.3);
}

.genre-card.g-action { background: linear-gradient(135deg, #b91c1c, #450a0a); }
.genre-card.g-comedy { background: linear-gradient(135deg, #d97706, #78350f); }
.genre-card.g-drama { background: linear-gradient(135deg, #4338ca, #1e1b4b); }
.genre-card.g-horror { background: linear-gradient(135deg, #15803d, #052e16); }
.genre-card.g-scifi { background: linear-gradient(135deg, #6d28d9, #2e1065); }
.genre-card.g-romance { background: linear-gradient(135deg, #be185d, #500724); }

.genre-icon {
  font-size: 22px;
}

/* ─── SKELETON ───────────────────────────────────────────── */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-card {
  background: #1c1c1f;
  background-image: linear-gradient(90deg, #18181b 25%, #27272a 50%, #18181b 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s infinite linear;
  border-radius: 10px;
  height: 210px;
  width: 140px;
  flex: 0 0 140px;
  min-width: 0;
}
body.light-mode .skeleton-card {
  background: #e4e4e7;
  background-image: linear-gradient(90deg, #e4e4e7 25%, #f4f4f5 50%, #e4e4e7 75%);
}

/* ─── VIEW ALL PAGE ──────────────────────────────────────── */
#viewAllPage { display: none; padding-top: 80px; padding-bottom: 80px; }
#viewAllPage h1 { padding: 20px 5%; font-size: 28px; font-family: 'Playfair Display', serif; }
#viewAllGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 5%;
}

/* Mobile: 2 columns */
@media (max-width: 480px) {
  #viewAllGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* Small mobile to tablet */
@media (min-width: 481px) and (max-width: 767px) {
  #viewAllGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Desktop */
@media (min-width: 768px) {
  #viewAllGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── LIBRARY PAGE ───────────────────────────────────────── */
#libraryPage { display: block; padding: 80px 5% 20px; }
#libraryPage h1 { padding-bottom: 20px; font-size: 28px; font-family: 'Playfair Display', serif; }
.library-section { margin-bottom: 30px; }
.library-section h2 { font-size: 24px; margin-bottom: 16px; font-family: 'Playfair Display', serif; }
#continueWatching, #watchlistGrid, #recentlyWatched {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}
#continueWatching::-webkit-scrollbar, #watchlistGrid::-webkit-scrollbar, #recentlyWatched::-webkit-scrollbar { display: none; }

/* Remove button on cards */
.card-remove-btn, .continue-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
}
.card-remove-btn:hover, .continue-remove-btn:hover {
  background: #ef4444;
  transform: scale(1.1);
  border-color: #ef4444;
}

/* Google Translate & Dark Theme Styling */
.goog-te-gadget {
  color: var(--text-muted) !important;
  font-family: inherit !important;
  font-size: 12px !important;
}
.goog-te-gadget .goog-te-combo {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  outline: none;
}
.goog-te-banner-frame, .goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: transparent !important; box-shadow: none !important; }

/* ─── MOVIE INFO PAGE (REDESIGNED - NETFLIX / PRIME STYLE) ─────────────────────────── */
.movie-info-page, .details-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  background: #09090b;
  z-index: 1500;
  color: #e4e4e7;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.movie-info-top-bar {
  position: absolute;
  top: 20px;
  left: 5%;
  z-index: 20;
  display: flex;
  align-items: center;
}
.movie-info-back-btn {
  background: rgba(18, 18, 22, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.movie-info-back-btn:hover {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
  transform: translateY(-2px);
}

/* Movie Info Hero - Full Bleed Backdrop Banner */
.movie-info-hero {
  position: relative;
  width: 100%;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 100px 5% 40px;
  overflow: hidden;
  background: #000;
}
.movie-info-backdrop-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: brightness(0.65) contrast(1.05);
  z-index: 0;
}
.movie-info-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.4) 0%, rgba(9, 9, 11, 0.7) 60%, #09090b 100%);
  z-index: 1;
}

.movie-info-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 32px;
  width: 100%;
  max-width: 1300px;
}

.movie-info-poster-thumb {
  flex-shrink: 0;
  width: 180px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.15);
  background: #18181b;
}
.movie-info-poster-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.movie-info-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.movie-info-logo-container {
  margin-bottom: 14px;
  max-width: 480px;
  width: 100%;
}
.movie-info-logo-img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
}
.movie-info-content .movie-title {
  font-size: 38px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Inter', -apple-system, sans-serif;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin: 0;
  text-shadow: 0 4px 16px rgba(0,0,0,0.8);
}

.movie-info-content .movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  color: #a1a1aa;
  font-size: 14px;
  font-weight: 500;
}
.meta-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rating-badge {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.star-icon {
  fill: #8b5cf6;
}
.coming-soon-badge {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}
.coming-soon-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
.hd-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.meta-item {
  color: #e4e4e7;
}

.movie-tagline {
  font-size: 15px;
  font-style: italic;
  color: #a1a1aa;
  margin-bottom: 20px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

/* Action Buttons with Uppercase Text & Custom SVG Icons */
.play-btn {
  background: #7c3aed;
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}
.play-btn:hover {
  background: #6d28d9;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.6);
}

.wishlist-btn, .share-btn, .trailer-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 22px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}
.wishlist-btn:hover, .share-btn:hover, .trailer-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}
.wishlist-btn.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}
.wishlist-btn.active:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Info Body & Rectangular Cards Section Layout */
.movie-info-body {
  padding: 20px 5% 60px;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.info-card-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* Rectangular Card Boundary Container */
.info-card {
  background: #121217;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s ease;
}
.info-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.info-card-header {
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}
.info-card-header h3 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #a1a1aa;
  margin: 0;
  text-transform: uppercase;
}

/* Overview / Storyline Text */
.overview-text {
  color: #d4d4d8;
  line-height: 1.7;
  font-size: 15px;
  font-weight: 400;
}

/* Key Details List Card */
.details-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.detail-row strong {
  color: #71717a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.detail-row span {
  color: #e4e4e7;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

/* Cast Section Styling */
.cast-scroll-wrapper {
  overflow-x: auto;
  padding: 8px 0 12px;
  scrollbar-width: none;
}
.cast-scroll-wrapper::-webkit-scrollbar { display: none; }
.cast-scroll {
  display: flex;
  gap: 16px;
  align-items: center;
  width: max-content;
}
.cast-see-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary-hover);
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  margin-left: 4px;
}
.cast-see-more-btn:hover {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.05);
}
.cast-item {
  flex: 0 0 110px;
  text-align: center;
}
.cast-item img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.cast-item:hover img {
  transform: scale(1.06);
  border-color: #7c3aed;
}
.cast-name {
  font-size: 13px;
  font-weight: 600;
  color: #f4f4f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.cast-character {
  font-size: 11px;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Recommended Grid */
.also-like-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

/* Responsive Styles for Mobile & Tablets */
@media (max-width: 900px) {
  .info-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .movie-info-hero {
    min-height: 440px;
    padding: 80px 4% 30px;
  }
  .movie-info-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .movie-info-poster-thumb {
    width: 130px;
  }
  .movie-info-content {
    align-items: center;
    text-align: center;
  }
  .movie-info-content .movie-title {
    font-size: 28px;
  }
  .movie-info-actions {
    justify-content: center;
    width: 100%;
  }
  .play-btn, .wishlist-btn, .share-btn, .trailer-btn {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    font-size: 12px;
    padding: 11px 16px;
  }
  .info-card {
    padding: 18px 20px;
    border-radius: 12px;
  }
  .movie-info-body {
    padding: 16px 4% 40px;
  }
}


/* ─── CAST SECTION ────────────────────────────────────── */
.movie-info-cast-section { 
  padding: 40px 5%; 
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.movie-info-cast-section h3 {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  margin-bottom: 20px;
}
.cast-scroll-wrapper { overflow-x: auto; padding: 4px 0 12px 0; scrollbar-width: none; }
.cast-scroll-wrapper::-webkit-scrollbar { display: none; }
.cast-scroll { display: flex; gap: 12px; width: max-content; }
.cast-item {
  flex: 0 0 100px;
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 8px;
  min-width: 0;
}
.cast-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.cast-item .cast-name { font-size: 11px; font-weight: 600; color: var(--text-main); padding: 6px 4px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Playfair Display', serif; }
.cast-item .cast-character { font-size: 9px; color: var(--text-muted); padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Playfair Display', serif; }

/* ─── YOU MAY ALSO LIKE SECTION ─────────────────────────── */
.you-may-also-like {
  padding: 30px 5%;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.you-may-also-like h3 {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  margin-bottom: 16px;
}
.also-like-grid, #playerAlsoLikeGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .also-like-grid, #playerAlsoLikeGrid {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
  }
}

.also-like-card {
  text-decoration: none;
  color: inherit;
  position: relative;
  cursor: pointer;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.also-like-card .poster-wrap {
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #000;
  border-radius: 8px;
}
.also-like-card .poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.also-like-card:hover .poster-wrap img { transform: scale(1.05); }
.also-like-card .movie-info, .also-like-card .info {
  padding: 6px 0 0;
  min-width: 0;
  width: 100%;
}
.also-like-card .movie-title, .also-like-card .title {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Playfair Display', serif;
  color: var(--text-main);
  line-height: 1.3;
}
.also-like-card .movie-meta, .also-like-card .meta {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'Inter', -apple-system, sans-serif;
  margin-top: 2px;
}

/* ─── PLAYER PAGE ────────────────────────────────────────── */
.player-top-bar {
  padding: 16px 5%;
  margin-top: 60px;
  display: flex;
  align-items: center;
}
.player-back-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.player-back-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.player-wrapper {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}
.player-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  background: #000;
  border-radius: 0;
  overflow: hidden;
}

.player-controls-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  width: 100%;
}

.rotate-screen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid var(--primary);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}
.rotate-screen-btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

@media (min-width: 768px) {
  .player-controls-bar {
    display: none;
  }
}

@media (min-width: 768px) {
  .player-wrapper {
    padding: 0 5%;
  }
  .player-container {
    border-radius: 10px;
  }
}
.player-container iframe, .player-container .video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Premium Player Status Loading Spinner */
.player-status-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.player-status-text {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.player-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary);
  border-right-color: var(--primary-hover);
  border-radius: 50%;
  animation: player-spin 0.8s linear infinite;
  box-shadow: 0 0 15px var(--primary-glow);
}
@keyframes player-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.player-container .video-overlay {
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.play-circle {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}
.play-circle:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.1);
}
.play-triangle {
  width: 0;
  height: 0;
  border-left: 18px solid white;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 4px;
}

/* Seasons and Episodes */
.seasons-episodes-section {
  padding: 40px 5%;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.season-buttons {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
  margin-bottom: 20px;
}
.season-buttons::-webkit-scrollbar { display: none; }
.season-btn {
  flex: 0 0 auto;
  padding: 10px 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s;
}
.season-btn:hover, .season-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

.episodes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.episode-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.episode-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}
.episode-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}
@keyframes pulse-click {
  0% { transform: scale(1); }
  50% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.episode-card.pulse-anim {
  animation: pulse-click 0.35s ease;
}
.episode-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.episode-info {
  padding: 12px;
}
.episode-number {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-family: 'Playfair Display', serif;
}
.episode-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Playfair Display', serif;
}

/* ─── SEARCH MODAL ──────────────────────────────────────── */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 12px 24px;
  overflow-y: auto;
}
.search-overlay.active {
  display: flex;
  flex-direction: column;
}
.search-popup {
  width: 100%;
  max-width: 1100px;
  background: rgba(18, 18, 24, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 16px;
  position: relative;
  margin-top: 10px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.search-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.search-popup-title {
  font-size: 18px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}
.search-popup-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.search-popup-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
#searchPopupInput {
  flex: 1;
  padding: 12px 40px 12px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
}
#searchPopupInput:focus {
  border-color: var(--primary);
}
.search-clear-btn {
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2) !important;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.search-clear-btn:hover {
  background: rgba(255,255,255,0.3);
}
.search-submit-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.search-submit-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.04);
}

/* Recent Searches Styling */
.recent-searches-section {
  margin-bottom: 20px;
  display: none;
}
.recent-searches-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.clear-recent-btn {
  background: none;
  border: none;
  color: var(--primary-hover);
  font-size: 12px;
  cursor: pointer;
}
.clear-recent-btn:hover {
  text-decoration: underline;
}
.recent-searches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.recent-search-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.recent-search-chip:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--primary);
}
.recent-search-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
}
.recent-search-delete:hover {
  color: #ef4444;
}
#searchPopupResults {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 2px;
}
@media (min-width: 768px) {
  #searchPopupResults {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}
.search-result-card {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}
.search-result-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.search-result-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}
.search-result-info {
  padding: 8px 6px;
  font-size: 11px;
}
.search-result-title {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Playfair Display', serif;
}
.search-result-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── SHARE MODAL ────────────────────────────────────────– */
.share-modal, .legal-modal, .share-modal-overlay, .legal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.share-modal.active, .legal-modal.active, .share-modal-overlay.active, .legal-modal-overlay.active {
  display: flex;
}
.modal-content {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 28px;
  max-width: 400px;
  width: 90%;
  position: relative;
}
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-main);
  cursor: pointer;
}
.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  font-family: 'Playfair Display', serif;
}
.modal-text {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
  word-break: break-all;
}
.modal-buttons {
  display: flex;
  gap: 12px;
}
.modal-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-btn-primary {
  background: var(--primary);
  color: #fff;
}
.modal-btn-primary:hover {
  background: var(--primary-hover);
}
.modal-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.modal-btn-secondary:hover {
  background: rgba(255,255,255,0.12);
}

/* ─── FOOTER & POPUPS ────────────────────────────────────── */
footer {
  background: var(--bg-footer, #060608);
  border-top: 1px solid var(--border-color);
  padding: 40px 5% 100px;
  color: var(--text-muted);
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 24px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.footer-brand h3 {
  font-family: "Playfair Display", serif;
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.5;
}

.footer-links-col h4 {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 12px;
}

.footer-links-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-col li {
  margin-bottom: 8px;
}

.footer-links-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links-col a:hover {
  color: var(--primary);
}

.footer-copyright {
  text-align: center;
  font-size: 13px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-translate {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.warning-popup, .telegram-popup, .pwa-install-popup {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: calc(100% - 40px);
  max-width: 360px;
  background: var(--bg-card, #18181c);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: none;
}

.warning-popup.show, .telegram-popup.show, .pwa-install-popup.show {
  display: block;
}

.pwa-install-btn {
  width: 100%;
  padding: 10px;
  background: var(--primary, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.pwa-install-btn:hover {
  background: var(--primary-hover, #9061f9);
  transform: translateY(-1px);
}

.warning-popup .ok-btn, .telegram-popup .join-btn {
  width: 100%;
  padding: 10px;
  background: var(--primary, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.warning-popup .ok-btn:hover, .telegram-popup .join-btn:hover {
  background: var(--primary-hover, #9061f9);
}

.telegram-popup .close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}
