:root {
  --bg-main: #0b0e14;
  --bg-card: #151a23;
  --bg-card-hover: #1c2330;
  --bg-drawer: #0f131a;
  --primary: #e50914;
  --primary-glow: rgba(229, 9, 20, 0.45);
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --gold: #f59e0b;
  --telegram: #0088cc;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(229, 9, 20, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ===================================================== */
/* Top Announcement & Sponsor Strip                      */
/* ===================================================== */
.top-sponsor-strip {
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  border-bottom: 1px solid rgba(147, 51, 234, 0.25);
  padding: 6px 0;
  position: relative;
  z-index: 101;
}

.top-sponsor-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sponsor-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
}

.sponsor-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sponsor-text {
  font-size: 0.82rem;
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sponsor-text strong {
  color: #38bdf8;
}

.sponsor-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0088cc;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.35);
}

.sponsor-pill-btn:hover {
  background: #0099e6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.5);
}

/* ===================================================== */
/* Top Navbar                                            */
/* ===================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-icon-btn {
  background: #151a23;
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: var(--transition);
}

.nav-icon-btn:hover {
  background: #1f2737;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--primary);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #b20710);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.logo-text .highlight {
  color: var(--primary);
}

.badge-tag {
  background: rgba(229, 9, 20, 0.15);
  color: var(--primary);
  border: 1px solid rgba(229, 9, 20, 0.3);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #ffffff;
  background: rgba(229, 9, 20, 0.14);
  border: 1px solid rgba(229, 9, 20, 0.3);
}

.nav-caret {
  font-size: 0.65rem;
  opacity: 0.7;
}

/* Search Container */
.search-container {
  position: relative;
  width: 100%;
  max-width: 340px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.search-container input {
  width: 100%;
  background: #151a23;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 9px 36px 9px 38px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: inherit;
  transition: var(--transition);
}

.search-container input:focus {
  outline: none;
  border-color: var(--primary);
  background: #1a202c;
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  padding: 8px 14px;
}

.btn-sync-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #151a23;
  border: 1px solid var(--border);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition);
}

.btn-sync-icon:hover {
  background: #1f2737;
  border-color: #38bdf8;
  transform: rotate(45deg);
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
}

.stat-badge i {
  color: var(--primary);
}

.stat-badge span {
  color: #ffffff;
}

/* ===================================================== */
/* Collapsible Genre Sidebar Drawer                      */
/* ===================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.genre-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 340px;
  max-width: 85vw;
  background: var(--bg-drawer);
  border-right: 1px solid var(--border);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.8);
}

.genre-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.drawer-brand i {
  color: var(--primary);
}

.drawer-close-btn {
  background: #151a23;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.drawer-close-btn:hover {
  color: #ffffff;
  border-color: var(--primary);
  background: rgba(229, 9, 20, 0.2);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.drawer-section {
  margin-bottom: 24px;
}

.drawer-section-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 2px;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  font-family: inherit;
}

.drawer-nav-item i {
  width: 18px;
  color: var(--accent);
}

.drawer-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border);
  transform: translateX(4px);
}

.admin-tool-item {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}
.admin-tool-item:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
}

.drawer-genres-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.drawer-genre-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #151a23;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  font-family: inherit;
}

.drawer-genre-btn:hover {
  background: #1e2533;
  color: #ffffff;
  border-color: var(--primary);
  transform: translateX(4px);
}

.drawer-genre-btn.active {
  background: rgba(229, 9, 20, 0.15);
  border-color: var(--primary);
  color: #ffffff;
}

.drawer-genre-count {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--text-muted);
}

/* ===================================================== */
/* Live Sync Banner                                      */
/* ===================================================== */
.sync-banner {
  display: none;
  background: #1e293b;
  border-bottom: 1px solid var(--border);
  padding: 9px 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.sync-banner.active {
  display: block;
}

.sync-banner.success {
  background: #064e3b;
  color: #a7f3d0;
}

.sync-banner.info {
  background: #1e3a8a;
  color: #bfdbfe;
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ===================================================== */
/* Main Layout & Views                                   */
/* ===================================================== */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px 60px;
}

/* ===================================================== */
/* Hero Carousel Slider (Cinematic Masterpiece Layout)   */
/* ===================================================== */
.hero-slider-section {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  min-height: 400px;
  background: #0b0e14;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-slides {
  position: relative;
  width: 100%;
  min-height: 400px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  transform: scale(1.02);
  transition: transform 6s ease-out;
}

.hero-slide.active .hero-backdrop {
  transform: scale(1);
}

/* Horizontal dark fade for text readability */
.hero-overlay-horizontal {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #0b0e14 0%,
    rgba(11, 14, 20, 0.94) 34%,
    rgba(11, 14, 20, 0.55) 58%,
    rgba(11, 14, 20, 0.15) 85%,
    transparent 100%
  );
  z-index: 1;
}

/* Bottom fade blending subtly without huge black void */
.hero-overlay-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(11, 14, 20, 0.75) 0%,
    transparent 28%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  padding: 38px 44px 44px;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-tag {
  background: var(--primary);
  color: white;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.meta-item.quality {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
}

.meta-item.servers-count {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
}

.hero-genres-chips {
  display: inline-flex;
  gap: 6px;
}

.hero-genre-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
}

.hero-title {
  font-size: 2.9rem;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 12px;
  letter-spacing: -0.6px;
  color: #ffffff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
}

.hero-meta .rating {
  color: var(--gold);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item.sound {
  color: #94a3b8;
  font-size: 0.8rem;
}

.hero-desc {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 580px;
}

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

.btn-hero-play {
  background: linear-gradient(135deg, var(--primary), #b20710);
  color: white;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
}
.btn-hero-play:hover {
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: translateY(-2px);
}

.btn-hero-trailer {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: white;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}
.btn-hero-trailer:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(0, 0, 0, 0.4);
  color: #cbd5e1;
  border: 1px solid var(--border);
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 10px;
}
.btn-glass:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

/* Bottom-Right Slider Controls (No text overlap) */
.hero-slider-controls {
  position: absolute;
  bottom: 18px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  background: rgba(11, 14, 20, 0.75);
  backdrop-filter: blur(10px);
  padding: 5px 12px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.slider-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
}
.slider-ctrl-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

.slider-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition);
}
.slider-dot.active {
  width: 22px;
  border-radius: 6px;
  background: var(--primary);
}

/* ===================================================== */
/* Shelves / 2-Line Grid Sections                        */
/* ===================================================== */
.shelf-section {
  margin-bottom: 40px;
}

.shelf-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.shelf-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.highlight-icon {
  color: var(--primary);
}
.highlight-icon.gold {
  color: var(--gold);
}

.shelf-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.shelf-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shelf-see-all {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
  transition: var(--transition);
}
.shelf-see-all:hover {
  transform: translateX(3px);
  color: #ff3344;
}

/* 2-Line Grid (6 cards per line = 12 cards total per shelf) */
.shelf-track-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding: 4px 0 10px;
}

.shelf-loader {
  grid-column: 1 / -1;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ===================================================== */
/* Movie Cards                                           */
/* ===================================================== */
.movie-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.shelf-track-container .movie-card,
.movies-grid .movie-card {
  flex: auto;
  width: 100%;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(229, 9, 20, 0.35);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.8), 0 0 14px var(--primary-glow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2/3;
  width: 100%;
  background: #1e2533;
  overflow: hidden;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.poster-quality {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.poster-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gold);
}

.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

.play-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: scale(0.85);
  transition: var(--transition);
}

.movie-card:hover .play-icon-btn {
  transform: scale(1);
}

.movie-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.movie-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #ffffff;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.servers-indicator {
  color: #38bdf8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-categories {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.cat-chip {
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.62rem;
  padding: 1px 5px;
  border-radius: 4px;
  color: #94a3b8;
}

/* ===================================================== */
/* Telegram CTA Card                                     */
/* ===================================================== */
.telegram-cta-section {
  margin-top: 20px;
}

.telegram-cta-card {
  background: linear-gradient(135deg, #0b1f3a, #112d53);
  border: 1px solid rgba(0, 136, 204, 0.3);
  border-radius: var(--radius-lg);
  padding: 26px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 136, 204, 0.15);
}

.telegram-cta-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cta-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #0088cc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.cta-text h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.cta-text p {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.5;
}

.btn-telegram {
  background: #0088cc;
  color: white;
  padding: 11px 22px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 136, 204, 0.4);
}
.btn-telegram:hover {
  background: #0099e6;
  transform: translateY(-2px);
}

/* ===================================================== */
/* Catalog View (Dedicated Grid & Numbered Pagination)   */
/* ===================================================== */
.catalog-section {
  padding-top: 6px;
}

.catalog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.catalog-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.catalog-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.catalog-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Type Switcher Tabs */
.type-switcher {
  display: flex;
  background: #151a23;
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 9px;
}

.type-tab {
  padding: 6px 15px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.type-tab:hover {
  color: white;
}

.type-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Sort Selector */
.sort-selector-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sort-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
  pointer-events: none;
}

.sort-select {
  background: #151a23;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-main);
  padding: 7px 12px 7px 32px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--primary);
}

/* Active Filter Bar */
.active-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  background: rgba(229, 9, 20, 0.08);
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: 8px;
  font-size: 0.82rem;
}

.active-filter-label {
  color: var(--text-muted);
  font-weight: 600;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  padding: 2px 9px;
  border-radius: 16px;
  font-weight: 700;
}

.active-filter-chip button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  opacity: 0.8;
}
.active-filter-chip button:hover {
  opacity: 1;
}

/* Category Horizontal Filter Pills */
.category-filter-bar {
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-filter-bar::-webkit-scrollbar {
  display: none;
}

.category-pills {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
}

.cat-pill {
  padding: 6px 14px;
  background: #151a23;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-pill:hover {
  background: #1c2330;
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.cat-count {
  font-size: 0.68rem;
  opacity: 0.7;
}

/* Movies Grid (6 movies per line = exactly 24 movies in 4 complete lines) */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

/* ===================================================== */
/* Numbered Pagination Component                         */
/* ===================================================== */
.pagination-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 24px 0 50px;
  padding: 20px;
  background: #151a23;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #10141c;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  background: #202736;
  border-color: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-btn.ellipsis {
  background: transparent;
  border-color: transparent;
  cursor: default;
  color: var(--text-muted);
}

/* ===================================================== */
/* Cinema Video Player Modal                             */
/* ===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #0f131a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1060px;
  max-height: 94vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 30px rgba(229, 9, 20, 0.2);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-title-wrap h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-title-wrap .badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: inline-block;
}

.close-modal-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1c2330;
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}
.close-modal-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000000;
}

.player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.player-loader {
  position: absolute;
  inset: 0;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 5;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.player-controls {
  padding: 16px 24px;
  background: #151a23;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.controls-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.server-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.server-btn {
  padding: 8px 14px;
  background: #0b0e14;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.server-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

/* Hero Vertical Poster Showcase */
.hero-poster-showcase {
  position: absolute;
  right: 100px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.hero-poster-frame {
  position: relative;
  width: 220px;
  aspect-ratio: 2/3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.9), 0 0 25px rgba(229, 9, 20, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.hero-poster-frame:hover {
  transform: scale(1.03) translateY(-4px);
  border-color: rgba(229, 9, 20, 0.5);
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.95), 0 0 30px var(--primary-glow);
}

.hero-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-poster-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.hero-poster-badge i {
  color: var(--primary);
}

/* Modal Movie Details & Cover Poster Column */
.modal-movie-details {
  display: flex;
  gap: 22px;
  padding: 20px 24px;
  background: #11151d;
  border-bottom: 1px solid var(--border);
}

.modal-cover-column {
  flex: 0 0 130px;
}

.modal-poster-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

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

.poster-hd-tag {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  white-space: nowrap;
}

.modal-info-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-info-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-info-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.info-badge {
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
}

.info-badge.rating {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.info-badge.year {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.info-badge.quality {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.info-badge.servers {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.modal-synopsis {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 4px;
}

.modal-taxonomies {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
  padding: 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #11151d;
  border-bottom: 1px solid var(--border);
}

.modal-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
}

.modal-meta-row strong {
  color: var(--text-muted);
  margin-right: 4px;
}

.cat-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-chip {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
}

.modal-footer-details {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-tags {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-note {
  font-size: 0.78rem;
  color: #f59e0b;
}

/* ===================================================== */
/* Responsive Media Queries                              */
/* ===================================================== */
@media (max-width: 1400px) {
  .hero-content {
    padding: 34px 30px;
  }
  .hero-title {
    font-size: 2.3rem;
  }
  .movies-grid,
  .shelf-track-container {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
  }
}

@media (max-width: 1200px) {
  .hero-poster-showcase {
    display: none;
  }
  .movies-grid,
  .shelf-track-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal scrolling */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* 1. Top Sponsor Strip */
  .top-sponsor-strip {
    padding: 8px 0;
  }
  .top-sponsor-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 0 14px;
  }
  .sponsor-left {
    white-space: normal;
    flex-wrap: wrap;
    gap: 6px;
  }
  .sponsor-text {
    font-size: 0.75rem;
    white-space: normal;
  }
  .sponsor-pill-btn {
    width: 100%;
    justify-content: center;
    padding: 6px 12px;
  }

  /* 2. Top Navbar & Mobile Search */
  .navbar {
    padding: 8px 0;
  }
  .nav-container {
    padding: 0 14px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav-left {
    flex: 1;
    gap: 10px;
  }
  .nav-links {
    display: none;
  }
  .stat-badge {
    display: none;
  }
  .brand .logo-text {
    font-size: 1.18rem;
  }
  .brand .badge-tag {
    display: none;
  }
  .search-container {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
  }
  .search-container input {
    padding: 8px 36px 8px 36px;
    font-size: 0.82rem;
  }

  /* 3. Main Container */
  .main-content {
    padding: 12px 12px 40px;
  }

  /* 4. Cinematic Hero Carousel Section */
  .hero-slider-section {
    min-height: 420px;
    margin-bottom: 22px;
    border-radius: 12px;
  }
  .hero-poster-showcase {
    display: none !important;
  }
  .hero-content {
    padding: 20px 16px 65px;
  }
  .hero-badge-row {
    gap: 6px;
    margin-bottom: 8px;
  }
  .hero-tag, .hero-content .meta-item {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  .hero-genres-chips {
    display: none;
  }
  .hero-title {
    font-size: 1.45rem;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  .hero-meta {
    gap: 8px;
    font-size: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 10px;
  }
  .hero-desc {
    font-size: 0.8rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    margin-bottom: 16px;
    max-width: 100%;
  }
  .hero-buttons {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .btn-hero-play, .btn-hero-details {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .hero-slider-controls {
    bottom: 14px;
    right: 14px;
  }

  /* 5. Shelf Sections & Headers */
  .shelf-section {
    margin-bottom: 26px;
  }
  .shelf-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 12px;
  }
  .shelf-title {
    font-size: 1.2rem;
  }
  .shelf-subtitle {
    font-size: 0.76rem;
  }
  .shelf-controls {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
  .shelf-see-all {
    font-size: 0.8rem;
  }

  /* 6. Movie Cards Grid */
  .movies-grid,
  .shelf-track-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .movie-card {
    border-radius: 8px;
  }
  .movie-info {
    padding: 7px 8px;
  }
  .movie-title {
    font-size: 0.78rem;
    margin-bottom: 3px;
  }
  .movie-meta {
    font-size: 0.68rem;
  }
  .servers-indicator {
    font-size: 0.68rem;
    gap: 2px;
  }
  .poster-quality, .poster-badge {
    font-size: 0.58rem;
    padding: 1px 4px;
  }

  /* 7. Catalog View Controls */
  .catalog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
  }
  .catalog-title {
    font-size: 1.35rem;
  }
  .catalog-subtitle {
    font-size: 0.78rem;
  }
  .catalog-controls {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .type-switcher {
    flex: 1 1 100%;
    justify-content: space-between;
  }
  .type-tab {
    flex: 1;
    text-align: center;
    padding: 7px 6px;
    font-size: 0.78rem;
  }
  .sort-selector-wrap {
    flex: 1 1 100%;
    width: 100%;
  }
  .sort-select {
    width: 100%;
    padding: 8px 10px 8px 32px;
    font-size: 0.82rem;
  }
  .category-filter-bar {
    padding: 4px 0;
    margin-bottom: 16px;
  }
  .pill-scroll-arrow {
    display: none !important;
  }
  .category-pills {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
  }
  .category-pills::-webkit-scrollbar {
    display: none;
  }

  /* 8. Adsterra 728x90 Banner scaling container */
  .ad-banner-section {
    margin: 16px 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .ad-badge-top {
    width: 100%;
    padding: 0 4px;
    font-size: 0.68rem;
  }
  .adsterra-banner-container {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 4px;
  }

  /* 9. Video Modal Player */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal-content {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
  .modal-header {
    padding: 10px 14px;
  }
  .modal-title-wrap h3 {
    font-size: 1rem;
  }
  .player-controls {
    padding: 10px 14px;
    gap: 8px;
  }
  .controls-label {
    width: 100%;
    font-size: 0.78rem;
  }
  .server-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .server-btn {
    padding: 6px 10px;
    font-size: 0.76rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .modal-movie-details {
    padding: 14px;
    gap: 12px;
  }
  .modal-cover-column {
    display: none;
  }
  .modal-info-title {
    font-size: 1.1rem;
  }
  .modal-synopsis {
    font-size: 0.8rem;
  }
  .modal-footer-details {
    padding: 12px 14px;
  }

  /* 10. Telegram Promo Card */
  .telegram-cta-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 14px;
  }
  .telegram-cta-content {
    gap: 12px;
  }
  .cta-icon {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
  }
  .cta-text h3 {
    font-size: 1.05rem;
  }
  .cta-text p {
    font-size: 0.78rem;
  }
  .btn-telegram {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 0.86rem;
  }

  /* 11. Pagination */
  .pagination-wrapper {
    padding: 14px 8px;
    margin: 18px 0 32px;
  }
  .page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 0.76rem;
  }
}

@media (max-width: 480px) {
  .movies-grid,
  .shelf-track-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .hero-slider-section {
    min-height: 440px;
  }
  .hero-title {
    font-size: 1.3rem;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .btn-hero-play, .btn-hero-details {
    width: 100%;
  }
  .type-tab {
    padding: 6px 4px;
    font-size: 0.74rem;
  }
}

/* ===================================================== */
/* TV Series Season & Episode Browser (Pro Cinema UI)    */
/* ===================================================== */
.tv-episode-selector.pro-browser {
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* 1. Top Controls Bar */
.tv-browser-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tv-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.season-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.season-select-wrapper .select-icon {
  position: absolute;
  left: 14px;
  color: #e50914;
  font-size: 0.88rem;
  pointer-events: none;
  z-index: 2;
}

.pro-season-select {
  appearance: none;
  background: #171d2b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 36px 8px 38px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
}

.pro-season-select:hover,
.pro-season-select:focus {
  border-color: #e50914;
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.3);
}

.tv-total-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tv-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* View Mode Switcher (List vs Grid) */
.ep-view-switcher {
  display: flex;
  background: #171d2b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.view-mode-btn:hover {
  color: #ffffff;
}

.view-mode-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Binge Nav Prev/Next Buttons */
.tv-binge-nav {
  display: flex;
  gap: 6px;
}

.tv-binge-btn {
  background: #171d2b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tv-binge-btn:hover:not(:disabled) {
  background: #e50914;
  border-color: #e50914;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.35);
}

.tv-binge-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* 2. Now Playing Strip */
.tv-now-playing-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(229, 9, 20, 0.08);
  border: 1px solid rgba(229, 9, 20, 0.25);
  border-radius: 8px;
  padding: 9px 14px;
  margin: 12px 0 14px;
}

.now-playing-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #f1f5f9;
  flex-wrap: wrap;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseLiveDot 1.5s infinite;
}

@keyframes pulseLiveDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.live-text {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.4px;
}

.now-playing-label strong {
  color: #ffffff;
  font-weight: 800;
}

.tv-ep-name {
  color: #f87171;
  font-weight: 600;
  font-size: 0.88rem;
}

/* Equalizer Bars Animation */
.playing-equalizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.playing-equalizer-bars span {
  width: 3px;
  background: #e50914;
  border-radius: 2px;
  animation: eqBounce 1.2s infinite ease-in-out;
}

.playing-equalizer-bars span:nth-child(1) { animation-delay: 0.1s; height: 6px; }
.playing-equalizer-bars span:nth-child(2) { animation-delay: 0.3s; height: 12px; }
.playing-equalizer-bars span:nth-child(3) { animation-delay: 0.2s; height: 9px; }
.playing-equalizer-bars span:nth-child(4) { animation-delay: 0.4s; height: 14px; }

@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

/* 3. Season Quick Pills */
.season-tabs-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin-bottom: 8px;
  scrollbar-width: thin;
}

.season-pill-btn {
  background: #171d2b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.season-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.season-pill-btn.active {
  background: #e50914;
  border-color: #e50914;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
}

.season-pill-btn .pill-count {
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  opacity: 0.85;
}

/* 4. Episodes Container (List View - Default) */
.episodes-container {
  max-height: 440px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}

.episodes-container.view-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Pro Episode Card (List View) */
.pro-ep-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.pro-ep-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(3px);
}

.pro-ep-card.active {
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.16) 0%, rgba(229, 9, 20, 0.04) 100%);
  border-color: #e50914;
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.25);
}

/* Thumbnail 16:9 Frame */
.ep-thumb-frame {
  position: relative;
  width: 154px;
  min-width: 154px;
  height: 86px;
  border-radius: 7px;
  overflow: hidden;
  background: #171d2b;
  flex-shrink: 0;
}

.ep-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.pro-ep-card:hover .ep-thumb-img {
  transform: scale(1.06);
}

.ep-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pro-ep-card:hover .ep-play-overlay {
  opacity: 1;
}

.ep-play-circle {
  width: 34px;
  height: 34px;
  background: #e50914;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
  padding-left: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.ep-num-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ep-streaming-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(229, 9, 20, 0.9);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 9px;
}

.eq-bars i {
  width: 2px;
  background: #ffffff;
  animation: eqBounce 1s infinite ease-in-out;
}

.eq-bars i:nth-child(1) { animation-delay: 0.1s; height: 4px; }
.eq-bars i:nth-child(2) { animation-delay: 0.3s; height: 8px; }
.eq-bars i:nth-child(3) { animation-delay: 0.2s; height: 6px; }

/* Episode Details Body */
.ep-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

.ep-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ep-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-ep-card.active .ep-name {
  color: #ff4d58;
}

.ep-year-chip {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ep-overview {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pro-ep-card.active .ep-overview {
  color: #cbd5e1;
}

/* 5. Grid View Mode */
.episodes-container.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.episodes-container.view-grid .pro-ep-card {
  flex-direction: column;
  align-items: stretch;
  padding: 8px;
  gap: 8px;
}

.episodes-container.view-grid .ep-thumb-frame {
  width: 100%;
  min-width: 100%;
  height: 115px;
}

.episodes-container.view-grid .ep-overview {
  display: none;
}

/* Mobile Responsive Adjustments */
@media (max-width: 680px) {
  .tv-browser-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .tv-topbar-left,
  .tv-topbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .pro-ep-card {
    gap: 10px;
    padding: 8px;
  }
  .ep-thumb-frame {
    width: 120px;
    min-width: 120px;
    height: 70px;
  }
  .ep-name {
    font-size: 0.86rem;
  }
  .ep-overview {
    -webkit-line-clamp: 1;
    font-size: 0.75rem;
  }
}

@keyframes pulsePlay {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* ===================================================== */
/* Sample In-Feed Ad Banners (Standard Formats)          */
/* ===================================================== */
.ad-banner-section {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 32px 0;
  padding: 0 10px;
}

.ad-banner-wrapper {
  position: relative;
  width: 100%;
  max-width: 1060px;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ad-banner-wrapper:hover {
  transform: translateY(-2px);
}

/* Top Dimension & Tag Strip */
.ad-badge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 14px;
  background: rgba(10, 14, 22, 0.85);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ad-tag {
  background: rgba(229, 9, 20, 0.2);
  color: #ff4d58;
  border: 1px solid rgba(229, 9, 20, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
}

.ad-tag.billboard {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

.ad-tag.cyan {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.4);
}

.ad-dimensions {
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Shimmer Light Sweep Animation */
.ad-shimmer-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 60%,
    transparent 100%
  );
  animation: adSweep 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
  z-index: 3;
}

@keyframes adSweep {
  0% { transform: translateX(-120%); }
  45% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

/* 1. Leaderboard Banner (970x90 / 728x90) */
.leaderboard-banner {
  background: linear-gradient(135deg, #161c28 0%, #0d121c 100%);
  border: 1px solid rgba(229, 9, 20, 0.35);
  box-shadow: 0 8px 30px rgba(229, 9, 20, 0.15);
}

.leaderboard-banner.neon-cyan {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.15);
}

.ad-banner-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  min-height: 90px;
  gap: 20px;
  overflow: hidden;
}

.ad-glow-effect {
  position: absolute;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.25) 0%, transparent 70%);
  top: -40px;
  left: -20px;
  filter: blur(20px);
  pointer-events: none;
  animation: glowPulse 3s ease-in-out infinite alternate;
}

.ad-glow-effect.cyan-glow {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
}

.ad-glow-effect.billboard-glow {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
  top: -60px;
  right: -30px;
}

@keyframes glowPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

.ad-content-left {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

.ad-brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #e50914, #991b1b);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
  animation: floatIcon 3s ease-in-out infinite alternate;
}

.ad-brand-icon.cyan-icon {
  background: linear-gradient(135deg, #06b6d4, #0e7490);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

@keyframes floatIcon {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

.ad-text-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-headline {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
}

.ad-highlight {
  background: linear-gradient(90deg, #ff4d58, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}

.ad-subtext {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
}

.ad-subtext strong {
  color: #38bdf8;
}

.ad-content-right {
  flex-shrink: 0;
  z-index: 2;
}

.ad-action-btn {
  background: linear-gradient(135deg, #e50914, #b91c1c);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.4);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.ad-action-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(229, 9, 20, 0.6);
  color: #ffffff;
}

.ad-action-btn.cyan-btn {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.4);
}

.ad-action-btn.cyan-btn:hover {
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.6);
}

/* 2. Billboard Banner (970x250 Rich Media) */
.billboard-banner {
  background: linear-gradient(135deg, #15142a 0%, #0d0f1a 100%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 10px 40px rgba(168, 85, 247, 0.18);
}

.ad-billboard-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
  gap: 24px;
  overflow: hidden;
}

.ad-billboard-graphic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 2px dashed rgba(168, 85, 247, 0.5);
  border-radius: 18px;
  flex-shrink: 0;
  text-align: center;
  animation: borderRotate 10s linear infinite;
  z-index: 2;
}

.billboard-badge {
  font-size: 0.82rem;
  font-weight: 800;
  color: #a855f7;
  display: flex;
  align-items: center;
  gap: 5px;
}

.billboard-badge-sub {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.ad-billboard-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.billboard-mini-tag {
  color: #c084fc;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.billboard-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.billboard-desc {
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

.billboard-features {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 0.76rem;
  color: #a855f7;
  font-weight: 600;
}

.billboard-features span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #e2e8f0;
}

.billboard-features span i {
  color: #34d399;
}

.ad-billboard-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  z-index: 2;
}

.billboard-price-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #c084fc;
  letter-spacing: 0.5px;
}

.pulse-glow {
  background: linear-gradient(135deg, #9333ea, #6366f1);
  box-shadow: 0 4px 20px rgba(147, 51, 234, 0.45);
  animation: pulseButton 2.2s infinite;
}

@keyframes pulseButton {
  0% { box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(147, 51, 234, 0); }
  100% { box-shadow: 0 0 0 0 rgba(147, 51, 234, 0); }
}

/* Responsive Ad Banners */
@media (max-width: 860px) {
  .ad-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }
  .ad-content-right {
    width: 100%;
  }
  .ad-action-btn {
    width: 100%;
    justify-content: center;
  }
  .ad-billboard-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .ad-billboard-graphic {
    display: none;
  }
  .ad-billboard-cta {
    width: 100%;
  }
  .ad-billboard-cta .ad-action-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===================================================== */
/* Category / Genre Quick Filter Pills (Draggable/Scroll)*/
/* ===================================================== */
.category-filter-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  width: 100%;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  cursor: grab;
  padding: 6px 4px;
  user-select: none;
  width: 100%;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pills.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.cat-pill {
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
  padding: 8px 18px;
  border-radius: 26px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.cat-pill.active {
  background: #e50914;
  border-color: #e50914;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.45);
}

.cat-pill .cat-count {
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 12px;
  opacity: 0.8;
  font-weight: 700;
}

.cat-pill.active .cat-count {
  background: rgba(255, 255, 255, 0.25);
  opacity: 1;
}

/* Scroll Arrows (Left / Right) */
.pill-scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-scroll-arrow.left {
  left: -14px;
}

.pill-scroll-arrow.right {
  right: -14px;
}

.pill-scroll-arrow:hover {
  background: #e50914;
  border-color: #e50914;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

/* ===================================================== */
/* TV Series Season & Episode Browser (Pro Netflix Style)*/
/* ===================================================== */
.tv-episode-selector.pro-browser {
  background: linear-gradient(180deg, #0d121c 0%, #080b10 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 24px;
  position: relative;
}

/* Top Controls & Status Bar */
.tv-browser-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tv-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.season-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.season-select-wrapper .select-icon {
  position: absolute;
  left: 14px;
  color: #e50914;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 2;
}

.pro-season-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #141a26;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 9px 38px 9px 38px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.pro-season-select:hover,
.pro-season-select:focus {
  border-color: #e50914;
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.35);
  outline: none;
  background: #19202f;
}

.season-select-wrapper::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 14px;
  color: #94a3b8;
  font-size: 0.72rem;
  pointer-events: none;
}

.tv-total-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tv-total-badge i {
  color: #3b82f6;
}

.tv-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* View Mode Switcher (List vs Grid) */
.ep-view-switcher {
  background: #121722;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 3px;
  display: inline-flex;
  gap: 4px;
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-mode-btn:hover {
  color: #ffffff;
}

.view-mode-btn.active {
  background: #e50914;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.45);
}

/* Quick Binge Prev / Next Buttons */
.tv-binge-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-binge-btn {
  background: #141a26;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tv-binge-btn:hover:not(:disabled) {
  background: #1e2638;
  border-color: #e50914;
  color: #ffffff;
  transform: translateY(-1px);
}

.tv-binge-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Live Streaming Indicator Strip */
.tv-now-playing-strip {
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.16) 0%, rgba(15, 23, 42, 0.5) 100%);
  border: 1px solid rgba(229, 9, 20, 0.35);
  border-radius: 10px;
  padding: 10px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.now-playing-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: #cbd5e1;
  flex-wrap: wrap;
}

.live-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: livePulse 1.6s infinite;
}

@keyframes livePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.live-text {
  font-size: 0.72rem;
  font-weight: 800;
  color: #ef4444;
  letter-spacing: 0.5px;
}

.now-playing-label strong {
  color: #ffffff;
  font-weight: 700;
}

.tv-ep-name {
  color: #94a3b8;
  font-style: italic;
}

/* Equalizer Bars Animation */
.playing-equalizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
  flex-shrink: 0;
}

.playing-equalizer-bars span {
  width: 3px;
  background: #e50914;
  border-radius: 2px;
  height: 6px;
  animation: eqPulse 0.9s ease-in-out infinite alternate;
}

.playing-equalizer-bars span:nth-child(1) { animation-delay: 0.0s; height: 12px; }
.playing-equalizer-bars span:nth-child(2) { animation-delay: 0.25s; height: 16px; }
.playing-equalizer-bars span:nth-child(3) { animation-delay: 0.15s; height: 8px; }
.playing-equalizer-bars span:nth-child(4) { animation-delay: 0.35s; height: 14px; }

@keyframes eqPulse {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* Horizontal Season Quick Tabs */
.season-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0 14px 0;
  margin-bottom: 8px;
}

.season-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.season-pill-btn {
  background: #141924;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.season-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.season-pill-btn.active {
  background: linear-gradient(135deg, #e50914, #b20710);
  border-color: #e50914;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.45);
}

.season-pill-btn .pill-count {
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  color: #cbd5e1;
}

.season-pill-btn.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Episodes Container & Scrollbar */
.episodes-container {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.episodes-container::-webkit-scrollbar {
  width: 6px;
}

.episodes-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.episodes-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.episodes-container::-webkit-scrollbar-thumb:hover {
  background: #e50914;
}

/* 1. VIEW MODE: Detailed List (2-column on desktop, responsive) */
.episodes-container.view-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 12px;
}

.episodes-container.view-list .pro-ep-card {
  background: #111622;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.episodes-container.view-list .pro-ep-card:hover {
  background: #171f2e;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.episodes-container.view-list .pro-ep-card.active {
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.18) 0%, #151b26 100%);
  border-color: #e50914;
  box-shadow: 0 0 24px rgba(229, 9, 20, 0.35);
}

/* Episode Thumbnail & Overlays */
.ep-thumb-frame {
  width: 150px;
  min-width: 150px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #080b10;
  flex-shrink: 0;
}

.ep-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.pro-ep-card:hover .ep-thumb-img {
  transform: scale(1.06);
}

.ep-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #151d2a, #0d121c);
  color: #475569;
  font-size: 1.8rem;
}

.ep-thumb-frame.no-thumb .ep-thumb-placeholder {
  display: flex;
}

.ep-thumb-frame.no-thumb .ep-thumb-img {
  display: none;
}

.ep-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pro-ep-card:hover .ep-play-overlay {
  opacity: 1;
}

.ep-play-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e50914;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  padding-left: 2px;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.6);
}

.ep-num-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
}

.ep-streaming-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: #e50914;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.5);
}

.ep-streaming-tag .eq-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 8px;
}

.ep-streaming-tag .eq-bars i {
  width: 2px;
  background: #ffffff;
  height: 4px;
  animation: eqMini 0.7s infinite alternate;
}

.ep-streaming-tag .eq-bars i:nth-child(2) { animation-delay: 0.2s; }
.ep-streaming-tag .eq-bars i:nth-child(3) { animation-delay: 0.4s; }

@keyframes eqMini {
  0% { height: 2px; }
  100% { height: 8px; }
}

/* Episode Card Body */
.ep-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ep-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ep-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-idx {
  color: #e50914;
  font-weight: 800;
  margin-right: 4px;
}

.ep-year-chip {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
}

.ep-overview {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #94a3b8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-card-footer {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ep-action-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3b82f6;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pro-ep-card.active .ep-action-label {
  color: #ef4444;
}

/* 2. VIEW MODE: Compact Grid (Super Fast Binge Number Picker) */
.episodes-container.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.episodes-container.view-grid .pro-ep-card {
  background: #131824;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.episodes-container.view-grid .ep-thumb-frame,
.episodes-container.view-grid .ep-overview,
.episodes-container.view-grid .ep-year-chip,
.episodes-container.view-grid .ep-card-footer {
  display: none !important;
}

.episodes-container.view-grid .ep-body {
  width: 100%;
  align-items: center;
}

.episodes-container.view-grid .ep-header-line {
  justify-content: center;
  width: 100%;
}

.episodes-container.view-grid .ep-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #cbd5e1;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.episodes-container.view-grid .ep-idx {
  display: block;
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.episodes-container.view-grid .pro-ep-card:hover {
  background: #1e2638;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.episodes-container.view-grid .pro-ep-card.active {
  background: linear-gradient(135deg, #e50914, #b20710);
  border-color: #e50914;
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.5);
}

.episodes-container.view-grid .pro-ep-card.active .ep-name,
.episodes-container.view-grid .pro-ep-card.active .ep-idx {
  color: #ffffff;
}

/* TV Episode Selector Responsive Media Queries */
@media (max-width: 860px) {
  .episodes-container.view-list {
    grid-template-columns: 1fr;
  }
  .tv-browser-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .tv-topbar-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .tv-episode-selector.pro-browser {
    padding: 16px;
  }
  .episodes-container.view-list .pro-ep-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .ep-thumb-frame {
    width: 100%;
    min-width: 100%;
  }
  .episodes-container.view-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
}


