/* ==========================================================================
   CineVerse Design System — "Your Universe of Movies"
   Ultra-Premium Cinematic Dark Interface
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Obsidian Space Palette */
  --bg-base: #07090e;
  --bg-surface: #0f141f;
  --bg-surface-elevated: #161c2b;
  --bg-surface-hover: #1e2638;
  --bg-glass: rgba(15, 20, 31, 0.75);
  --bg-glass-card: rgba(22, 28, 43, 0.6);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(245, 158, 11, 0.5);
  --border-glass: rgba(255, 255, 255, 0.12);

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #07090e;

  /* Signature CineVerse Radiant Amber Accent */
  --accent-primary: #f59e0b;
  --accent-secondary: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.35);
  --accent-dark: #b45309;

  /* Functional Status Colors */
  --badge-4k: #06b6d4;
  --badge-rating: #10b981;
  --badge-hd: #6366f1;
  --color-danger: #ef4444;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px var(--accent-glow);

  /* Motion & Transitions */
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms ease;
  --transition-normal: 250ms var(--ease-cinematic);
  --transition-slow: 400ms var(--ease-cinematic);

  /* Dimensions */
  --navbar-height: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* Reset & Global Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ==========================================================================
   Navigation Bar (Sticky, Glassmorphic, Adaptive)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal), border-bottom var(--transition-normal), box-shadow var(--transition-normal);
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.85) 0%, rgba(7, 9, 14, 0) 100%);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.navbar-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.brand-emblem {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-text {
  color: #ffffff;
}

.brand-accent {
  color: var(--accent-primary);
  text-shadow: 0 0 12px var(--accent-glow);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.4rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--accent-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Search Input in Navbar */
.search-wrapper {
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.9rem;
  gap: 0.5rem;
  width: 220px;
  transition: all var(--transition-normal);
}

.search-bar:focus-within {
  width: 280px;
  background: rgba(15, 20, 31, 0.9);
  border-color: var(--accent-primary);
  box-shadow: 0 0 14px var(--accent-glow);
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.875rem;
  width: 100%;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  z-index: 200;
  backdrop-filter: blur(16px);
}

.search-dropdown.active {
  display: flex;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-surface-hover);
}

.search-thumb {
  width: 44px;
  height: 62px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #1e293b;
  flex-shrink: 0;
}

.search-info {
  flex: 1;
  min-width: 0;
}

.search-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-meta {
  font-size: 0.775rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #ffffff;
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

@media (min-width: 900px) {
  .mobile-toggle {
    display: none;
  }
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 9, 14, 0.97);
  backdrop-filter: blur(24px);
  z-index: 99;
  display: none;
  flex-direction: column;
  padding: 2rem 1.5rem;
  gap: 1.25rem;
  overflow-y: auto;
  border-top: 1px solid var(--border-subtle);
}

.mobile-drawer.active {
  display: flex;
}

.mobile-nav-link {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--accent-primary);
}

/* ==========================================================================
   Hero Section (Cinematic Full-Bleed Banner)
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 85vh;
  max-height: 850px;
  display: flex;
  align-items: center;
  padding-top: var(--navbar-height);
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  z-index: 1;
  filter: brightness(0.7) contrast(1.1);
  transition: opacity var(--transition-slow);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: 
    linear-gradient(90deg, rgba(7, 9, 14, 0.95) 0%, rgba(7, 9, 14, 0.75) 45%, rgba(7, 9, 14, 0.2) 80%, rgba(7, 9, 14, 0.8) 100%),
    linear-gradient(0deg, var(--bg-base) 0%, rgba(7, 9, 14, 0) 35%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.7) 0%, rgba(7, 9, 14, 0) 25%);
}

.hero-container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content {
  max-width: 680px;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-4k {
  background: rgba(6, 182, 212, 0.15);
  color: var(--badge-4k);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-rating {
  background: rgba(16, 185, 129, 0.15);
  color: var(--badge-rating);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-genre {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Primary Cinematic Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.975rem;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-primary);
  color: #000000;
  box-shadow: 0 4px 18px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-secondary);
  box-shadow: 0 6px 26px rgba(245, 158, 11, 0.55);
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Movie Rows & Carousels
   ========================================================================== */
.content-section {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem;
  position: relative;
}

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

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-more-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform var(--transition-fast);
}

.section-more-link:hover {
  transform: translateX(4px);
  color: var(--accent-secondary);
}

/* Carousel Container */
.carousel-wrapper {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.75rem 0.25rem 1.5rem 0.25rem;
  scrollbar-width: none; /* Firefox */
}

.carousel-track::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.carousel-nav-btn {
  position: absolute;
  top: calc(50% - 24px);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(15, 20, 31, 0.85);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 10;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  opacity: 0;
}

.carousel-wrapper:hover .carousel-nav-btn {
  opacity: 1;
}

.carousel-nav-btn:hover {
  background: var(--accent-primary);
  color: #000000;
  transform: scale(1.1);
}

.carousel-nav-btn.prev {
  left: -18px;
}

.carousel-nav-btn.next {
  right: -18px;
}

/* ==========================================================================
   Movie Card Component (Elevated Cinematic Aesthetic)
   ========================================================================== */
.movie-card {
  position: relative;
  flex: 0 0 190px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .movie-card {
    flex: 0 0 210px;
  }
}

@media (min-width: 1024px) {
  .movie-card {
    flex: 0 0 230px;
  }
}

.card-poster-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111724;
}

.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-quality-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 700;
  color: #ffffff;
}

.card-rating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--badge-rating);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 9, 14, 0.95) 0%, rgba(7, 9, 14, 0.6) 50%, rgba(7, 9, 14, 0.1) 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  transition: opacity var(--transition-normal);
  z-index: 3;
}

.card-overlay-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.card-action-btn {
  flex: 1;
  padding: 0.45rem;
  font-size: 0.775rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* Hover Interactions (Desktop) */
@media (hover: hover) {
  .movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-focus);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.2);
  }

  .movie-card:hover .card-poster {
    transform: scale(1.06);
  }

  .movie-card:hover .card-overlay {
    opacity: 1;
  }
}

.card-info {
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  justify-content: space-between;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-submeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Catalog Grid (Movies & TV Shows Page)
   ========================================================================== */
.catalog-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--navbar-height) + 2rem) 1.5rem 4rem 1.5rem;
}

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

.catalog-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.catalog-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Filter Controls Bar */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 2.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 140px;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.filter-select, .filter-input {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--accent-primary);
}

.filter-select option {
  background: var(--bg-surface-elevated);
  color: #ffffff;
}

/* Responsive Movies Grid */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .movie-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .movie-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  .movie-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.movie-grid .movie-card {
  flex: none;
  width: 100%;
}

/* ==========================================================================
   Movie Details Page
   ========================================================================== */
.details-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--navbar-height);
  overflow: hidden;
}

.details-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) contrast(1.1);
  z-index: 1;
}

.details-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: 
    linear-gradient(0deg, var(--bg-base) 0%, rgba(7, 9, 14, 0.8) 50%, rgba(7, 9, 14, 0.4) 100%);
}

.details-content-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem 1.5rem;
  position: relative;
  z-index: 3;
}

.details-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 860px) {
  .details-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.details-poster-col {
  width: 240px;
  flex-shrink: 0;
  margin-top: -120px;
}

@media (min-width: 860px) {
  .details-poster-col {
    width: 280px;
  }
}

.details-poster {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border-glass);
}

.details-info-col {
  flex: 1;
}

.details-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.details-original-title {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-style: italic;
}

.details-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.details-actions-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.details-storyline {
  margin-bottom: 2rem;
}

.details-storyline h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.details-storyline p {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Cast Avatars Grid */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.cast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 0.75rem;
}

.cast-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 2px solid var(--border-glass);
}

.cast-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}

.cast-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Custom Video Player (Watch Page)
   ========================================================================== */
.player-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--navbar-height) + 1.5rem) 1.5rem 3rem 1.5rem;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-glass);
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Custom Player Controls */
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0) 100%);
  padding: 1.5rem 1.25rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 10;
}

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

.player-seekbar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  transition: height var(--transition-fast);
}

.player-seekbar-container:hover {
  height: 10px;
}

.player-seekbar-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
  width: 0%;
  position: relative;
  box-shadow: 0 0 10px var(--accent-glow);
}

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

.player-left-controls, .player-right-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-btn {
  color: #ffffff;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.player-btn:hover {
  color: var(--accent-primary);
}

.player-time-display {
  font-size: 0.85rem;
  color: #cbd5e1;
  font-family: monospace;
}

.volume-slider {
  width: 80px;
  accent-color: var(--accent-primary);
}

/* ==========================================================================
   Download Center (Download Page)
   ========================================================================== */
.download-hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3rem auto;
}

.download-disclaimer {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  text-align: left;
}

.download-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.download-option-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-normal);
}

.download-option-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.download-quality-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.download-size-badge {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Monetization Advertisement Containers
   ========================================================================== */
.ad-slot-container {
  width: 100%;
  max-width: 1440px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.ad-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-fast);
}

.ad-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.ad-indicator {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ad-content {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  gap: 1rem;
}

@media (min-width: 768px) {
  .ad-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.ad-image {
  max-height: 140px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.ad-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.ad-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ==========================================================================
   Trailer Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 960px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-primary);
  color: #000000;
}

.modal-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 1.5rem 2rem 1.5rem;
}

.footer-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .footer-container {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-legal-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-top: 0.5rem;
}

.footer-links-col h4 {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 1rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  max-width: 1440px;
  margin: 2.5rem auto 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  animation: slideIn 0.3s var(--ease-cinematic);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Skeleton Loading Shimmer */
.skeleton {
  background: linear-gradient(90deg, #111724 25%, #1e2638 50%, #111724 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* ==========================================================================
   Cinema Watch Experience & Theater Mode
   ========================================================================== */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .watch-layout {
    grid-template-columns: 1fr 360px;
  }
}

.watch-primary-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.watch-player-card {
  background: #000000;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  position: relative;
}

.watch-player-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

.watch-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.watch-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.server-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.server-btn:hover, .server-btn.active {
  background: var(--accent-primary);
  color: #000000;
  border-color: var(--accent-primary);
}

.server-btn.active {
  box-shadow: 0 0 12px var(--accent-glow);
}

.lights-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.lights-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Lights Out Dimming Mode */
body.lights-out .navbar,
body.lights-out .footer,
body.lights-out .ad-slot-container,
body.lights-out .watch-sidebar,
body.lights-out .watch-meta-details,
body.lights-out .watch-toolbar-group:not(.theater-controls) {
  opacity: 0.08 !important;
  pointer-events: none;
  filter: blur(2px);
  transition: all 0.4s ease;
}

body.lights-out .watch-player-card {
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.95);
  transform: scale(1.02);
  transition: all 0.4s ease;
  z-index: 50;
}

/* Download Center Detailed Elements */
.download-license-banner {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.download-counter-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.download-countdown-num {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--accent-primary);
}

.checksum-pill {
  font-family: monospace;
  font-size: 0.725rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

