@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg-dark: #0a0a0f;
  --bg-gradient: radial-gradient(circle at top, #1c0f1c 0%, #0a0a0f 60%);
  --bg-surface: rgba(22, 22, 33, 0.45);
  --bg-surface-hover: rgba(30, 30, 45, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(229, 9, 20, 0.25);
  
  --netflix-red: #E50914;
  --rt-fresh: #FA320A;
  --rt-green: #63AA74;
  
  --text-primary: #f5f5f7;
  --text-secondary: #9ea0b0;
  --gold: #FFD700;
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-neon: 0 0 20px rgba(229, 9, 20, 0.25);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Hero & Header ────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 24px 60px;
  text-align: center;
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(229, 9, 20, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-mascot {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(229, 9, 20, 0.6);
  box-shadow: var(--shadow-neon);
  margin-bottom: 20px;
  transition: var(--transition-smooth);
}

.hero-mascot:hover {
  transform: rotate(5deg) scale(1.05);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 9, 20, 0.12);
  border: 1px solid rgba(229, 9, 20, 0.3);
  border-radius: 30px;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff8585;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero h1 span.tomato-basket {
  background: linear-gradient(135deg, #FA320A, #FF6B35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 36px;
  font-weight: 300;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.hero-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 16px 28px;
  border-radius: var(--radius-md);
  min-width: 140px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.hero-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-surface-hover);
}

.hero-stat .num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--netflix-red);
  text-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
  display: block;
  line-height: 1.2;
}

.hero-stat .lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-refreshed {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Sticky Nav Tabs ───────────────────────────────────────── */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.nav-tabs {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  padding: 18px 24px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  color: var(--netflix-red);
  border-bottom-color: var(--netflix-red);
  text-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

/* ── Main Layout ──────────────────────────────────────────── */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.section.active {
  display: block;
}

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

/* ── Section Headings & Header ────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-title span {
  color: var(--netflix-red);
}

/* ── Controls & Filter Panel ───────────────────────────────── */
.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.search-box {
  position: relative;
}

.search-box input {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 16px 10px 42px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 240px;
  outline: none;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.search-box input:focus {
  border-color: rgba(229, 9, 20, 0.6);
  background: var(--bg-surface-hover);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.6;
  pointer-events: none;
}

select {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ea0b0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 38px;
}

select:focus {
  border-color: rgba(229, 9, 20, 0.6);
  background: var(--bg-surface-hover);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

/* Multi-select dropdown */
.genre-multi {
  position: relative;
}

.genre-multi-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ea0b0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

.genre-multi-btn:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255,255,255,0.15);
}

.genre-multi.open .genre-multi-btn {
  border-color: rgba(229, 9, 20, 0.6);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.genre-multi-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #11111a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 0;
  z-index: 200;
  max-height: 280px;
  overflow-y: auto;
  min-width: 200px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
}

.genre-multi.open .genre-multi-dropdown {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

.genre-multi-dropdown label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.genre-multi-dropdown label:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.genre-multi-dropdown input[type="checkbox"] {
  accent-color: var(--netflix-red);
  width: 15px;
  height: 15px;
  border-radius: 4px;
  cursor: pointer;
}

.result-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: auto;
  font-weight: 500;
}

/* ── Provider Pills ────────────────────────────────────────── */
.provider-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.provider-btn {
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.provider-btn:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.provider-btn.active-all {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
}

.provider-btn.active-netflix {
  background: var(--netflix-red);
  border-color: var(--netflix-red);
  color: white;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.provider-btn.active-prime {
  background: #00A8E0;
  border-color: #00A8E0;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 168, 224, 0.3);
}

.provider-btn.active-disney {
  background: #113CCF;
  border-color: #113CCF;
  color: white;
  box-shadow: 0 4px 12px rgba(17, 60, 207, 0.3);
}

.provider-btn.active-crave {
  background: #9B27AF;
  border-color: #9B27AF;
  color: white;
  box-shadow: 0 4px 12px rgba(155, 39, 175, 0.3);
}

.provider-btn.active-apple {
  background: #444;
  border-color: #555;
  color: white;
  box-shadow: 0 4px 12px rgba(85, 85, 85, 0.3);
}

.provider-btn.active-cbc {
  background: #E02424;
  border-color: #E02424;
  color: white;
  box-shadow: 0 4px 12px rgba(224, 36, 36, 0.3);
}

.provider-btn.active-tubi {
  background: #FA382F;
  border-color: #FA382F;
  color: white;
  box-shadow: 0 4px 12px rgba(250, 56, 47, 0.3);
}

/* ── Card Grid & Cards ─────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md), var(--shadow-neon);
  background: var(--bg-surface-hover);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 12px;
}

.card-thumbnail-wrap {
  position: relative;
  width: 65px;
  height: 95px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #151522;
}

.card-thumbnail {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.card-thumbnail.broken {
  display: none;
}

.card:hover .card-thumbnail {
  transform: scale(1.08);
}

.card-thumbnail-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #11111a;
  z-index: 0;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-top: 2px;
  flex-grow: 1;
}

.card-icons {
  margin-left: 8px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.card-year {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.card-flags {
  font-size: 0.85rem;
  letter-spacing: -2px;
}

.card-language {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.card-genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin-top: 8px;
}

.card-genre {
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--text-secondary);
}

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin: 8px 24px;
  align-self: flex-start;
  background: rgba(250, 50, 10, 0.15);
  border: 1px solid rgba(250, 50, 10, 0.35);
  color: #ff725c;
}

.card-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 4px 24px;
  line-height: 1.4;
}

.card-detail strong {
  color: var(--text-primary);
  font-weight: 600;
}

.card-synopsis {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 16px 24px;
  line-height: 1.5;
  flex-grow: 1;
  font-weight: 300;
}

.card-buttons {
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: rgba(10, 10, 15, 0.2);
}

.card-buttons-row {
  display: flex;
  gap: 8px;
}

.btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  text-align: center;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-full-width {
  width: 100%;
}

.btn-imdb {
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: #ffd633;
}

.btn-imdb:hover {
  background: #F5C518;
  color: #000;
  box-shadow: 0 4px 12px rgba(245, 197, 24, 0.2);
}

.btn-rt {
  background: rgba(250, 50, 10, 0.1);
  border: 1px solid rgba(250, 50, 10, 0.35);
  color: #ff725c;
}

.btn-rt:hover {
  background: #FA320A;
  color: white;
  box-shadow: 0 4px 12px rgba(250, 50, 10, 0.25);
}

.btn-tmdb {
  background: rgba(1, 180, 228, 0.1);
  border: 1px solid rgba(1, 180, 228, 0.35);
  color: #5ce1ff;
}

.btn-tmdb:hover {
  background: #01B4E4;
  color: white;
  box-shadow: 0 4px 12px rgba(1, 180, 228, 0.25);
}

/* Streaming Provider Links */
.btn-netflix { background: var(--netflix-red); color: white; }
.btn-netflix:hover { background: #ff1c27; box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3); }

.btn-prime { background: #00A8E0; color: white; }
.btn-prime:hover { background: #1cb5ff; box-shadow: 0 4px 12px rgba(0, 168, 224, 0.3); }

.btn-disney { background: #113CCF; color: white; }
.btn-disney:hover { background: #2655ed; box-shadow: 0 4px 12px rgba(17, 60, 207, 0.3); }

.btn-crave { background: #9B27AF; color: white; }
.btn-crave:hover { background: #b63acb; box-shadow: 0 4px 12px rgba(155, 39, 175, 0.3); }

.btn-apple { background: #444; color: white; }
.btn-apple:hover { background: #555; box-shadow: 0 4px 12px rgba(85, 85, 85, 0.3); }

.btn-cbc { background: #E02424; color: white; }
.btn-cbc:hover { background: #f03c3c; box-shadow: 0 4px 12px rgba(224, 36, 36, 0.3); }

.btn-tubi { background: #FA382F; color: white; }
.btn-tubi:hover { background: #ff524a; box-shadow: 0 4px 12px rgba(250, 56, 47, 0.3); }

.btn-hide {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-hide:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-watched {
  background: rgba(99, 170, 116, 0.15);
  border: 1px solid rgba(99, 170, 116, 0.35);
  color: #8ed69d;
}

.btn-watched:hover {
  background: #63AA74;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 170, 116, 0.25);
}

.btn-never-recommend {
  background: rgba(229, 9, 20, 0.1);
  border: 1px solid rgba(229, 9, 20, 0.35);
  color: #ff7b82;
}

.btn-never-recommend:hover {
  background: var(--netflix-red);
  color: white;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.25);
}

.btn-restore {
  background: rgba(99, 170, 116, 0.15);
  border: 1px solid rgba(99, 170, 116, 0.35);
  color: #8ed69d;
}

.btn-restore:hover {
  background: #63AA74;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 170, 116, 0.25);
}

.btn-gold {
  background: var(--gold);
  color: #000;
}
.btn-gold:hover {
  background: #ffe047;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* ── Recommended Carousels ────────────────────────────────── */
.carousel-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.carousel-section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.carousel-row {
  margin-bottom: 36px;
}

.carousel-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.carousel-row-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.carousel-row-title:hover {
  color: var(--netflix-red);
}

.carousel-explore {
  font-size: 0.8rem;
  color: var(--netflix-red);
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  transition: var(--transition-smooth);
}

.carousel-row:hover .carousel-explore {
  opacity: 1;
}

.carousel-track-wrap {
  position: relative;
}

/* Add subtle side gradient mask to carousels */
.carousel-track-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 8px;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg-dark));
  pointer-events: none;
  z-index: 2;
}

.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 4px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.carousel-track::-webkit-scrollbar {
  height: 6px;
}

.carousel-track::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
}

.carousel-track::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

.carousel-item {
  position: relative;
  flex-shrink: 0;
  width: 140px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.carousel-item:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 9, 20, 0.4);
  background: var(--bg-surface-hover);
  box-shadow: var(--shadow-sm);
}

.carousel-poster {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.carousel-poster-placeholder {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-sm);
  background: #151522;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 8px;
}

.carousel-score {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 8px;
}

.carousel-providers {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.carousel-provider-icon {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  color: white;
  line-height: 1.2;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 15, 20, 0.9);
  border: 1px solid var(--border-color);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: var(--transition-smooth);
  opacity: 0;
  box-shadow: var(--shadow-sm);
}

.carousel-track-wrap:hover .carousel-arrow {
  opacity: 1;
}

.carousel-arrow:hover {
  background: var(--netflix-red);
  border-color: var(--netflix-red);
  box-shadow: var(--shadow-neon);
}

.carousel-arrow-left { left: -16px; }
.carousel-arrow-right { right: -16px; }

/* Provider icon background helper classes */
.ci-netflix { background: #E50914; }
.ci-prime { background: #00A8E0; }
.ci-disney { background: #113CCF; }
.ci-crave { background: #9B27AF; }
.ci-apple { background: #555; }
.ci-cbc { background: #E02424; }
.ci-tubi { background: #FA382F; }

/* ── Modals & Popups ───────────────────────────────────────── */
.carousel-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 24px;
}

.carousel-modal.open {
  display: flex;
}

.carousel-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(8px);
}

.carousel-modal-content {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-width: 100%;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
}

.carousel-modal-content::-webkit-scrollbar {
  width: 6px;
}

.carousel-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

.modal-open { overflow: hidden; }

.detail-page {
  overflow: auto;
  background: #0b090a;
}

.detail-page > .hero,
.detail-page > .nav-wrap,
.detail-page > .main,
.detail-page > footer {
  display: none;
}

.detail-page .carousel-modal {
  display: block;
  position: static;
  min-height: 100vh;
  padding: 0;
}

.detail-page .carousel-modal-backdrop { display: none; }

.detail-page .carousel-modal-content {
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}

.detail-page .detail-card {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  border: 0;
}

.detail-card { overflow: hidden; background: #111118; border: 1px solid rgba(255, 255, 255, 0.15); }
.detail-hero { position: relative; min-height: 440px; background: #171722; overflow: hidden; }
.detail-hero > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center 28%; opacity: 0.64; }
.detail-hero-gradient { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 12, 18, 0.92) 0%, rgba(12, 12, 18, 0.52) 48%, rgba(12, 12, 18, 0.15) 100%), linear-gradient(0deg, #111118 0%, transparent 52%); }
.detail-close { position: absolute; z-index: 3; top: 18px; left: 18px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(8, 8, 12, 0.78); color: #fff; font-size: 1.45rem; line-height: 1; cursor: pointer; }
.detail-title-block { position: absolute; z-index: 2; left: 44px; right: 44px; bottom: 38px; max-width: 630px; }
.detail-score { color: #8ed69d; font-weight: 700; }
.detail-title-block h2 { margin: 8px 0; font-family: var(--font-heading); font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.04; }
.detail-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--text-secondary); font-weight: 600; }
.detail-meta span + span::before { content: '•'; margin-right: 12px; color: var(--text-muted); }
.detail-meta .detail-origin-flags {
  font-size: 1.35rem;
  line-height: .8;
  letter-spacing: 2px;
}
.detail-meta .detail-origin-flags::before { content: none; margin: 0; }
.detail-body { padding: 30px 44px 44px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.detail-actions .btn { flex: 0 1 auto; padding: 11px 20px; }
.detail-icon-btn { width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.detail-synopsis { max-width: 780px; margin: 28px 0; color: #dddde5; font-size: 1.05rem; line-height: 1.7; }
.detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 22px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.detail-facts div { display: flex; flex-direction: column; gap: 5px; color: var(--text-secondary); }
.detail-facts strong { color: var(--text-primary); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.06em; }
.detail-links { display: flex; gap: 16px; margin: 20px 0 34px; }
.detail-links a { color: #5ce1ff; font-weight: 700; text-decoration: none; }
.detail-cast { margin: 0 0 34px; }
.detail-cast h3 { font-family: var(--font-heading); font-size: 1.35rem; margin: 0 0 16px; }
.detail-cast-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.detail-cast-member { min-width: 0; text-align: center; }
.detail-cast-member img, .detail-cast-placeholder { display: grid; width: 100%; aspect-ratio: 1; place-items: center; object-fit: cover; border-radius: 50%; background: #292936; border: 1px solid var(--border-color); }
.detail-cast-placeholder { color: var(--text-secondary); font-family: var(--font-heading); font-size: 1.1rem; }
.detail-cast-member span { display: block; margin-top: 7px; color: var(--text-secondary); font-size: 0.78rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-related h3 { font-family: var(--font-heading); font-size: 1.35rem; margin: 0 0 16px; }
.detail-related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.detail-related-card { padding: 0; border: 0; background: transparent; color: var(--text-primary); text-align: left; cursor: pointer; font: inherit; }
.detail-related-card img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-sm); transition: transform 0.2s ease; }
.detail-related-card:hover img { transform: scale(1.04); }
.detail-related-card span { display: block; margin-top: 7px; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

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

@media (max-width: 700px) {
  .carousel-modal { padding: 0; }
  .carousel-modal-content { max-height: 100vh; border-radius: 0; }
  .detail-hero { min-height: 370px; }
  .detail-title-block { left: 24px; right: 24px; bottom: 28px; }
  .detail-body { padding: 24px; }
  .detail-facts { grid-template-columns: 1fr; gap: 14px; }
  .detail-cast-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}

/* ── Data Insights & Charts ───────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 28px;
  margin-bottom: 40px;
}

@media (max-width: 600px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

/* iOS feature-parity additions */
[hidden] { display: none !important; }

.discover-search {
  position: relative;
  max-width: 620px;
  margin: 0 auto 32px;
}

.discover-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(24, 20, 21, 0.92);
  color: var(--text-primary);
  font: inherit;
}

.discover-search-results {
  display: none;
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #181415;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.discover-search-results.open { display: block; }
.discover-search-results button {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.discover-search-results button:hover { background: rgba(255, 255, 255, 0.06); }
.discover-search-results button span,
.discover-no-results { color: var(--text-secondary); }
.discover-no-results { padding: 16px; }

.rt-card-badges {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 9px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.carousel-item > .rt-card-badges {
  top: 8px;
  left: 8px;
}

.rt-card-badge {
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.origin-card-badge {
  letter-spacing: 2px;
  font-size: 14px;
}

.rt-panel {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.rt-panel-heading,
.rt-panel-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.rt-panel h3 { margin: 3px 0 0; }
.rt-panel > a {
  display: inline-flex;
  margin-top: 16px;
  color: #f5c64b;
  font-weight: 750;
  text-decoration-color: rgba(245, 198, 75, .55);
  text-underline-offset: 4px;
}
.rt-panel > a:hover,
.rt-panel > a:focus-visible {
  color: #fff2bd;
  text-decoration-color: currentColor;
}
.rt-panel-scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 15px 0;
}
.rt-panel-scores > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}
.rt-panel-scores strong { font-size: 22px; }
.rt-panel-scores span { color: var(--text-secondary); font-size: 12px; }
.btn-check-rt {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}
.btn-check-rt:disabled { opacity: 0.6; cursor: wait; }
.rt-error { width: 100%; margin: 10px 0 0; color: #ff8d7d; }
.rt-empty-result {
  margin: 15px 0;
  color: var(--text-secondary);
}

.detail-state-btn {
  flex: 1 1 130px;
  min-height: 46px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.detail-state-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.11);
}
.detail-state-btn.active {
  border-color: var(--rt-fresh);
  background: rgba(250, 50, 10, 0.2);
  box-shadow: inset 0 0 0 1px rgba(126, 223, 151, .2);
}

.settings-header { align-items: flex-start; }
.section-kicker {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.settings-copy {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  gap: 20px;
}
.settings-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}
.settings-card h3 { margin: 0 0 16px; }
.settings-options { display: grid; gap: 2px; }
.settings-genres { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.preference-toggle {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.preference-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #514b4d;
  transition: background 160ms ease;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}
.preference-toggle input:checked + .toggle-track { background: var(--rt-fresh); }
.preference-toggle input:checked + .toggle-track::after { transform: translateX(18px); }
.preference-toggle input:focus-visible + .toggle-track { outline: 2px solid #fff; outline-offset: 2px; }

.catalog-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  color: var(--text-secondary);
  text-align: center;
}

.card-added {
  margin-top: 3px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.toast {
  position: fixed;
  z-index: 1000;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(28, 24, 25, 0.96);
  color: #fff;
  font-weight: 750;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-genres { grid-template-columns: 1fr; }
  .rt-panel-empty { align-items: flex-start; flex-direction: column; }
  .rt-panel-scores { grid-template-columns: 1fr; }
  .toast { right: 16px; bottom: 84px; }
}

.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.chart-card:hover {
  border-color: rgba(255,255,255,0.12);
  background: var(--bg-surface-hover);
}

.chart-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.chart-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.chart-container {
  position: relative;
}

/* Fetch Ingestion Progress */
.fetch-progress {
  margin-bottom: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}

.fetch-progress-track {
  background: rgba(255,255,255,0.06);
  border-radius: 30px;
  overflow: hidden;
  height: 16px;
  border: 1px solid var(--border-color);
}

.fetch-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--netflix-red), #FA320A);
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.fetch-progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 10px;
  font-weight: 500;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  background: rgba(10, 10, 15, 0.4);
}

footer a {
  color: var(--netflix-red);
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  text-decoration: underline;
}

/* ── Late Night direction ─────────────────────────────────── */
:root {
  --bg-dark: #0c0a0b;
  --bg-gradient: none;
  --bg-surface: #151213;
  --bg-surface-hover: #1c1819;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(245, 198, 75, 0.35);
  --netflix-red: #e23d28;
  --rt-fresh: #f5c64b;
  --rt-green: #f5c64b;
  --text-primary: #f2ede6;
  --text-secondary: #9c948a;
  --gold: #f5c64b;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 24px 70px rgba(0, 0, 0, 0.55);
  --shadow-neon: none;
  --font-heading: 'Space Grotesk', 'Archivo', system-ui, sans-serif;
  --font-body: 'Space Grotesk', 'Archivo', system-ui, sans-serif;
}

body {
  background: #0c0a0b;
  color: var(--text-primary);
}

.hero {
  min-height: min(78vh, 760px);
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  border: 0;
  background: #151213;
}

.hero::before { display: none; }

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  z-index: -3;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(12, 10, 11, 0.9) 0%, rgba(12, 10, 11, 0.43) 52%, rgba(12, 10, 11, 0.1) 76%),
    linear-gradient(0deg, #0c0a0b 0%, rgba(12, 10, 11, 0.08) 56%, rgba(12, 10, 11, 0.42) 100%);
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(24px, 5vw, 72px);
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #f2ede6;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover { color: #fff; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e23d28;
  color: white;
  font-size: 0.72rem;
  letter-spacing: -0.03em;
}

.site-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c7bfb4;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.country-chip {
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(12,10,11,.38);
  backdrop-filter: blur(12px);
}

.admin-login,
.account-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 14px;
  border: 1px solid rgba(245, 198, 75, .48);
  border-radius: 999px;
  background: rgba(12, 10, 11, .5);
  color: #f5c64b;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.admin-login:hover,
.admin-login:focus-visible,
.account-login:hover,
.account-login:focus-visible {
  border-color: #f5c64b;
  background: rgba(245, 198, 75, .14);
  color: #fff2bd;
}

.account-login { border-color:rgba(255,255,255,.22); color:#eee7df; }

.hero-content {
  width: min(680px, calc(100% - 48px));
  margin: 160px clamp(24px, 8vw, 120px) 76px;
}

.hero-kicker,
.detail-eyebrow {
  color: #f5c64b;
  font-size: 0.72rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 700;
}

.hero h1 {
  margin: 12px 0 14px;
  max-width: 760px;
  font-size: clamp(3rem, 7.5vw, 6.7rem);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero-title-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: #b5aca1;
  font-size: 0.86rem;
}

.featured-score {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 6px;
  background: #f5c64b;
  color: #2a1d02;
  font-weight: 700;
}

.featured-rt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.featured-rt > span {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(12, 10, 11, .72);
  color: #f2ede6;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.featured-rt .featured-rt-loading,
.featured-rt .featured-rt-unavailable {
  color: #b5aca1;
  font-weight: 600;
}

#featuredMeta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.featured-origin-flags {
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 2px;
}

.featured-meta-separator { color: #756e66; }

.hero p {
  max-width: 610px;
  margin: 20px 0 24px;
  color: #c7bfb4;
  font-size: clamp(.94rem, 1.4vw, 1.08rem);
  line-height: 1.65;
  font-weight: 400;
}

.hero-actions { display: flex; gap: 10px; }

.hero-actions button {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 .86rem var(--font-body);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.hero-actions button:hover { transform: translateY(-2px); }
.hero-primary { background: #e23d28; color: #fff; }
.hero-secondary {
  background: rgba(255,255,255,.11);
  border-color: rgba(255,255,255,.16) !important;
  color: #f2ede6;
  backdrop-filter: blur(12px);
}

.hero-stats {
  position: absolute;
  right: clamp(24px, 5vw, 72px);
  bottom: 50px;
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 1px;
  max-width: none;
  margin: 0;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.hero-stat {
  min-width: 112px;
  padding: 13px 16px;
  border: 0;
  border-radius: 0;
  background: rgba(12,10,11,.62);
  box-shadow: none;
  backdrop-filter: none;
}

.hero-stat:hover { transform: none; background: rgba(12,10,11,.75); }
.hero-stat .num {
  color: #f2ede6;
  font-size: 1.18rem;
  line-height: 1.15;
  text-shadow: none;
}
.hero-stat .lbl {
  color: #736c64;
  font-size: .58rem;
  letter-spacing: .16em;
}

.hero-refreshed {
  position: absolute;
  right: clamp(24px, 5vw, 72px);
  bottom: 24px;
  margin: 0;
  color: #6e675e;
  font-size: .65rem;
}

.nav-wrap {
  background: rgba(12, 10, 11, 0.9);
  border-color: rgba(255,255,255,.08);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.nav-tabs {
  max-width: 1440px;
  padding: 0 clamp(18px, 5vw, 72px);
  gap: 4px;
}

.nav-tab {
  padding: 17px 16px 15px;
  border-width: 2px;
  color: #736c64;
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nav-tab.active {
  color: #f2ede6;
  border-bottom-color: #e23d28;
  text-shadow: none;
}

.main {
  max-width: 1440px;
  padding: 48px clamp(18px, 5vw, 72px) 100px;
}

.section-title,
.carousel-section-title {
  font-size: clamp(1.5rem, 2.7vw, 2.2rem);
  letter-spacing: -.035em;
  font-weight: 700;
}
.section-title span { color: #f2ede6; }
.section-header { align-items: flex-start; margin-bottom: 26px; }

.controls { gap: 9px; }
.search-box input,
select,
.genre-multi-btn {
  min-height: 42px;
  border-radius: 999px;
  background-color: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
  color: #c7bfb4;
  font-size: .78rem;
}
.search-box input { width: min(290px, 100%); }
.search-box input:focus,
select:focus,
.genre-multi.open .genre-multi-btn {
  border-color: rgba(245,198,75,.55);
  background-color: rgba(255,255,255,.09);
  box-shadow: 0 0 0 3px rgba(245,198,75,.08);
}
.genre-multi-dropdown { background: #181415; }

.provider-btns {
  order: -1;
  width: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 3px;
}
.provider-btns::-webkit-scrollbar { display: none; }
.provider-btn {
  padding: 8px 15px;
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: #9c948a;
  font-size: .75rem;
}
.provider-btn:hover { transform: none; }
.provider-btn.active-all,
.provider-btn[class*="active-"]:not(.active-all) {
  background: #e23d28;
  border-color: #e23d28;
  color: white;
  box-shadow: none;
}
.result-count { color: #736c64; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; }

.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: clamp(16px, 2vw, 26px) clamp(12px, 1.7vw, 22px);
}
.card {
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.card:hover { transform: none; border: 0; background: transparent; box-shadow: none; }
.card-header { display: block; padding: 0; }
.card-thumbnail-wrap {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  background: #181415;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  overflow: hidden;
}
.card-thumbnail { position: absolute; inset: 0; }
.card:hover .card-thumbnail { transform: scale(1.035); }
.card-thumbnail-placeholder { background: #181415; color: #6e675e; }
.card-title {
  margin: 10px 0 0;
  font-size: .94rem;
  line-height: 1.3;
  font-weight: 600;
}
.card-meta {
  display: block;
  margin: 3px 0 0;
  padding: 0;
  color: #80786f;
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .score-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: rgba(12,10,11,.78);
  color: #f5c64b;
  font-size: .73rem;
  backdrop-filter: blur(8px);
}
.card .score-badge::after { content: '%'; }
.card .icon-btn {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 2;
  width: 36px;
  height: 36px;
  background: rgba(12,10,11,.76);
  border-color: rgba(255,255,255,.16);
  color: #f2ede6;
  backdrop-filter: blur(8px);
}
.card .icon-btn:hover { background: #e23d28; transform: none; }
.card-detail, .card-synopsis, .card-genre-list, .card-icons { display: none; }
.card-buttons {
  padding: 10px 0 0;
  border: 0;
  background: transparent;
}

.carousel-section { max-width: none; padding: 0; }
.carousel-section-title {
  margin-bottom: 34px;
  border: 0;
  padding: 0;
}
.carousel-section-title::after {
  content: 'CERTIFIED & STREAMING NOW';
  display: block;
  margin-top: 7px;
  color: #6e675e;
  font-size: .62rem;
  letter-spacing: .19em;
}
.carousel-row { margin-bottom: 44px; }
.carousel-row-title { font-size: 1.08rem; }
.carousel-explore { color: #9c948a; font-size: .66rem; letter-spacing: .12em; }
.carousel-track { gap: 16px; padding: 5px 2px 15px; }
.carousel-item {
  position: relative;
  width: clamp(132px, 13vw, 178px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.carousel-item:hover { transform: translateY(-3px); border: 0; background: transparent; box-shadow: none; }
.carousel-poster,
.carousel-poster-placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
}
.carousel-score {
  color: #f5c64b;
  font-size: .72rem;
  letter-spacing: .04em;
}
.carousel-providers { justify-content: flex-start; }
.carousel-provider-icon { background: rgba(255,255,255,.08) !important; color: #9c948a; }
.carousel-arrow { background: rgba(12,10,11,.85); border-color: rgba(255,255,255,.14); }
.carousel-arrow:hover { background: #e23d28; border-color: #e23d28; }

.carousel-modal { padding: 24px; }
.carousel-modal-backdrop { background: rgba(0,0,0,.84); backdrop-filter: blur(14px); }
.carousel-modal-content { width: min(1040px, 100%); border-radius: 18px; }
.detail-card { background: #0c0a0b; border-color: rgba(255,255,255,.12); }
.detail-hero { min-height: min(62vh, 610px); background: #181415; }
.detail-hero > img { opacity: .82; object-position: center 25%; }
.detail-hero-gradient {
  background:
    linear-gradient(90deg, rgba(12,10,11,.82), rgba(12,10,11,.14) 78%),
    linear-gradient(0deg, #0c0a0b 0%, rgba(12,10,11,.04) 58%);
}
.detail-close {
  top: 20px;
  right: 20px;
  background: rgba(12,10,11,.62);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px);
}
.detail-title-block { left: clamp(24px, 6vw, 70px); right: 34px; bottom: 46px; }
.detail-title-block h2 {
  margin: 10px 0 13px;
  max-width: 760px;
  font-size: clamp(2.7rem, 7vw, 5.5rem);
  letter-spacing: -.055em;
}
.detail-meta { align-items: center; color: #9c948a; font-size: .82rem; }
.detail-score {
  padding: 5px 10px;
  border-radius: 6px;
  background: #f5c64b;
  color: #2a1d02;
  font-size: .76rem;
}
.detail-body { padding: 26px clamp(24px, 6vw, 70px) 54px; }
.detail-actions { gap: 9px; }
.detail-actions .btn,
.detail-icon-btn {
  min-height: 44px;
  width: auto;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #f2ede6;
}
.detail-actions .btn:first-child { background: #e23d28; border-color: #e23d28; }
.detail-synopsis { color: #b5aca1; }
.detail-facts { border-color: rgba(255,255,255,.08); }
.detail-links a { color: #f5c64b; }
.detail-cast-member img, .detail-cast-placeholder { border-radius: 10px; background: #181415; }
.detail-related-card img { border-radius: 10px; }

.chart-card, .fetch-progress {
  background: #151213;
  border-color: rgba(255,255,255,.09);
  backdrop-filter: none;
}
.fetch-progress-bar { background: linear-gradient(90deg, #e23d28, #f5c64b); box-shadow: none; }
footer { background: #090708; border-color: rgba(255,255,255,.08); }

@media (max-width: 900px) {
  .hero { min-height: 700px; }
  .hero-content { margin-bottom: 145px; }
  .hero-stats {
    left: 24px;
    right: auto;
    bottom: 42px;
    grid-template-columns: repeat(4, minmax(68px, 1fr));
  }
  .hero-stat { min-width: 0; padding: 11px 12px; }
  .hero-refreshed { left: 24px; right: auto; bottom: 16px; }
}

@media (max-width: 700px) {
  .site-header { padding: 18px 20px; }
  .site-meta > span:first-child { display: none; }
  .hero { min-height: 690px; }
  .hero-scrim {
    background:
      linear-gradient(0deg, #0c0a0b 0%, rgba(12,10,11,.16) 70%, rgba(12,10,11,.55) 100%),
      linear-gradient(90deg, rgba(12,10,11,.6), rgba(12,10,11,.08));
  }
  .hero-content {
    width: calc(100% - 40px);
    margin: 180px 20px 148px;
  }
  .hero h1 { font-size: clamp(2.7rem, 15vw, 4.6rem); }
  .hero p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-stats { left: 20px; right: 20px; bottom: 42px; }
  .hero-stat .num { font-size: 1rem; }
  .hero-stat .lbl { font-size: .5rem; }
  .hero-refreshed { left: 20px; bottom: 16px; }
  .nav-tabs { padding: 0 8px; }
  .nav-tab { padding: 15px 12px 13px; font-size: .68rem; }
  .main { padding-top: 34px; }
  .controls > *:not(.provider-btns) { flex: 1 1 145px; }
  .search-box input { width: 100%; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carousel-modal { padding: 0; }
  .detail-hero { min-height: 470px; }
  .detail-title-block { left: 20px; right: 20px; bottom: 24px; }
  .detail-title-block h2 { font-size: clamp(2.4rem, 13vw, 4rem); }
  .detail-meta { gap: 7px; }
  .detail-meta span + span::before { margin-right: 7px; }
  .detail-body { padding: 20px 20px 46px; }
  .detail-actions .btn { flex: 1 1 auto; }
  .detail-icon-btn { padding: 0 15px; }
  .detail-related-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
