/*
 * CineVerse — Netflix-Style UI Layer
 * netflix-ui.css
 *
 * Loaded AFTER the main style.css so every rule here
 * intentionally overrides the futuristic defaults with
 * a clean Netflix-inspired dark look.
 *
 * Design tokens used:
 *   --nf-bg       #0b0b0b   page background
 *   --nf-card     #141414   card / panel background
 *   --nf-red      #e50914   Netflix accent
 *   --nf-red-dim  rgba(229,9,20,.18)
 *   --nf-white    #ffffff
 *   --nf-gray     #808080
 */

/* ============================================================
   1. GLOBAL DESIGN TOKENS (NETFLIX PALETTE)
   ============================================================ */
:root {
  --nf-bg:         #0b0b0b;
  --nf-card:       #141414;
  --nf-elevated:   #1a1a1a;
  --nf-border:     rgba(255,255,255,0.08);
  --nf-red:        #e50914;
  --nf-red-hover:  #f40612;
  --nf-red-dim:    rgba(229,9,20,0.18);
  --nf-white:      #ffffff;
  --nf-gray:       #808080;
  --nf-gray-light: #b3b3b3;
  --nf-gold:       #f5a623;

  /* Override existing theme tokens */
  --cv-bg-primary:   var(--nf-bg);
  --cv-bg-secondary: #111111;
  --cv-bg-card:      var(--nf-card);
  --cv-bg-elevated:  var(--nf-elevated);
  --cv-accent:       var(--nf-red);
  --cv-accent-dim:   var(--nf-red-dim);
  --cv-accent-glow:  0 0 20px rgba(229,9,20,0.4);
  --cv-border:       var(--nf-border);
  --cv-border-hover: rgba(255,255,255,0.2);
  --cv-text-primary: var(--nf-white);
  --cv-text-secondary: var(--nf-gray-light);
  --cv-text-muted:   var(--nf-gray);
  --cv-purple:       var(--nf-red);
}

/* ============================================================
   2. BASE OVERRIDES
   ============================================================ */
body {
  background: var(--nf-bg);
  font-family: 'Inter', 'Roboto', 'DM Sans', sans-serif;
}

/* Scrollbar — Netflix dark */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: #0b0b0b; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #666; }

a { color: var(--nf-white); }
a:hover { color: var(--nf-gray-light); }

/* ============================================================
   3. NAVBAR — Netflix black bar
   ============================================================ */
.cv-navbar {
  background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 100%);
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.4s ease;
}

.cv-navbar.scrolled {
  background: #141414;
  border-bottom: none;
}

.cv-logo {
  font-family: 'Inter', 'Roboto', sans-serif;
  font-weight: 900;
  letter-spacing: -1px;
  font-size: 1.7rem;
  color: var(--nf-red) !important;
}
.cv-logo span { color: var(--nf-white); }

.cv-nav-links a {
  color: var(--nf-gray-light);
  font-size: 0.85rem;
  font-weight: 400;
}
.cv-nav-links a:hover,
.cv-nav-links .current-menu-item a {
  color: var(--nf-white);
  background: none;
}

.cv-nav-search {
  background: rgba(0,0,0,0.6);
  border-color: rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 6px 14px;
}
.cv-nav-search:focus-within {
  border-color: rgba(255,255,255,0.7);
  box-shadow: none;
}

.cv-btn-icon {
  background: transparent;
  border-color: transparent;
}
.cv-btn-icon:hover {
  border-color: transparent;
  color: var(--nf-white);
  background: rgba(255,255,255,0.1);
}

/* ============================================================
   4. BUTTONS — Netflix style
   ============================================================ */
.cv-btn-primary {
  background: var(--nf-white);
  color: #000;
  border-radius: 4px;
  font-weight: 700;
  box-shadow: none;
  letter-spacing: 0.02em;
}
.cv-btn-primary:hover {
  background: rgba(255,255,255,0.85);
  color: #000;
  transform: none;
  box-shadow: none;
}

/* The "Play" button on hero — red variant */
.cv-btn-play {
  background: var(--nf-red) !important;
  color: var(--nf-white) !important;
  border-radius: 4px;
}
.cv-btn-play:hover {
  background: var(--nf-red-hover) !important;
}

.cv-btn-secondary {
  background: rgba(109,109,110,0.7);
  color: var(--nf-white);
  border: none;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.cv-btn-secondary:hover {
  background: rgba(109,109,110,0.5);
  border: none;
  color: var(--nf-white);
}

.cv-btn-ghost {
  border-color: var(--nf-border);
  border-radius: 4px;
  color: var(--nf-gray-light);
}
.cv-btn-ghost:hover {
  border-color: rgba(255,255,255,0.4);
  color: var(--nf-white);
  background: rgba(255,255,255,0.08);
}

/* ============================================================
   5. HERO / BANNER — Netflix cinematic hero
   ============================================================ */
.cv-hero-slider {
  height: 70vh;
  min-height: 500px;
  max-height: 860px;
}

/* Full-brightness backdrop (Netflix shows full image, not dimmed) */
.cv-hero-bg img {
  opacity: 0.55;
  filter: none;
}

/* Strong left-side gradient so text is always readable */
.cv-hero-gradient {
  background: linear-gradient(
    77deg,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.4)  40%,
    rgba(0,0,0,0.0)  65%,
    rgba(0,0,0,0.0)  80%,
    rgba(0,0,0,0.7) 100%
  ),
  linear-gradient(
    180deg,
    rgba(0,0,0,0.0)  40%,
    rgba(0,0,0,0.3)  70%,
    rgba(0,0,0,0.9) 100%
  );
}

.cv-hero-content {
  padding: 0 60px 80px;
  margin-left: 0;
  max-width: 560px;
}

.cv-hero-badge {
  display: none; /* Netflix doesn't show this pill */
}

.cv-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  letter-spacing: -0.02em;
}

.cv-hero-overview {
  font-size: 1.05rem;
  color: var(--nf-white);
  -webkit-line-clamp: 4;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.cv-hero-rating { color: var(--nf-gold); }
.cv-hero-year,
.cv-hero-runtime,
.cv-hero-genre { color: var(--nf-gray-light); }

.cv-hero-actions { gap: 10px; }

/* Slider dots — minimal Netflix style */
.cv-slider-dot {
  background: rgba(255,255,255,0.3);
  width: 10px;
  height: 3px;
  border-radius: 2px;
}
.cv-slider-dot.active,
.cv-slider-dot:hover {
  background: var(--nf-white);
  box-shadow: none;
  width: 24px;
}
.cv-slider-dots {
  background: transparent;
  backdrop-filter: none;
  gap: 4px;
}

/* Arrow buttons */
.cv-slider-btn {
  background: rgba(20,20,20,0.7);
  border-color: rgba(255,255,255,0.2);
}
.cv-slider-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
  color: var(--nf-white);
  box-shadow: none;
  transform: translateY(-50%) scale(1.05);
}

/* ============================================================
   6. SECTION HEADERS — Netflix row title style
   ============================================================ */
.cv-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--nf-white);
  letter-spacing: 0.01em;
}

/* Remove the accent bar before titles */
.cv-section-title::before { display: none; }

.cv-view-all {
  color: var(--nf-gray-light);
  font-size: 0.82rem;
  font-weight: 500;
}
.cv-view-all:hover { color: var(--nf-white); gap: 4px; }

/* ============================================================
   7. POSTER CARDS — Netflix card style with hover scale
   ============================================================ */
.cv-card {
  background: var(--nf-card);
  border: none;
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s 0.3s;
  cursor: pointer;
}

/* Netflix cards scale up and elevate with shadow */
.cv-card:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.8);
  border: none;
  z-index: 10;
}

.cv-card-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;   /* poster aspect ratio — prevents layout shift */
  overflow: hidden;
  background: var(--nf-card, #141414);
}

.cv-card-poster picture {
  display: block;
  width: 100%;
  height: 100%;
}

.cv-card-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px 4px 0 0;
  /* image-rendering forces the browser to use high-quality downscaling,
     not pixelated nearest-neighbour, when the image is larger than display size */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: none;
}
.cv-card:hover .cv-card-poster img { transform: none; }

/* Overlay — only play button, dark gradient */
.cv-card-overlay {
  background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
}
.cv-card:hover .cv-card-overlay { opacity: 1; }

/* Play button — Netflix red circle */
.cv-card-play {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9);
  color: #000;
  border-radius: 50%;
  font-size: 1rem;
  transform: scale(0.7);
  transition: transform 0.2s ease;
}
.cv-card:hover .cv-card-play { transform: scale(1); }

/* Rating badge */
.cv-card-rating {
  background: rgba(0,0,0,0.75);
  color: var(--nf-gold);
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.72rem;
}

/* Type badge */
.cv-card-badge {
  background: var(--nf-red);
  color: #fff;
  border-radius: 2px;
  font-size: 0.6rem;
  font-weight: 700;
}
.cv-card-badge.tv { background: var(--nf-red); color: #fff; }
.cv-card-badge.new { background: #46d369; color: #000; }

.cv-card-info { padding: 10px 12px 14px; }

.cv-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nf-white);
}

.cv-card-meta {
  font-size: 0.72rem;
  color: var(--nf-gray);
}

/* ============================================================
   8. HORIZONTAL SCROLL ROWS — Netflix rows
   ============================================================ */
.cv-row-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 0 16px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}

.cv-row-scroll::-webkit-scrollbar { display: none; }

.cv-row-scroll .cv-card {
  flex-shrink: 0;
  /* 6 cards @ ~1400px container: (1400 - 48px padding - 5 gaps × 8px) / 6 ≈ 216px */
  width: clamp(140px, calc((min(100vw, 1400px) - 48px - 40px) / 6), 230px);
  scroll-snap-align: start;
}

/* Make sure card hover scales don't get clipped */
.cv-section { overflow: visible; }

/* ============================================================
   9. SECTION SPACING
   ============================================================ */
.cv-section { padding: 32px 0 8px; }
.cv-section + .cv-section { padding-top: 4px; }

/* ============================================================
   10. SINGLE MOVIE/TV PAGE — Netflix cinematic detail
   ============================================================ */
.cv-single-hero {
  min-height: 65vh;
}

.cv-single-backdrop img {
  opacity: 0.3;
}

/* Left+bottom gradient (Netflix single page style) */
.cv-single-backdrop::after {
  background:
    linear-gradient(77deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(11,11,11,1) 100%);
}

.cv-single-poster {
  border-radius: 4px;
  border: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.8);
}

.cv-genre-pill {
  border-radius: 3px;
  border-color: rgba(255,255,255,0.2);
  color: var(--nf-gray-light);
  font-size: 0.72rem;
}
.cv-genre-pill:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
  color: var(--nf-white);
}

/* ============================================================
   11. YOU MAY ALSO LIKE — horizontal row on single pages
   ============================================================ */
.cv-recs-row-section {
  padding: 32px 0 48px;
}

.cv-recs-row-section .cv-row-scroll .cv-card {
  width: clamp(140px, calc((min(100vw, 1400px) - 48px - 40px) / 6), 230px);
  max-width: 230px;
}

/* Override the grid layout from single-movie.php — use row instead */
.cv-grid.cv-grid-4.cv-recs-grid-override {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
}
.cv-grid.cv-grid-4.cv-recs-grid-override::-webkit-scrollbar { display: none; }
.cv-grid.cv-grid-4.cv-recs-grid-override .cv-card-wrap {
  flex-shrink: 0;
  width: calc((100vw - 48px - 5 * 8px) / 6);
  max-width: 220px;
  min-width: 140px;
}

/* ============================================================
   12. CONTINUE WATCHING — Netflix progress style
   ============================================================ */
.cv-cw-card { width: 170px; }

.cv-cw-poster { border-radius: 4px; }

.cv-cw-play-btn {
  background: rgba(255,255,255,0.9);
  color: #000;
}

.cv-cw-progress-fill {
  background: var(--nf-red);
}

/* ============================================================
   13. UPCOMING PAGE — Netflix upcoming banner style
   ============================================================ */
.cv-upcoming-header {
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
  border-bottom: none;
}

.cv-upcoming-eyebrow { color: var(--nf-red); }

.cv-upcoming-date-badge {
  background: rgba(229,9,20,0.12);
  border-color: rgba(229,9,20,0.25);
  color: var(--nf-red);
  border-radius: 3px;
  font-size: 0.7rem;
}
.cv-upcoming-date-badge.today {
  background: rgba(70,211,105,0.15);
  border-color: rgba(70,211,105,0.3);
  color: #46d369;
}
.cv-upcoming-date-badge.soon {
  background: rgba(229,9,20,0.15);
  border-color: rgba(229,9,20,0.35);
  color: var(--nf-red);
}
.cv-upcoming-card-wrap:hover .cv-upcoming-date-badge {
  background: rgba(229,9,20,0.22);
}

/* ============================================================
   14. RATING CIRCLE — Netflix uses text not circle
   ============================================================ */
.cv-rating-circle {
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
}
.cv-rating-circle::after { display: none; }
.cv-rating-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--nf-gold);
  position: static;
}

/* ============================================================
   15. CAST SECTION
   ============================================================ */
.cv-cast-photo {
  border-color: rgba(255,255,255,0.1);
  border-radius: 50%; /* circular avatars */
}
.cv-cast-card:hover .cv-cast-photo {
  border-color: var(--cv-accent, #00D4FF);
}

/* ============================================================
   16. FOOTER
   ============================================================ */
.cv-footer {
  background: #141414;
  border-top-color: rgba(255,255,255,0.1);
}
.cv-footer-logo { color: var(--nf-white); }
.cv-footer-logo span { color: var(--nf-red); }
.cv-social-link:hover {
  border-color: rgba(255,255,255,0.3);
  color: var(--nf-white);
}

/* ============================================================
   17. TOAST / NOTIFICATIONS
   ============================================================ */
.cv-toast {
  background: var(--nf-elevated);
  border-color: rgba(255,255,255,0.1);
}
.cv-toast.success .cv-toast-icon { color: #46d369; }

/* ============================================================
   18. WATCHLIST BUTTON
   ============================================================ */
.cv-watchlist-btn {
  background: rgba(42,42,42,0.9);
  border-color: rgba(255,255,255,0.4);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  font-size: 0;
  gap: 0;
}
.cv-watchlist-btn svg { width: 18px; height: 18px; }
.cv-watchlist-btn:hover,
.cv-watchlist-btn.active {
  background: rgba(255,255,255,0.2);
  border-color: var(--nf-white);
  color: var(--nf-white);
}

/* ============================================================
   19. PAGINATION
   ============================================================ */
.cv-pagination .page-numbers {
  background: var(--nf-card);
  border-color: rgba(255,255,255,0.15);
  border-radius: 4px;
  color: var(--nf-gray-light);
}
.cv-pagination .page-numbers:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  color: var(--nf-white);
}
.cv-pagination .page-numbers.current {
  background: var(--nf-red);
  border-color: var(--nf-red);
  color: #fff;
  box-shadow: none;
}

/* ============================================================
   FIX: Keep 6-column grids at 6 columns (base theme downgrades at 1200px)
   ============================================================ */
.cv-grid-6 {
  grid-template-columns: repeat(6, 1fr) !important;
}

@media (max-width: 1200px) {
  .cv-grid-6 { grid-template-columns: repeat(6, 1fr) !important; }
}

@media (max-width: 1024px) {
  .cv-grid-6 { grid-template-columns: repeat(4, 1fr) !important; }
}

@media (max-width: 768px) {
  .cv-grid-6 { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 480px) {
  .cv-grid-6 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================================
   21. MOBILE RESPONSIVENESS
   ============================================================ */
@media (max-width: 768px) {
  .cv-hero-slider {
    height: 45vh;
    min-height: 360px;
    max-height: 520px;
  }

  .cv-hero-content {
    padding: 0 20px 48px;
  }

  .cv-hero h1 { font-size: 1.6rem; }

  .cv-hero-overview { font-size: 0.9rem; -webkit-line-clamp: 3; }

  /* Mobile: ~3 cards visible */
  .cv-row-scroll .cv-card { width: calc((100vw - 32px - 2 * 8px) / 3); min-width: 120px; max-width: 160px; }
  .cv-cw-card { width: 130px; }

  /* Mobile nav hamburger menu */
  .cv-mobile-menu {
    background: rgba(0,0,0,0.97);
  }
  .cv-mobile-menu a { color: var(--nf-white); font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .cv-hero-slider {
    height: 45vh;
    min-height: 300px;
    max-height: 420px;
  }

  /* Small phones: ~2.5 cards visible */
  .cv-row-scroll .cv-card { width: calc((100vw - 32px) / 2.5); min-width: 110px; max-width: 150px; }
  .cv-cw-card { width: 110px; }
}

/* ============================================================
   22. LAZY LOADING POSTER ANIMATION
   ============================================================ */
.cv-card-poster img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cv-card-poster img[loading="lazy"].loaded,
.cv-card-poster img:not([loading]) {
  opacity: 1;
}

/* ============================================================
   CAST / PROFILE PHOTO — circular avatar style
   ============================================================ */
.cv-cast-photo {
  width: 90px;
  height: 90px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--cv-bg-card, #1a1d29);
  margin: 0 auto 10px;
  border: 2px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.cv-cast-card:hover .cv-cast-photo {
  border-color: var(--cv-accent, #00D4FF);
}

.cv-cast-photo picture {
  display: block;
  width: 100%;
  height: 100%;
}

.cv-cast-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Cast card layout fix for circle photos */
.cv-cast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cv-cast-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cv-text-primary, #F0F4FF);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.cv-cast-character {
  font-size: 0.75rem;
  color: var(--cv-text-muted, #8B9DC3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Actor profile page — large hero photo */
.cv-actor-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: inherit;
}

/* Episode stills — 16:9 aspect */
.cv-episode-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cv-bg-card, #1a1d29);
}

.cv-episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Continue Watching card poster */
.cv-cw-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ============================================================
   23. HOVER PREVIEW INFO (Netflix info panel below card)
   ============================================================ */
.cv-card-hover-info {
  position: absolute;
  bottom: -80px;
  left: 0;
  right: 0;
  background: var(--nf-elevated);
  border-radius: 0 0 4px 4px;
  padding: 10px 12px;
  display: none;
  z-index: 20;
  box-shadow: 0 8px 20px rgba(0,0,0,0.7);
}
.cv-card:hover .cv-card-hover-info { display: block; }

.cv-card-hover-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.cv-card-hover-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--nf-white);
  margin-bottom: 3px;
}

.cv-card-hover-meta {
  font-size: 0.72rem;
  color: var(--nf-gray-light);
  display: flex;
  gap: 8px;
}

.cv-card-hover-match {
  color: #46d369;
  font-weight: 700;
}

/* ============================================================
   24. MY LIST BUTTON (Add to List)
   ============================================================ */
.cv-btn-mylist {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(42,42,42,0.9);
  border: 2px solid rgba(255,255,255,0.5);
  color: var(--nf-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0;
}
.cv-btn-mylist:hover {
  border-color: var(--nf-white);
  background: rgba(255,255,255,0.15);
}

/* ============================================================
   25. SEARCH OVERLAY — Netflix style
   ============================================================ */
.cv-search-hero {
  background: linear-gradient(180deg, #141414 0%, transparent 100%);
}
.cv-search-box {
  background: var(--nf-card);
  border-color: rgba(255,255,255,0.2);
  border-radius: 4px;
}
.cv-search-box:focus-within {
  border-color: rgba(255,255,255,0.6);
  box-shadow: none;
}
.cv-search-submit {
  background: var(--nf-red);
  border-radius: 3px;
}
.cv-search-submit:hover { background: var(--nf-red-hover); }

/* ============================================================
   26. GENRE PILLS ON BROWSE / TRENDING
   ============================================================ */
.cv-filter-select {
  background: var(--nf-card);
  border-color: rgba(255,255,255,0.2);
  color: var(--nf-gray-light);
  border-radius: 4px;
}
.cv-filter-select:focus {
  border-color: rgba(255,255,255,0.6);
  color: var(--nf-white);
  outline: none;
}

.cv-trending-tab {
  color: var(--nf-gray-light);
  border-radius: 3px;
}
.cv-trending-tab.active {
  background: var(--nf-white);
  color: #000;
}

/* ============================================================
   TRENDING PAGE GRID — responsive columns
   Desktop: 4 cols | Tablet: 3 cols | Mobile: 2 large cols
   Uses double-class for specificity to beat style.css overrides
   ============================================================ */
.cv-grid.cv-trending-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  align-items: start;
}
@media (max-width: 1024px) {
  .cv-grid.cv-trending-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 768px) {
  .cv-grid.cv-trending-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 540px) {
  .cv-grid.cv-trending-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
/* Rank number wrapper — needs padding-top so the absolute number isn't clipped */
.cv-trending-grid > div {
  padding-top: 16px;
  overflow: visible;
}
@media (max-width: 540px) {
  .cv-grid.cv-trending-grid > div > div:first-child {
    font-size: 1.4rem !important;
  }
}

/* ============================================================
   27. EPISODE LIST (single-tv.php)
   ============================================================ */
.cv-episode-card {
  background: var(--nf-card);
  border-color: rgba(255,255,255,0.06);
  border-radius: 4px;
}
.cv-episode-card:hover,
.cv-episode-card.active {
  background: var(--nf-elevated);
  border-color: rgba(255,255,255,0.15);
}
.cv-episode-progress-bar { background: rgba(255,255,255,0.1); }
.cv-episode-progress-bar .cv-episode-progress-fill,
.cv-episode-progress-fill { background: var(--nf-red); }

.cv-season-select {
  background: var(--nf-card);
  border-color: rgba(255,255,255,0.2);
  color: var(--nf-white);
  border-radius: 4px;
}

/* ============================================================
   28. VIDEO PLAYER PAGE
   ============================================================ */
.cv-server-btn {
  background: var(--nf-card);
  border-color: rgba(255,255,255,0.1);
  color: var(--nf-gray-light);
  border-radius: 4px;
}
.cv-server-btn:hover,
.cv-server-btn.active {
  background: var(--nf-red-dim);
  border-color: var(--nf-red);
  color: var(--nf-white);
}

/* ============================================================
   29. KEYWORD & BADGE ELEMENTS
   ============================================================ */
.cv-keyword-pill {
  background: rgba(229,9,20,0.1);
  border-color: rgba(229,9,20,0.25);
  color: #ff6b6b;
  border-radius: 3px;
}
.cv-keyword-pill:hover {
  background: rgba(229,9,20,0.22);
  border-color: rgba(229,9,20,0.5);
  color: var(--nf-white);
}

/* ============================================================
   30. SKELETON LOADERS
   ============================================================ */
.cv-skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: nf-shimmer 1.6s infinite;
}
@keyframes nf-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   31. AUTH PAGES (login / register) — Netflix style
   ============================================================ */
.cv-auth-card {
  background: rgba(0,0,0,0.75);
  border: none;
  border-radius: 4px;
  backdrop-filter: blur(0px);
}
.cv-auth-input {
  background: #333;
  border-color: #333;
  border-radius: 4px;
  color: var(--nf-white);
}
.cv-auth-input:focus {
  border-color: #aaa;
  box-shadow: none;
}
.cv-auth-submit {
  background: var(--nf-red);
  color: var(--nf-white);
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
}
.cv-auth-submit:hover {
  background: var(--nf-red-hover);
}
.cv-auth-title { font-size: 1.8rem; font-weight: 700; }

/* ============================================================
   32. HOVER: LAZY IMAGE LOADED
   ============================================================ */
img.cv-lazy { opacity: 0; transition: opacity 0.4s ease; }
img.cv-lazy.cv-loaded { opacity: 1; }
