@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --tv-accent:       #a78bfa;
  --tv-accent-deep:  #8b5cf6;
  --tv-accent-soft:  rgba(167, 139, 250, 0.15);
  --tv-accent-glow:  rgba(167, 139, 250, 0.35);
  --tv-border:       rgba(167, 139, 250, 0.3);
  --bg:              #0d0b14;
  --surface:         #161221;
  --surface2:        #1e1929;
  --surface3:        #261f35;
  --border:          rgba(255, 255, 255, 0.07);
  --text:            #f5f0ff;
  --muted:           #8b7fa8;
  --star:            #ffcc44;
  --font-display:    'Playfair Display', serif;
  --font-body:       'DM Sans', sans-serif;
  --radius-sm:       8px;
  --radius-md:       14px;
  --radius-lg:       20px;
  --radius-xl:       28px;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

/* ── ANIMATED BACKGROUND PARTICLES ─────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(167, 139, 250, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(167, 139, 250, 0.02) 0%, transparent 50%);
  animation: bg-shift 20s ease-in-out infinite alternate;
}

@keyframes bg-shift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 10px) scale(1.05); }
  100% { transform: translate(10px, -20px) scale(1); }
}

/* Fade in animation for page load */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Staggered card animation */
@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card {
  animation: cardSlideIn 0.5s ease backwards;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }
.card:nth-child(9) { animation-delay: 0.45s; }
.card:nth-child(10) { animation-delay: 0.5s; }
.card:nth-child(11) { animation-delay: 0.55s; }
.card:nth-child(12) { animation-delay: 0.6s; }

/* Glow pulse animation */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(167, 139, 250, 0.1); }
  50% { box-shadow: 0 0 40px rgba(167, 139, 250, 0.25); }
}

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Icon pulse */
@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Shimmer line animation */
@keyframes shimmerLine {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/*  NAVBAR */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; height: 68px;
  background: linear-gradient(to bottom, rgba(13, 11, 20, 0.97) 70%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.6s ease;
}

.logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px var(--tv-accent-glow));
}
.logo-accent {
  color: var(--tv-accent);
  text-shadow: 0 0 20px var(--tv-accent-glow);
}
.logo-dot {
  width: 8px; height: 8px;
  background: var(--tv-accent);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
  box-shadow: 0 0 10px var(--tv-accent-glow);
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

.nav-right { display: flex; align-items: center; gap: 16px; }

.search-wrap { position: relative; }
.search-wrap svg {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); opacity: 0.4; pointer-events: none;
  transition: opacity 0.3s ease;
}
.search-wrap:focus-within svg {
  opacity: 1;
  color: var(--tv-accent);
}
#search-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 9px 18px 9px 42px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  width: 210px;
  outline: none;
  transition: width 0.35s ease, border-color 0.2s, box-shadow 0.3s ease;
}
#search-box::placeholder { color: var(--muted); }
#search-box:focus {
  width: 300px;
  border-color: var(--tv-accent);
  background: var(--surface3);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.15);
}

/* HERO */
#hero {
  position: relative;
  height: 88vh; min-height: 560px;
  display: flex; align-items: flex-end;
  padding: 0 5% 90px;
  overflow: hidden;
}
#hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #1a0d2e, #0d0b14);
  z-index: 0;
}
#hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
  opacity: 0; transition: opacity 1.5s ease;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to right, rgba(13, 11, 20, 0.95) 30%, rgba(13, 11, 20, 0.1) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(13, 11, 20, 0.5) 35%, transparent 70%);
}
.hero-content {
  position: relative; z-index: 3;
  max-width: 580px;
  animation: fadeInUp 0.8s ease 0.3s backwards;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tv-accent-soft);
  border: 1px solid var(--tv-border);
  color: var(--tv-accent);
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 50px;
  margin-bottom: 18px;
  animation: glowPulse 3s ease-in-out infinite;
}
.hero-badge svg {
  animation: iconPulse 2s ease-in-out infinite;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6.5vw, 70px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 16px;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text) 0%, rgba(245, 240, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-meta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
  font-size: 13px; color: var(--muted);
  flex-wrap: wrap;
}
.hero-meta .rating {
  color: var(--star);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hero-meta .sep { opacity: 0.3; }
.hero-desc {
  font-size: 14px; line-height: 1.8;
  color: rgba(245, 240, 255, 0.7);
  max-width: 460px; margin-bottom: 32px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-play {
  background: linear-gradient(135deg, var(--tv-accent) 0%, var(--tv-accent-deep) 100%);
  color: #ffffff; border: none;
  border-radius: var(--radius-xl);
  padding: 14px 34px;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn-play::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}
.btn-play:hover::before {
  left: 100%;
}
.btn-play:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 12px 40px var(--tv-accent-glow);
}
.btn-play:active {
  transform: scale(0.98);
}

.btn-info {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.btn-info:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--tv-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ── MAIN / ROWS ─────────────────────────────────────────── */
main { padding: 0 5% 100px; position: relative; z-index: 1; }

.section-header {
  display: flex; align-items: center; gap: 12px;
  padding-top: 52px; margin-bottom: 20px;
  animation: fadeInUp 0.6s ease backwards;
}
.row-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.3px;
}
.row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--tv-accent-soft);
  animation: iconPulse 3s ease-in-out infinite;
}
.row-icon svg {
  width: 20px;
  height: 20px;
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 16px;
}

/* ── CARD ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-10px) scale(1.04);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--tv-border);
  border-color: var(--tv-border);
  z-index: 2;
}
.card img {
  width: 100%; aspect-ratio: 2/3;
  object-fit: cover; display: block;
  background: var(--surface2);
  transition: transform 0.5s ease;
}
.card:hover img {
  transform: scale(1.08);
}
.card-body { padding: 10px 12px 13px; }
.card-title {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
  transition: color 0.3s ease;
}
.card:hover .card-title {
  color: var(--tv-accent);
}
.card-year { font-size: 11px; color: var(--muted); margin-top: 3px; }

.card-rating {
  position: absolute; top: 8px; right: 8px;
  background: rgba(10, 8, 18, 0.9);
  color: var(--star);
  font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 50px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 204, 68, 0.3);
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.card-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  display: flex; align-items: center; justify-content: center;
}
.card:hover .card-overlay { background: rgba(13, 11, 20, 0.5); }

.card-play-btn {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--tv-accent) 0%, var(--tv-accent-deep) 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.7) rotate(-10deg);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 25px var(--tv-accent-glow);
}
.card:hover .card-play-btn {
  opacity: 1; transform: scale(1) rotate(0deg);
}
.card-play-btn:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 8px 35px var(--tv-accent-glow);
}

/* ── SKELETON ────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--surface) 25%,
    var(--surface2) 50%,
    var(--surface) 75%
  );
  background-size: 400% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.card-skeleton { aspect-ratio: 2/3; }

/* ── MODAL ───────────────────────────────────────────────── */
#modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(5, 4, 12, 0.95);
  z-index: 2000;
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(20px);
  overflow-y: auto;
}
#modal-overlay.open {
  display: flex;
  animation: fadeIn 0.3s ease;
}

#modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 1100px; width: 100%;
  max-height: 92vh; overflow-y: auto;
  border: 1px solid var(--tv-border);
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), 0 0 80px rgba(167, 139, 250, 0.1);
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#modal::-webkit-scrollbar { width: 4px; }
#modal::-webkit-scrollbar-thumb { background: var(--surface3); }

#modal-player {
  width: 100%; aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  position: relative;
}
#modal-player iframe { width: 100%; height: 100%; border: none; display: block; position: relative; z-index: 1; }
#modal-player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
#modal-player .player-loading {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px; font-weight: 500;
  background: #000;
}
#modal-player .player-loading::after {
  content: '';
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--tv-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

#modal-info { padding: 26px 30px 36px; }

#modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px;
  background: rgba(13, 11, 20, 0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  padding: 0;
}
#modal-close svg {
  width: 16px;
  height: 16px;
}
#modal-close:hover {
  background: var(--tv-accent);
  border-color: var(--tv-accent);
  transform: rotate(90deg);
}

#modal-title {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text) 0%, rgba(245, 240, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#modal-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: var(--muted);
  flex-wrap: wrap; margin-bottom: 18px;
}
#modal-meta .rating {
  color: var(--star);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.server-label {
  font-size: 11px; color: var(--muted);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 10px; font-weight: 600;
}

.modal-genre-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 4px 12px; font-size: 12px;
  transition: all 0.2s ease;
}
.modal-genre-tag:hover {
  border-color: var(--tv-border);
  color: var(--tv-accent);
}

#modal-genres {
  display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px;
}

#modal-desc {
  font-size: 14px; line-height: 1.8;
  color: rgba(245, 240, 255, 0.65);
}

/* ── SEARCH RESULTS ──────────────────────────────────────── */
#search-results { display: none; }
#search-results.open {
  display: block;
  animation: fadeInUp 0.4s ease;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 5%;
  text-align: center;
  color: var(--muted);
  font-size: 12px; line-height: 1.9;
  position: relative;
  z-index: 1;
}
footer strong {
  color: var(--tv-accent);
  text-shadow: 0 0 10px var(--tv-accent-glow);
}
footer a {
  color: var(--tv-accent);
  text-decoration: none;
  transition: all 0.2s ease;
}
footer a:hover {
  text-shadow: 0 0 10px var(--tv-accent-glow);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 700px) {
  nav { padding: 0 4%; }
  #hero { padding: 0 4% 60px; }
  main { padding: 0 4% 80px; }
  #search-box { width: 160px; }
  #search-box:focus { width: 210px; }
  .cards-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .btn-play, .btn-info { padding: 12px 22px; font-size: 14px; }
  #modal-overlay { padding: 10px; }
  #modal { max-height: 95vh; }
  #modal-info { padding: 18px 16px 28px; }
  #modal-title { font-size: 24px; }
}

/* ── CONTINUE WATCHING ───────────────────────────────────────── */
#cw-section { padding-top: 48px; }
#cw-section .section-header { padding-top: 0; margin-bottom: 20px; }

.cw-card { position: relative; }

.cw-remove {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  width: 28px; height: 28px;
  background: rgba(13, 11, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: all 0.25s ease;
  line-height: 1;
  backdrop-filter: blur(8px);
  padding: 0;
}
.cw-remove svg {
  width: 12px;
  height: 12px;
}
.cw-card:hover .cw-remove { opacity: 1; }
.cw-remove:hover {
  background: var(--tv-accent);
  border-color: var(--tv-accent);
  color: #fff;
  transform: scale(1.1);
}

/* ── PAGE TRANSITION EFFECTS ─────────────────────────────── */
main > * {
  animation: fadeInUp 0.6s ease backwards;
}
main > *:nth-child(1) { animation-delay: 0.1s; }
main > *:nth-child(2) { animation-delay: 0.2s; }
main > *:nth-child(3) { animation-delay: 0.3s; }

/* Ripple effect on click */
@keyframes ripple {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}

.btn-play:active::after,
.btn-info:active::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 0.6s ease-out;
}

/* Text gradient animation */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-title, #modal-title {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

/* Border glow animation */
@keyframes borderGlow {
  0%, 100% { border-color: var(--tv-border); }
  50% { border-color: var(--tv-accent); }
}

#modal {
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1), borderGlow 4s ease-in-out infinite;
}

/* Smooth transitions for all interactive elements */
a, button, .card {
  -webkit-tap-highlight-color: transparent;
}

/* Selection color */
::selection {
  background: var(--tv-accent);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════
   EFLIX — Episode Strip & Controls  (series-episode-strip.css)
   Drop into <head> or @import after series.css
   ═══════════════════════════════════════════════════════════════ */

/* ── CONTROLS BAR (server + season) ──────────────────────── */
.eflix-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
}

.eflix-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

.eflix-select-wrap {
  position: relative;
}
.eflix-select-wrap::after {
  content: '';
  position: absolute;
  right: 13px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  pointer-events: none;
  transition: border-top-color .2s;
}
.eflix-select-wrap:hover::after { border-top-color: var(--tv-accent); }

.eflix-select {
  appearance: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 36px 9px 14px;
  border-radius: 50px;
  cursor: pointer;
  min-width: 160px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.eflix-select:hover,
.eflix-select:focus {
  border-color: var(--tv-accent);
  box-shadow: 0 0 0 3px rgba(167,139,250,.12);
}
.eflix-select option {
  background: var(--surface);
  color: var(--text);
}

/* ── EPISODE BAR ──────────────────────────────────────────── */
.eflix-ep-bar {
  margin-bottom: 20px;
}

/* toolbar row */
.eflix-ep-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.eflix-ep-search-wrap {
  flex: 1;
  position: relative;
  max-width: 320px;
}
.eflix-ep-search-wrap svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
#ep-filter {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 7px 14px 7px 32px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#ep-filter::placeholder { color: var(--muted); }
#ep-filter:focus {
  border-color: var(--tv-accent);
  box-shadow: 0 0 0 3px rgba(167,139,250,.12);
}

.eflix-icon-btn {
  width: 34px; height: 34px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.eflix-icon-btn:hover {
  border-color: var(--tv-accent);
  color: var(--tv-accent);
}

/* ── EPISODE TRACK (scrollable) ───────────────────────────── */
.eflix-ep-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--surface3) transparent;
}
.eflix-ep-track::-webkit-scrollbar { height: 4px; }
.eflix-ep-track::-webkit-scrollbar-thumb {
  background: var(--surface3);
  border-radius: 4px;
}

/* GRID VIEW override */
.eflix-ep-track.grid-view {
  flex-wrap: wrap;
  overflow-x: visible;
}

/* ── EPISODE PILL ─────────────────────────────────────────── */
.ep-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 8px 14px;
  border-radius: 50px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  min-width: 80px;
  max-width: 160px;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.ep-pill:hover {
  border-color: var(--tv-accent);
  background: var(--surface3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(167,139,250,.18);
}

/* active / playing */
.ep-pill.active {
  background: linear-gradient(135deg, var(--tv-accent) 0%, var(--tv-accent-deep) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 22px rgba(167,139,250,.4);
}
.ep-pill.active .ep-pill-num,
.ep-pill.active .ep-pill-name { color: #fff; }

/* watched */
.ep-pill.watched:not(.active) {
  border-color: rgba(167,139,250,.35);
  background: rgba(167,139,250,.08);
}
.ep-pill.watched:not(.active) .ep-pill-num { color: var(--tv-accent); }

/* not-aired */
.ep-pill.not-aired {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* playing indicator shimmer */
.ep-pill.active::before {
  content: '';
  position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  animation: ep-shine 2s ease-in-out infinite;
}
@keyframes ep-shine {
  0%   { left: -60%; }
  100% { left: 120%; }
}

.ep-pill-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--tv-accent);
  line-height: 1;
  letter-spacing: .5px;
}
.ep-pill-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  line-height: 1.2;
}
.ep-pill-date {
  font-size: 10px;
  color: var(--muted);
  line-height: 1;
}

/* watched tick */
.ep-pill .ep-tick {
  position: absolute;
  top: 5px; right: 7px;
  width: 12px; height: 12px;
  background: var(--tv-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.ep-pill.watched .ep-tick { opacity: 1; }
.ep-pill.active .ep-tick { display: none; }
.ep-tick svg { width: 7px; height: 7px; fill: #fff; }

/* ── GRID VIEW pill overrides ─────────────────────────────── */
.grid-view .ep-pill {
  flex-direction: row;
  align-items: center;
  min-width: 64px;
  max-width: 64px;
  padding: 10px 0;
  justify-content: center;
  border-radius: 12px;
}
.grid-view .ep-pill-num { font-size: 13px; }
.grid-view .ep-pill-name,
.grid-view .ep-pill-date { display: none; }
.grid-view .ep-tick { top: 4px; right: 4px; }

/* ── NEXT EPISODE TEASER ──────────────────────────────────── */
.eflix-next-teaser {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 14px;
  background: rgba(167,139,250,.07);
  border-radius: 8px;
  border: 1px solid rgba(167,139,250,.15);
  line-height: 1.6;
}
.eflix-next-teaser strong {
  font-weight: 700;
  color: var(--tv-accent);
}
.eflix-next-teaser .next-date {
  color: #f87171; /* red */
  font-weight: 600;
}

/* ── MOBILE ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .eflix-controls { gap: 8px; }
  .eflix-select { min-width: 130px; font-size: 12px; padding: 8px 30px 8px 12px; }
  .ep-pill { min-width: 70px; padding: 7px 12px; }
  .ep-pill-name { max-width: 100px; }
}

/* ── TV-SPECIFIC STYLES ──────────────────────────────────────── */

/* Override pink-specific elements with TV purple accent */
.hero-badge {
  background: var(--tv-accent-soft) !important;
  border-color: var(--tv-border) !important;
  color: var(--tv-accent) !important;
}

.btn-play {
  background: linear-gradient(135deg, var(--tv-accent) 0%, var(--tv-accent-deep) 100%) !important;
}

.btn-play:hover {
  box-shadow: 0 12px 40px var(--tv-accent-glow) !important;
}

.btn-info:hover {
  border-color: var(--tv-accent) !important;
}

/* Carousel section title accent */
.carousel-section-title svg {
  fill: var(--tv-accent) !important;
}

/* Carousel button hover */
.carousel-btn:hover {
  background: var(--tv-accent) !important;
  border-color: var(--tv-accent) !important;
}

/* Genre dropdown hover */
.genre-dropdown:hover {
  border-color: var(--tv-accent) !important;
}

.genre-filter-active {
  border-color: var(--tv-accent) !important;
  box-shadow: 0 0 10px var(--tv-accent-glow) !important;
}

/* Filter label */
.filter-label {
  color: var(--tv-accent) !important;
}

/* Server dropdown */
.server-dropdown:hover {
  border-color: var(--tv-accent) !important;
}

.server-dropdown:focus {
  border-color: var(--tv-accent) !important;
  box-shadow: 0 0 15px var(--tv-accent-glow) !important;
}

/* Season/Episode selectors */
.season-select:hover,
.episode-select:hover {
  border-color: var(--tv-accent) !important;
}

.season-select:focus,
.episode-select:focus {
  border-color: var(--tv-accent) !important;
  box-shadow: 0 0 15px var(--tv-accent-glow) !important;
}

/* Episode info */
.episode-info {
  margin-top: 12px;
  padding: 12px;
  background: var(--tv-accent-soft);
  border-radius: 8px;
  border: 1px solid var(--tv-border);
}

.episode-info-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--tv-accent);
  margin-bottom: 4px;
}

.episode-info-desc {
  font-size: 11px;
  color: var(--muted);
}

/* Card play button gradient */
.card-play-btn {
  background: linear-gradient(135deg, var(--tv-accent) 0%, var(--tv-accent-deep) 100%) !important;
  box-shadow: 0 6px 25px var(--tv-accent-glow) !important;
}

.card-play-btn:hover {
  box-shadow: 0 8px 35px var(--tv-accent-glow) !important;
}

/* Card hover effects */
.card:hover {
  border-color: var(--tv-border) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--tv-border) !important;
}

.card:hover .card-title {
  color: var(--tv-accent) !important;
}

/* Row icon */
.row-icon {
  background: var(--tv-accent-soft) !important;
}

/* Logo dot */
.logo-dot {
  background: var(--tv-accent) !important;
  box-shadow: 0 0 10px var(--tv-accent-glow) !important;
}

/* Search focus */
#search-box:focus {
  border-color: var(--tv-accent) !important;
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.15) !important;
}

/* Modal close hover */
#modal-close:hover {
  background: var(--tv-accent) !important;
  border-color: var(--tv-accent) !important;
}

/* Footer */
footer strong {
  color: var(--tv-accent) !important;
  text-shadow: 0 0 10px var(--tv-accent-glow) !important;
}

footer a {
  color: var(--tv-accent) !important;
}

/* CW remove button hover */
.cw-remove:hover {
  background: var(--tv-accent) !important;
  border-color: var(--tv-accent) !important;
}

/* Scrollbar thumb hover */
::-webkit-scrollbar-thumb:hover {
  background: var(--tv-accent) !important;
}

/* Background particles */
body::before {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(167, 139, 250, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(167, 139, 250, 0.02) 0%, transparent 50%) !important;
}

/* Glow pulse */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(167, 139, 250, 0.1); }
  50% { box-shadow: 0 0 40px rgba(167, 139, 250, 0.25); }
}

/* Loading spinner */
#modal-player .player-loading::after {
  border-top-color: var(--tv-accent) !important;
}

/* ============================================
   NEW PILL-BASED UI STYLES
   ============================================ */

/* Control Bar */
.control-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
}

.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: var(--tv-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.control-btn:hover {
  background: var(--tv-accent);
  color: #fff;
  border-color: var(--tv-accent);
  transform: scale(1.05);
}

.control-btn:active {
  transform: scale(0.95);
}

/* Toggle Pills (Auto Play / Auto Next) */
.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 50px;
  background: rgba(30, 25, 41, 0.8);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.toggle-pill:hover {
  border-color: var(--tv-accent);
  background: rgba(30, 25, 41, 0.95);
}

.toggle-pill.active {
  background: rgba(167, 139, 250, 0.15);
  border-color: var(--tv-accent);
  color: var(--tv-accent);
}

.toggle-label {
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.toggle-switch {
  position: relative;
  width: 32px;
  height: 18px;
  background: rgba(112, 104, 131, 0.4);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.toggle-pill.active .toggle-switch {
  background: var(--tv-accent);
}

.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-pill.active .toggle-knob {
  transform: translateX(14px);
}

/* Selector Label */
.selector-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding-right: 10px;
  flex-shrink: 0;
}

/* Pills Wrapper - Horizontal Scroll Container */
.pills-wrapper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px;
  flex: 1;
  min-width: 0;
}

.pills-wrapper::-webkit-scrollbar {
  display: none;
}

/* Season Pills Container */
.season-pills-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  width: 100%;
}

/* Episode Pills Container */
.episode-pills-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  width: 100%;
}

/* Server Pills Container */
.server-pills-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  margin-bottom: 8px;
  width: 100%;
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
}

/* Season Pill */
.season-pill {
  flex: 0 0 auto;
  padding: 8px 18px;
  border-radius: 50px;
  background: rgba(30, 25, 41, 0.8);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.season-pill:hover {
  border-color: var(--tv-accent);
  background: rgba(30, 25, 41, 0.95);
}

.season-pill.active {
  background: var(--tv-accent);
  border-color: var(--tv-accent);
  color: #fff;
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
}

/* Episode Pill */
.episode-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 50px;
  background: rgba(30, 25, 41, 0.8);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: fit-content;
}

.episode-pill:hover {
  border-color: var(--tv-accent);
  background: rgba(30, 25, 41, 0.95);
}

.episode-pill.active {
  background: var(--tv-accent);
  border-color: var(--tv-accent);
  color: #fff;
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
}

.episode-pill.watched {
  opacity: 0.7;
  border-color: rgba(167, 139, 250, 0.3);
}

.episode-pill.watched:hover {
  opacity: 1;
}

.ep-number {
  font-weight: 700;
  font-size: 13px;
  min-width: 20px;
  text-align: center;
}

.ep-title {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.episode-pill.active .ep-title {
  color: rgba(255, 255, 255, 0.9);
}

.watched-check {
  color: #4ade80;
  font-weight: bold;
  font-size: 14px;
  margin-left: 2px;
}

.episode-pill.active .watched-check {
  color: #fff;
}

/* Server Pill */
.server-pill {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(30, 25, 41, 0.8);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.server-pill:hover {
  border-color: var(--tv-accent);
  background: rgba(30, 25, 41, 0.95);
}

.server-pill.active {
  background: var(--tv-accent);
  border-color: var(--tv-accent);
  color: #fff;
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
}

/* Next Episode Notice */
.next-episode-notice {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0 4px;
  text-align: center;
  width: 100%;
}

/* Season & Episode Row Container */
.season-episode-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px 0;
}

/* Remove old dropdown styles that are no longer needed */
.season-select, .episode-select, .server-dropdown {
  display: none;
}

 /* Genre Dropdown */
    .genre-dropdown-container {
      padding: 20px 4%;
      position: relative;
      z-index: 100;
    }

    .genre-dropdown {
      background: rgba(20, 20, 20, 0.95);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #fff;
      padding: 12px 20px;
      font-size: 14px;
      border-radius: 8px;
      cursor: pointer;
      min-width: 200px;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      padding-right: 40px;
      transition: all 0.2s ease;
    }

    .genre-dropdown:hover {
      border-color: #a78bfa;
      background-color: rgba(30, 30, 30, 0.95);
    }

    .genre-dropdown option {
      background: #1a1a1a;
      color: #fff;
      padding: 10px;
    }

    /* Carousel Section */
    .carousel-section {
      margin-bottom: 30px;
      position: relative;
    }

    .carousel-section-title {
      color: #fff;
      font-size: 18px;
      font-weight: 600;
      padding: 0 4%;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .carousel-section-title svg {
      width: 20px;
      height: 20px;
      fill: #a78bfa;
      flex-shrink: 0;
    }

    /* Carousel Wrapper */
    .carousel-wrapper {
      position: relative;
      display: flex;
      align-items: center;
      padding: 0 4%;
    }

    /* Carousel Track */
    .carousel-track {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      scroll-behavior: smooth;
      scrollbar-width: none;
      -ms-overflow-style: none;
      padding: 10px 0;
      flex: 1;
      width: 100%;
    }

    .carousel-track::-webkit-scrollbar {
      display: none;
    }

    /* Carousel Navigation Buttons */
    .carousel-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.8);
      border: 2px solid rgba(255, 255, 255, 0.3);
      color: #fff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 20;
      transition: all 0.2s ease;
    }

    .carousel-wrapper:hover .carousel-btn {
      opacity: 1;
      visibility: visible;
    }

    .carousel-btn:hover {
      background: #a78bfa;
      border-color: #a78bfa;
      transform: translateY(-50%) scale(1.1);
    }

    .carousel-btn.prev {
      left: 0;
    }

    .carousel-btn.next {
      right: 0;
    }

    .carousel-btn svg {
      width: 24px;
      height: 24px;
      fill: white;
    }

    .carousel-btn:disabled {
      opacity: 0.2 !important;
      cursor: not-allowed;
      transform: translateY(-50%);
      pointer-events: none;
    }

    /* TV Cards in Carousel */
    .carousel-card {
      flex: 0 0 auto;
      width: 180px;
      position: relative;
      cursor: pointer;
      transition: transform 0.25s ease;
      border-radius: 8px;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.05);
    }

    .carousel-card:hover {
      transform: scale(1.08);
      z-index: 5;
    }

    .carousel-card img {
      width: 100%;
      height: 270px;
      object-fit: cover;
      display: block;
    }

    .carousel-card-info {
      padding: 10px;
      background: linear-gradient(to bottom, rgba(20, 20, 20, 0.8), rgba(20, 20, 20, 1));
    }

    .carousel-card-title {
      color: #fff;
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 4px;
    }

    .carousel-card-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      color: #aaa;
    }

    .carousel-card-rating {
      display: flex;
      align-items: center;
      gap: 3px;
      color: #ffd700;
      font-weight: 600;
    }

    .carousel-card-rating svg {
      width: 10px;
      height: 10px;
      fill: #ffd700;
    }

    .carousel-card-genres {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
      margin-top: 4px;
    }

    .carousel-card-genre-tag {
      font-size: 9px;
      padding: 2px 6px;
      background: rgba(167, 139, 250, 0.2);
      color: #a78bfa;
      border-radius: 4px;
      border: 1px solid rgba(167, 139, 250, 0.3);
    }

    /* Hidden card for filtering */
    .carousel-card.hidden {
      display: none;
    }

    /* Active genre indicator */
    .genre-filter-active {
      border-color: #a78bfa !important;
      box-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
    }

    /* Hide empty sections when filtered */
    .carousel-section.empty-filtered {
      display: none;
    }

    /* Show message when filtering */
    .filter-message {
      text-align: center;
      padding: 40px;
      color: #888;
      display: none;
    }

    .filter-message.visible {
      display: block;
    }

    /* Filtered label */
    .filter-label {
      color: #a78bfa;
      font-size: 14px;
      padding: 0 4%;
      margin-bottom: 15px;
      display: none;
    }

    .filter-label.visible {
      display: block;
    }

    /* Server Dropdown Styles */
    .server-dropdown {
      background: rgba(20, 20, 20, 0.95);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #fff;
      padding: 10px 16px;
      font-size: 13px;
      font-family: var(--font-body, 'DM Sans', sans-serif);
      border-radius: 50px;
      cursor: pointer;
      min-width: 220px;
      max-width: 100%;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 36px;
      transition: all 0.2s ease;
      margin-bottom: 8px;
    }

    .server-dropdown:hover {
      border-color: #a78bfa;
      background-color: rgba(30, 30, 30, 0.95);
    }

    .server-dropdown:focus {
      outline: none;
      border-color: #a78bfa;
      box-shadow: 0 0 15px rgba(167, 139, 250, 0.2);
    }

    .server-dropdown option {
      background: #1a1a1a;
      color: #fff;
      padding: 10px;
    }

    /* Server Legend */
    .server-legend {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 6px;
      margin-bottom: 16px;
    }

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      color: #888;
    }

    .legend-badge {
      font-size: 12px;
    }

    /* Season & Episode Selectors */
    .season-episode-row {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 16px;
    }

    .season-select, .episode-select {
      background: rgba(20, 20, 20, 0.95);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #fff;
      padding: 10px 16px;
      font-size: 13px;
      font-family: var(--font-body, 'DM Sans', sans-serif);
      border-radius: 50px;
      cursor: pointer;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 36px;
      transition: all 0.2s ease;
    }

    .season-select:hover, .episode-select:hover {
      border-color: #a78bfa;
      background-color: rgba(30, 30, 30, 0.95);
    }

    .season-select:focus, .episode-select:focus {
      outline: none;
      border-color: #a78bfa;
      box-shadow: 0 0 15px rgba(167, 139, 250, 0.2);
    }

    .season-select option, .episode-select option {
      background: #1a1a1a;
      color: #fff;
      padding: 10px;
    }

    /* Cards Grid for search/genre results */
    .cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
      gap: 16px;
    }

    .cards-grid .carousel-card {
      width: 100%;
      flex: none;
    }

    .cards-grid .carousel-card img {
      height: auto;
      aspect-ratio: 2/3;
    }

    /* TV-specific modal styles */
    .tv-show-meta {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      margin-bottom: 18px;
      font-size: 13px;
      color: var(--muted);
    }

    .tv-show-meta .rating {
      color: var(--star);
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .episode-info {
      margin-top: 12px;
      padding: 12px;
      background: rgba(167, 139, 250, 0.1);
      border-radius: 8px;
      border: 1px solid rgba(167, 139, 250, 0.2);
    }

    .episode-info-title {
      font-size: 12px;
      font-weight: 600;
      color: #a78bfa;
      margin-bottom: 4px;
    }

    .episode-info-desc {
      font-size: 11px;
      color: var(--muted);
    }

/* Responsive adjustments */
@media (max-width: 700px) {
  .control-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .control-btn {
    width: 32px;
    height: 32px;
  }
  
  .toggle-pill {
    padding: 6px 10px;
  }
  
  .toggle-label {
    display: none;
  }
  
  .season-pill, .episode-pill, .server-pill {
    padding: 6px 12px;
    font-size: 11px;
  }
  
  .ep-title {
    max-width: 80px;
  }
  
  .pills-wrapper {
    -webkit-overflow-scrolling: touch;
  }

  
}