@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
    background: #141414; 
    color: #FFFFFF; 
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif; 
    font-size: 16px; 
    line-height: 1.5; 
    overflow-x: hidden; 
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* CSS custom properties */
:root {
  --red: #E50914;
  --red-hover: #B20710;
  --black: #000000;
  --bg-primary: #141414;
  --bg-secondary: #1a1a1a;
  --bg-card: #1f1f1f;
  --text-primary: #FFFFFF;
  --text-secondary: #B3B3B3;
  --text-muted: #737373;
  --star-gold: #F5C518;
  --border: #333333;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --transition: 0.2s ease;
  --card-width-sm: 120px;
  --card-width-md: 160px;
  --card-width-lg: 200px;
  --nav-height: 68px;
}

/* Icon sizes */
.icon    { width: 18px; height: 18px; stroke-width: 1.8; vertical-align: middle; }
.icon-sm { width: 14px; height: 14px; stroke-width: 1.8; vertical-align: middle; }
.icon-md { width: 22px; height: 22px; stroke-width: 1.8; vertical-align: middle; }
.icon-lg { width: 28px; height: 28px; stroke-width: 1.8; vertical-align: middle; }
.icon-xl { width: 40px; height: 40px; stroke-width: 1.5; vertical-align: middle; }
.row-icon { color: #E50914; margin-right: 8px; }
.star-filled { fill: #F5C518; color: #F5C518; }
.heart-saved { fill: #E50914; color: #E50914; }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4%; z-index: 1000;
  background: transparent;
  transition: background 0.4s ease;
}
.navbar.scrolled { background: var(--black); box-shadow: 0 2px 10px rgba(0,0,0,0.8); }

.nav-left { display: flex; align-items: center; gap: 2rem; }
.logo-container { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.5px; }
.logo-net { color: var(--text-primary); }
.logo-stream { color: var(--red); }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-link { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text-secondary); transition: color var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link.active { color: var(--red); border-bottom: 2px solid var(--red); padding-bottom: 4px; }

.nav-right { display: flex; align-items: center; gap: 1.2rem; }

/* Search Bar in Nav */
.search-container { 
  position: absolute; 
  top: 85px; /* Move search down below the navbar menu row */
  left: 50%; 
  transform: translateX(-50%); 
  display: flex; 
  align-items: center; 
  z-index: 10005; /* Elevate above ad overlays and other navbar items */
}
.search-input {
  width: 320px; 
  padding: 8px 16px; 
  padding-left: 40px; 
  border: 1px solid rgba(255, 255, 255, 0.15); 
  background: rgba(20, 20, 20, 0.95); 
  color: #fff;
  border-radius: 24px; /* Fully rounded modern pill */
  outline: none; 
  transition: all 0.3s ease;
  font-family: inherit; 
  opacity: 1;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.search-input:focus { 
  border-color: var(--red); 
  background: #141414; /* Match site dark theme background */
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
}
.search-trigger { 
  position: absolute; 
  left: 14px; 
  color: var(--text-secondary); 
  cursor: pointer; 
  z-index: 2; 
}
.search-trigger:hover {
  color: #fff;
}

/* Ensure the search bar has adapted sizing on mobile screens to prevent collisions */
@media (max-width: 768px) {
  .search-input {
    width: 180px;
  }
}

/* Hamburger Menu (Mobile) */
.mobile-menu-btn { display: none; color: #fff; cursor: pointer; }
.mobile-drawer {
    position: fixed; top: 0; left: -100%; width: 250px; height: 100vh;
    background: var(--black); z-index: 999; padding-top: var(--nav-height);
    transition: left 0.3s ease; display: flex; flex-direction: column; gap: 1.5rem; padding-left: 1.5rem;
}
.mobile-drawer.open { left: 0; }

/* Categories Mega Menu */
.dropdown-container { position: relative; }
.mega-menu {
  position: absolute; top: 100%; left: 0; background: rgba(0,0,0,0.95);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1rem; display: none; grid-template-columns: 1fr 1fr; gap: 2rem;
  min-width: 400px;
}
.dropdown-container:hover .mega-menu { display: grid; }
.mega-menu h3 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.8rem; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.mega-menu ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.mega-menu li a { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); transition: color var(--transition); }
.mega-menu li a:hover { color: var(--text-primary); }

/* Hero banner */
.hero { position: relative; height: 90vh; min-height: 500px; overflow: hidden; }
.hero-backdrop { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.hero-backdrop.loaded { opacity: 1; }
.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, #141414 100%),
              linear-gradient(to right, rgba(0,0,0,0.7) 50%, transparent 100%);
}
.hero-content { position: absolute; bottom: 15%; left: 5%; max-width: 550px; }
.hero-badge { display: inline-flex; background: var(--red); color: white; padding: 2px 6px; font-size: 0.7rem; font-weight: 900; border-radius: 2px; margin-bottom: 0.5rem; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: bold; color: white; letter-spacing: -0.5px; margin-bottom: 0.5rem; line-height: 1.1; }
.hero-meta { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: #fff; margin-bottom: 0.8rem; flex-wrap: wrap; }
.age-rating { border: 1px solid var(--red); color: var(--text-primary); padding: 1px 4px; border-radius: 3px; font-size: 0.75rem; }
.hero-rating { display: flex; align-items: center; gap: 4px; }
.hero-overview { max-height: 4.5em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; font-size: 1rem; color: #B3B3B3; margin-bottom: 1.5rem; }
.hero-buttons { display: flex; gap: 1rem; }
.hero-volume { position: absolute; bottom: 15%; right: 5%; cursor: pointer; color: white; padding: 8px; border: 1px solid rgba(255,255,255,0.5); border-radius: 50%; }
.hero-indicators { position: absolute; bottom: 5%; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.3s ease; }
.hero-dot.active { background: var(--red); width: 20px; border-radius: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 0.6rem 1.4rem; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 700; transition: all var(--transition); cursor: pointer; }
.btn-primary   { background: var(--text-primary); color: var(--black); }
.btn-primary:hover { background: rgba(255,255,255,0.8); }
.btn-secondary { background: rgba(109,109,110,0.7); color: var(--text-primary); }
.btn-secondary:hover { background: rgba(109,109,110,0.4); }
.btn-red       { background: var(--red); color: var(--text-primary); }
.btn-red:hover { background: var(--red-hover); }

/* Content rows */
.content-row { padding: 1.5rem 4%; margin-bottom: 1rem; }
.row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.row-title { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; }
.see-all-link { font-size: 0.875rem; color: #54b3d6; font-weight: 600; display: flex; align-items: center; gap: 4px; transition: color var(--transition); }
.see-all-link:hover { color: var(--text-primary); }

/* Carousel */
.carousel-wrapper { position: relative; }
.carousel-track {
  display: flex; gap: 8px;
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 8px 0 12px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 80px;
  background: rgba(0,0,0,0.6); color: #fff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  z-index: 5; transition: background var(--transition);
}
.carousel-btn:hover { background: rgba(0,0,0,0.9); }
.carousel-btn.prev { left: -20px; }
.carousel-btn.next { right: -20px; }
.carousel-btn.hidden { display: none; }

/* Media card */
.media-card { flex: 0 0 var(--card-width-md); cursor: pointer; border-radius: var(--radius-md); overflow: hidden; transition: transform var(--transition); position: relative; }
.media-card:hover { transform: scale(1.08); z-index: 10; box-shadow: 0 10px 20px rgba(0,0,0,0.8); }
.card-poster-wrap { position: relative; aspect-ratio: 2/3; background: var(--bg-card); }
.card-poster-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; flex-direction: column;
  justify-content: space-between; padding: 8px;
  opacity: 0; transition: opacity var(--transition);
}
.media-card:hover .card-overlay { opacity: 1; }
.play-btn { align-self: center; margin-top: auto; color: #fff; }
.play-btn:hover { color: var(--red); }
.wishlist-btn { position: absolute; top: 8px; right: 8px; color: #fff; background: rgba(0,0,0,0.5); border-radius: 50%; padding: 4px; display: flex; }
.wishlist-btn:hover { background: rgba(0,0,0,0.8); }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: #fff; }
.card-rating { display: flex; align-items: center; gap: 2px; }
.card-title { font-size: 0.8rem; color: var(--text-secondary); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-badge { position: absolute; top: 8px; left: 8px; font-size: 0.65rem; padding: 2px 6px; border-radius: var(--radius-sm); font-weight: bold; background: rgba(0,0,0,0.6); }

/* Trending Slider Section */
#trending-slider-section { background: var(--black); padding: 2rem 4%; }
.trending-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-left: 4px solid var(--red); padding-left: 12px; }
.trending-header h2 { font-size: 1.5rem; font-weight: bold; display: flex; align-items: center; gap: 8px; }
.toggle-pill { display: inline-flex; background: var(--bg-card); border-radius: 20px; overflow: hidden; max-width: 100%; }
.toggle-btn { flex: 1; min-width: 0; padding: 6px 12px; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); display: flex; justify-content: center; align-items: center; gap: 6px; transition: all 0.3s ease; }
.toggle-btn.active { background: var(--red); color: #fff; }
.spotlight-track { display: flex; gap: 1.5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 1rem; }
.spotlight-track::-webkit-scrollbar { display: none; }
.spotlight-card { display: flex; align-items: center; min-width: 350px; background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; position: relative; }
.spotlight-rank { position: absolute; left: 0; bottom: -10px; font-size: 5rem; font-weight: 900; color: var(--red); opacity: 0.9; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); z-index: 2; line-height: 1; margin-left: 10px; }
.spotlight-img { width: 140px; height: 100%; object-fit: cover; z-index: 1; }
.spotlight-info { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 2; flex: 1; }
.spotlight-info h3 { font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.spotlight-meta { display: flex; gap: 8px; font-size: 0.75rem; color: var(--text-muted); align-items: center; }
.spotlight-desc { font-size: 0.8rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Filter Bar (Movies, TV Shows, Search) */
.page-header { padding: calc(var(--nav-height) + 2rem) 4% 1rem; }
.page-title { font-size: 2rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 10px;}
.breadcrumb { font-size: 0.9rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.filter-bar { background: var(--bg-card); padding: 1rem; border-radius: var(--radius-md); display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-bottom: 2rem; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-label { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.filter-select, .filter-input { background: var(--bg-primary); border: 1px solid var(--border); color: #fff; padding: 6px 12px; border-radius: var(--radius-sm); outline: none; font-family: inherit; }
.filter-pill-group { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill { padding: 4px 10px; border-radius: 15px; border: 1px solid var(--border); font-size: 0.8rem; cursor: pointer; display: flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.filter-pill.active { background: var(--red); border-color: var(--red); color: #fff; }

/* Results Grid */
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 0 4% 3rem; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 2rem 0; }
.page-btn { padding: 6px 12px; border-radius: var(--radius-sm); background: var(--bg-card); color: #fff; }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.page-btn:hover:not(:disabled) { background: var(--red); }
.page-info { font-size: 0.9rem; color: var(--text-secondary); }

/* Detail Page Hero */
.detail-hero { position: relative; min-height: 80vh; padding-top: var(--nav-height); display: flex; align-items: center; }
.detail-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.3; }
.detail-content { position: relative; z-index: 2; display: flex; gap: 3rem; padding: 2rem 4%; align-items: flex-start; max-width: 1200px; margin: 0 auto;}
.detail-poster { width: 300px; border-radius: var(--radius-lg); box-shadow: 0 0 20px rgba(0,0,0,0.8); flex-shrink: 0; }
.detail-info { flex: 1; }
.detail-title { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 0.5rem; }
.detail-tagline { font-size: 1.2rem; font-style: italic; color: var(--text-secondary); margin-bottom: 1rem; }
.detail-meta-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; align-items: center; font-size: 0.95rem; }
.detail-meta-item { display: flex; align-items: center; gap: 6px; }
.detail-genres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.genre-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.detail-overview { font-size: 1.1rem; line-height: 1.6; margin-bottom: 2rem; color: #e5e5e5; }
.detail-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Tabs */
.tabs-section { padding: 2rem 4%; max-width: 1200px; margin: 0 auto;}
.tabs { display: flex; border-bottom: 1px solid #333; margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.tab-btn { display: flex; align-items: center; gap: 6px; padding: 0.75rem 1.25rem; font-size: 0.95rem; color: var(--text-muted); border-bottom: 2px solid transparent; transition: all var(--transition); white-space: nowrap; }
.tab-btn:hover   { color: var(--text-primary); }
.tab-btn.active  { color: var(--text-primary); border-bottom-color: var(--red); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Cast Row */
.cast-row { display: flex; gap: 1rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: 1rem; }
.cast-card { min-width: 140px; text-align: center; }
.cast-img-wrap { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; margin: 0 auto 0.5rem; background: var(--bg-card); display: flex; align-items: center; justify-content: center; }
.cast-img { width: 100%; height: 100%; object-fit: cover; }
.cast-name { font-weight: bold; font-size: 0.9rem; margin-bottom: 2px; }
.cast-char { font-size: 0.8rem; color: var(--text-muted); }
.cast-initials { font-size: 2rem; font-weight: bold; color: var(--text-muted); }

/* Episodes Tab */
.episodes-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.season-select { background: var(--bg-card); color: #fff; border: 1px solid var(--border); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 1rem; outline: none; }
.episodes-list { display: flex; flex-direction: column; gap: 1rem; }
.episode-card { display: flex; gap: 1.5rem; background: var(--bg-secondary); border-radius: var(--radius-md); overflow: hidden; padding: 1rem; transition: background var(--transition); }
.episode-card:hover { background: var(--bg-card); }
.ep-img-wrap { width: 220px; flex-shrink: 0; position: relative; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; aspect-ratio: 16/9; background: var(--black); }
.ep-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.ep-play-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition); }
.ep-img-wrap:hover .ep-play-overlay { opacity: 1; }
.ep-info { flex: 1; }
.ep-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.ep-title { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px;}
.ep-number { font-size: 1.2rem; color: var(--text-muted); font-weight: 900; }
.ep-meta { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.8rem; }
.ep-overview { font-size: 0.9rem; color: #ccc; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Details Table */
.details-table { width: 100%; max-width: 800px; border-collapse: collapse; }
.details-table tr { border-bottom: 1px solid var(--border); }
.details-table td { padding: 1rem 0; font-size: 0.95rem; }
.details-table td:first-child { color: var(--text-muted); width: 40%; display: flex; align-items: center; gap: 8px; }

/* Video Player Modal (Vidrock) */
.video-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.95);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.video-modal-overlay.active { opacity: 1; pointer-events: auto; }
.video-modal-content { width: 90%; max-width: 1200px; aspect-ratio: 16/9; position: relative; background: #000; border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 0 30px rgba(0,0,0,0.8); }
.video-modal-content iframe { width: 100%; height: 100%; border: none; }
.close-modal-btn { position: absolute; top: -40px; right: 0; color: #fff; background: none; border: none; cursor: pointer; }
.close-modal-btn:hover { color: var(--red); }

/* Watchlist Side Panel */
.watchlist-panel {
  position: fixed; top: 0; right: -400px; width: 400px; max-width: 100%; height: 100vh;
  background: var(--bg-secondary); z-index: 1500; box-shadow: -5px 0 20px rgba(0,0,0,0.8);
  transition: right 0.4s ease; display: flex; flex-direction: column;
}
.watchlist-panel.open { right: 0; }
.watchlist-header { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.watchlist-header h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.watchlist-items { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.watchlist-item { display: flex; gap: 1rem; background: var(--bg-card); padding: 8px; border-radius: var(--radius-sm); position: relative; }
.watchlist-item img { width: 80px; aspect-ratio: 2/3; object-fit: cover; border-radius: 2px; cursor: pointer; }
.watchlist-item-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.watchlist-item-title { font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.watchlist-item-meta { font-size: 0.8rem; color: var(--text-muted); }
.remove-watchlist-btn { position: absolute; top: 8px; right: 8px; color: var(--text-muted); padding: 4px; }
.remove-watchlist-btn:hover { color: var(--red); }
.watchlist-empty { text-align: center; color: var(--text-muted); padding: 3rem 1rem; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: #333; color: #fff; padding: 12px 20px;
  border-radius: var(--radius-md); font-size: 0.9rem;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  animation: slideInRight 0.3s ease, fadeOut 0.4s ease 2.1s forwards;
}
.toast.success { border-left: 4px solid #46d369; }
.toast.error   { border-left: 4px solid var(--red); }
.toast.info    { border-left: 4px solid var(--text-muted); }
.toast-icon    { flex-shrink: 0; }
@keyframes slideInRight { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut      { to   { opacity: 0; transform: translateY(10px); } }

/* Spinner & skeleton */
.spinner { animation: spin 1s linear infinite; color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-wrap { display: flex; justify-content: center; padding: 3rem 0; width: 100%; }

.shimmer {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card  { flex: 0 0 var(--card-width-md); border-radius: var(--radius-md); overflow: hidden; }
.skeleton-poster { aspect-ratio: 2/3; }
.skeleton-title  { height: 14px; margin: 8px 4px; border-radius: 4px; }

/* Empty States */
.empty-state { padding: 4rem 1rem; text-align: center; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; grid-column: 1 / -1;}
.empty-state h3 { font-size: 1.2rem; color: var(--text-primary); }

/* Footer */
footer { background: #0a0a0a; padding: 4rem 4% 2rem; color: #737373; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-col h4 { font-size: 1rem; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.footer-links li a { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; transition: color var(--transition); }
.footer-links li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #222; padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; }
.tmdb-attribution { display: flex; align-items: center; gap: 10px; }
.tmdb-logo { height: 16px; }

/* Specific Genre Colors */
.genre-action { background: #3d1a1a; color: #ff6b6b; }
.genre-comedy { background: #1a3d1a; color: #69db7c; }
.genre-drama { background: #1a1a3d; color: #74c0fc; }
.genre-horror { background: #2d1a2d; color: #cc5de8; }
.genre-scifi { background: #1a2d3d; color: #4dabf7; }
.genre-thriller { background: #3d2d1a; color: #ffa94d; }
.genre-romance { background: #3d1a2d; color: #f783ac; }
.genre-documentary { background: #1a2d2d; color: #38d9a9; }
.genre-animation { background: #2d2d1a; color: #ffe066; }
.genre-crime { background: #2d1a1a; color: #ff8787; }
.genre-default { background: #2a2a2a; color: #aaaaaa; }

/* Search specific */
.search-tabs { display: flex; gap: 1rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.search-tab-btn { padding: 8px 16px; border-radius: 20px; background: var(--bg-card); color: var(--text-secondary); display: flex; align-items: center; gap: 6px; transition: all 0.3s; }
.search-tab-btn.active { background: var(--text-primary); color: var(--black); font-weight: 600; }
.search-results-info { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }

/* Responsive breakpoints */
@media (max-width: 1024px) {
  :root { --card-width-md: 140px; }
  .hero-content { max-width: 420px; }
  .detail-content { flex-direction: column; }
  .detail-poster { width: 200px; margin: 0 auto; }
  .detail-info { text-align: center; }
  .detail-meta-row, .detail-genres, .detail-actions { justify-content: center; }
}
@media (max-width: 768px) {
  :root { --card-width-md: 120px; }
  .hero { height: 70vh; }
  .hero-content { bottom: 10%; left: 4%; right: 4%; max-width: 100%; text-align: center; }
  .hero-meta, .hero-buttons, .hero-rating { justify-content: center; }
  .carousel-btn { display: none; }
  .content-row { padding: 1rem 3%; }
  .navbar { padding: 0 3%; }
  /* Footer: 3 columns side-by-side on mobile */
  footer { padding: 2rem 3% 1rem; margin-top: 2rem; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
  .footer-col h4 { font-size: 0.8rem; margin-bottom: 0.5rem; }
  .footer-links { gap: 0.4rem; }
  .footer-links li a { font-size: 0.72rem; gap: 3px; }
  .footer-links li a svg { width: 12px; height: 12px; }
  .footer-bottom { font-size: 0.7rem; padding-top: 0.8rem; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-container.active .search-input { width: 160px; }
  .watchlist-panel { width: 100%; right: -100%; }
  .episode-card { flex-direction: column; gap: 1rem; }
  .ep-img-wrap { width: 100%; }
}
@media (max-width: 480px) {
  :root { --card-width-md: 105px; }
  .row-title { font-size: 1rem; }
  .spotlight-card { min-width: 280px; }
  .spotlight-img { width: 100px; }
  .detail-poster { width: 150px; }
}
