/* MikoLive – Cinematic Netflix-Polish */

/* =========================
   Theme variable system
   ========================= */
:root {
  /* MikoFlix - Signature Cinematic Theme */
  --primary: #BF00FF;              /* Electric Violet */
  --secondary: #FF0055;            /* Magenta Neon */
  --background: #050006;           /* Deep Charcoal */
  --accent: #00E0FF;               /* Cyan Pop */
  --text: #F9F9FA;
  --muted: #9b9b9b;
  --card-bg: rgba(255, 255, 255, 0.04);
  --glass: rgba(255, 255, 255, 0.02);
  --gradient: linear-gradient(135deg, #BF00FF, #FF0055);
  --glow-primary: rgba(191, 0, 255, 0.3);
  --glow-secondary: rgba(255, 0, 85, 0.25);
  --border: rgba(255, 255, 255, 0.08);
  --hover-bg: rgba(255, 0, 85, 0.1);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --container-max: 1280px;
}

/* THEMES */
[data-theme="minimalism"] {
  /* Netflix Red / Cinematic Dark Theme */
  --primary: #E50914;
  --secondary: #B00610;
  --background: #0A0A0A;
  --accent: #FF1E1E;
  --text: #FFFFFF;
  --muted: #B3B3B3;
  --card-bg: rgba(255, 255, 255, 0.03);
  --glass: rgba(255, 255, 255, 0.02);
  --gradient: linear-gradient(90deg, #E50914, #B00610);
}

body[data-theme="minimalism"] .load-btn {
  box-shadow: 0 8px 30px rgba(229, 9, 20, 0.6), 0 0 40px rgba(229, 9, 20, 0.3);
}
body[data-theme="minimalism"] .poster:hover {
  box-shadow: 0 16px 60px rgba(229, 9, 20, 0.45);
}
body[data-theme="minimalism"] .media-toggle-btn.active {
  background: var(--gradient);
  color: #fff;
  border: none;
}

[data-theme="modern"] {
  --primary: #6C63FF;
  --secondary: #FF4D9E;
  --background: #06060A;
  --accent: #38F0E8;
  --text: #EAEAEA;
  --muted: #9aa0a6;
  --card-bg: rgba(255,255,255,0.025);
  --glass: rgba(255,255,255,0.015);
  --gradient: linear-gradient(90deg, var(--primary), var(--secondary));
}

[data-theme="ocean"] {
  --primary: #00D9FF;
  --secondary: #0077BE;
  --background: #02060A;
  --accent: #00FFA3;
  --text: #E8F4F8;
  --muted: #7CA5B8;
  --card-bg: rgba(255,255,255,0.02);
  --glass: rgba(255,255,255,0.01);
  --gradient: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* 3D Aurora Theme - true 3D depth */
[data-theme="neo-3d"] {
  --primary: #8B00FF;
  --secondary: #00FFD1;
  --background: radial-gradient(circle at center, #030010 0%, #000 100%);
  --accent: #00FFD1;
  --text: #E6F7FF;
  --muted: #9bbcc9;
  --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

body[data-theme="neo-3d"] {
  perspective: 1000px;
  background: radial-gradient(ellipse at top, #090021, #000);
  overflow-x: hidden;
}

body[data-theme="neo-3d"] .hero,
body[data-theme="neo-3d"] .featured {
  transform: translateZ(40px);
  box-shadow: 0 30px 80px rgba(139,0,255,0.25);
}

/* Posters tilt slightly with parallax */
body[data-theme="neo-3d"] .poster:hover {
  transform: translateY(-10px) translateZ(30px) rotateY(10deg) rotateX(3deg) scale(1.05);
  box-shadow: 0 30px 60px rgba(0,255,209,0.25), 0 0 40px rgba(139,0,255,0.3);
}

/* =========================
   Base layout & typography
   ========================= */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html, body { 
  height: 100%; 
  scroll-behavior: smooth; 
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&display=swap');

body {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% 20%, rgba(0,0,0,0.25), transparent),
              var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle film grain vignette */
.site-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(60% 40% at 50% 30%, rgba(0,0,0,0.0), rgba(0,0,0,0.45));
  pointer-events: none;
  z-index: 0;
  animation: subtleGlow 8s ease-in-out infinite alternate;
}

@keyframes subtleGlow {
  from { opacity: 0.9; }
  to { opacity: 1; }
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 28px 20px;
  position: relative;
  z-index: 2;
}

/* Header / Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px) saturate(120%);
  background: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.15));
  border-bottom: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.brand .logo {
  font-size: 30px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.brand .tagline {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
}

/* Logo and brand styling */
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
  transform: scale(1.05);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.logo-link:hover .logo-text {
  color: var(--accent);
}

/* Controls on the topbar */
.controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Theme switcher */
.theme-switcher {
  display: flex;
  gap: 10px;
  padding: 6px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.03);
}

.theme-btn {
  width: 40px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.theme-btn::before {
  content: "";
  position: absolute; 
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  mix-blend-mode: overlay;
}

.theme-btn[data-theme="neo-tokyo"] {
  background: linear-gradient(135deg, #BF00FF, #FF0055);
}

.theme-btn[data-theme="minimalism"] {
  background: linear-gradient(135deg, #E50914, #530409);
}

.theme-btn[data-theme="modern"] { 
  background: linear-gradient(90deg,#6C63FF,#FF4D9E); 
}

.theme-btn[data-theme="ocean"] { 
  background: linear-gradient(90deg,#00D9FF,#0077BE); 
}

.theme-btn.active { 
  transform: translateY(-4px) scale(1.02); 
  box-shadow: 0 8px 28px rgba(0,0,0,0.6); 
  border-radius: 10px; 
}

.theme-btn[data-theme="neo-tokyo"].active {
  box-shadow: 0 0 25px rgba(191, 0, 255, 0.8), 0 0 45px rgba(255, 0, 85, 0.6);
}

/* Media toggle */
.media-toggle {
  display: flex;
  gap: 8px;
}

.media-toggle-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: all 220ms var(--ease);
  font-size: 14px;
}

.media-toggle-btn:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
}

.media-toggle-btn.active {
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 28px rgba(0,0,0,0.2);
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
  margin: 28px 0 36px;
}

.hero-left { 
  max-width: 760px; 
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  line-height: 1.1;
}

.hero-sub {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.5;
}

/* Featured spot */
.featured {
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.55));
  display: flex;
  align-items: end;
  padding: 18px;
  justify-content: start;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.03);
  background-size: cover;
  background-position: center;
  transition: background-image 600ms ease-in-out, transform 300ms ease;
}

.featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.7);
}

.featured-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 10%, rgba(0,0,0,0.7));
  pointer-events: none;
}

.featured-meta { 
  position: relative; 
  z-index: 2; 
  color: white; 
}

.featured-title { 
  font-size: 20px; 
  font-weight: 800; 
  line-height: 1.2;
}

.featured-sub { 
  color: rgba(255,255,255,0.85); 
  font-size: 13px; 
  margin-top: 6px; 
}

/* SEARCH BOX */
.search-box {
  margin-top: 12px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-icon {
  position: absolute;
  left: 16px;
  font-size: 18px;
  color: var(--primary);
  z-index: 2;
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 18px 20px 18px 52px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  color: var(--text);
  font-size: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.02);
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease), border-color 220ms var(--ease);
  outline: none;
}

#searchInput::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

#searchInput:focus {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.15), 0 0 20px var(--glow-primary);
  border-color: var(--accent);
}

/* Search results grid */
.search-suggestions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding: 6px;
}

/* Poster card - FIXED HOVER */
.poster {
  position: relative;
  flex: 0 0 auto;
  width: 150px;
  height: 225px;
  border-radius: 12px;
  overflow: visible; /* Changed from hidden to allow scale without clipping */
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.3));
  cursor: pointer;
  transition: transform 280ms var(--ease), box-shadow 280ms var(--ease);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: opacity 200ms ease;
}

/* Smooth hover - scales the entire poster without clipping */
.poster:hover { 
  transform: translateY(-10px) scale(1.05); 
  box-shadow: 0 22px 56px rgba(0,0,0,0.6), 0 0 20px var(--glow-primary);
  z-index: 10;
}

/* Overlay meta */
.poster .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 30%, rgba(0,0,0,0.75));
  display: flex;
  align-items: end;
  padding: 10px;
  opacity: 0;
  transition: opacity 250ms var(--ease);
  border-radius: 12px;
  pointer-events: none;
}

.poster:hover .overlay { 
  opacity: 1; 
}

.overlay .meta {
  color: white;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  text-shadow: 0 4px 16px rgba(0,0,0,0.8);
}

/* Placeholder posters */
.poster.placeholder {
  width: 150px;
  height: 225px;
  border-radius: 12px;
  flex: 0 0 auto;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
}

.poster.placeholder:hover {
  transform: translateY(-8px) scale(1.03);
  background: rgba(255,255,255,0.07);
}

.poster.placeholder .empty-poster {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
}

/* Row scroller */
.row {
  margin: 28px 0;
}

.row-header { 
  display: flex; 
  align-items: end; 
  gap: 12px; 
  justify-content: space-between; 
  margin-bottom: 14px; 
}

.row-header h3 { 
  font-size: 20px; 
  letter-spacing: -0.4px; 
  margin: 0;
  font-weight: 700;
}

.row-sub { 
  color: var(--muted); 
  font-size: 13px; 
}

.row-scroller {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible; /* Allow vertical overflow for hover effects */
  padding: 10px 0 20px 0; /* Extra padding for hover scale */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* =========================
   THEMED GRADIENT SCROLLBARS
   ========================= */

/* Horizontal scrollbars for row scrollers */
.row-scroller::-webkit-scrollbar {
  height: 10px;
}

.row-scroller::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  margin: 0 10px;
}

.row-scroller::-webkit-scrollbar-thumb {
  background: var(--gradient);
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 10px var(--glow-primary), 0 0 20px var(--glow-secondary);
}

.row-scroller::-webkit-scrollbar-thumb:hover {
  box-shadow: 0 0 15px var(--glow-primary), 0 0 30px var(--glow-secondary);
  border-color: rgba(0, 0, 0, 0.5);
}

/* Vertical scrollbars (search results, etc.) */
.search-suggestions::-webkit-scrollbar,
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.search-suggestions::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.search-suggestions::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
  background: var(--gradient);
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 10px var(--glow-primary), 0 0 20px var(--glow-secondary);
}

.search-suggestions::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
  box-shadow: 0 0 15px var(--glow-primary), 0 0 30px var(--glow-secondary);
  border-color: rgba(0, 0, 0, 0.5);
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) rgba(0, 0, 0, 0.3);
}

.row-scroller {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) rgba(0, 0, 0, 0.3);
}

/* Control section */
.control-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border-radius: 16px;
  padding: 20px;
  margin: 28px 0;
  display: none;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.control-section.active { 
  display: flex; 
  flex-direction: column;
  gap: 18px;
  animation: fadeUp 0.4s var(--ease);
}

/* Selected series */
.selected-series { 
  display: flex; 
  gap: 18px; 
  align-items: center; 
  width: 100%; 
  flex-wrap: wrap; 
}

.selected-series-poster { 
  width: 110px; 
  height: 160px; 
  object-fit: cover; 
  border-radius: 12px; 
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.05);
}

.selected-series-title { 
  font-size: 22px; 
  font-weight: 800;
  line-height: 1.2;
}

/* Input groups & dropdowns */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 160px;
}

.input-group label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-left: 4px;
}

/* Dropdown core */
select {
  position: relative;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  backdrop-filter: blur(10px) saturate(130%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.04);
}

/* Glowing gradient ring on focus */
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05),
              0 0 10px var(--glow-primary),
              0 0 25px var(--glow-secondary);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  transform: translateY(-1px);
}

/* Hover */
select:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
}

/* Dropdown options */
select option {
  background: var(--background);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}

/* Episode controls */
.episode-controls {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 18px;
  width: 100%;
}

/* Buttons */
.load-btn {
  padding: 14px 24px;
  border-radius: 999px;
  border: none;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.2px;
  background: var(--gradient);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 48px rgba(0,0,0,0.55), 0 0 24px rgba(0,0,0,0.08);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.load-btn:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 22px 70px rgba(0,0,0,0.65), 0 0 35px var(--glow-primary); 
}

.load-btn:active {
  transform: translateY(-2px);
}

/* Player */
.player-container {
  margin-top: 28px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.7));
  display: none;
  border: 1px solid rgba(255,255,255,0.03);
}

.player-container.active { 
  display: block; 
  animation: fadeUp 0.5s var(--ease); 
}

.player-wrap { 
  border-radius: 14px; 
  overflow: hidden; 
  border: 1px solid rgba(255,255,255,0.04); 
  box-shadow: 0 40px 120px rgba(0,0,0,0.7); 
}

.player-wrap iframe { 
  width: 100%; 
  height: 640px; 
  border: 0; 
  display: block; 
}

/* Actions */
.player-actions { 
  display: flex; 
  justify-content: flex-end; 
  gap: 10px; 
  margin-top: 12px; 
}

.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.22s var(--ease);
}

.ghost:hover {
  background: var(--hover-bg);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* Footer */
.footer { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: 10px; 
  padding: 28px 20px; 
  color: var(--muted); 
  font-size: 13px; 
  margin-top: 50px;
  border-top: 1px solid rgba(255,255,255,0.03);
}

/* =========================
   Anime Warning Banner
   ========================= */
.anime-warning {
  display: none;
  background: linear-gradient(90deg, rgba(255,0,85,0.85), rgba(191,0,255,0.85));
  color: #fff;
  text-align: center;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 24px var(--glow-primary);
  animation: fadeIn 0.4s ease forwards;
  z-index: 20;
}

.anime-warning.visible {
  display: block;
}

/* ==============================
   Genre Filter
   ============================== */
.genre-filter {
  margin-top: 24px;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  border: 1px solid var(--border);
}

.genre-filter h3 {
  font-size: 18px;
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 700;
}

.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 14px;
  font-weight: 600;
}

.genre-chip:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.genre-chip.active {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}

.apply-genre-btn {
  margin-top: 16px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.apply-genre-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}

/* =========================
   Responsive Design
   ========================= */
@media (max-width: 980px) {
  .hero { 
    grid-template-columns: 1fr; 
  }
  
  .hero-right { 
    order: -1; 
    margin-bottom: 20px; 
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .player-wrap iframe { 
    height: 420px; 
  }
  
  .search-suggestions { 
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
  }
  
  .controls {
    gap: 12px;
  }
  
  .theme-switcher {
    gap: 6px;
    padding: 4px;
  }
  
  .theme-btn {
    width: 36px;
    height: 28px;
  }
}

@media (max-width: 780px) {
  .control-section.active { 
    flex-direction: column; 
    align-items: stretch; 
  }
  
  .selected-series { 
    flex-direction: column; 
    align-items: flex-start; 
  }
  
  .selected-series-poster { 
    width: 100%; 
    max-width: 240px; 
    height: auto; 
  }
  
  .episode-controls { 
    flex-direction: column; 
    align-items: stretch; 
    width: 100%; 
    gap: 14px;
  }
  
  .input-group {
    width: 100%;
  }
  
  select { 
    width: 100%; 
  }
  
  .media-toggle {
    flex-wrap: wrap;
  }
  
  .row-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 20px 16px;
  }
  
  .brand .logo { 
    font-size: 24px; 
  }
  
  .brand .tagline {
    font-size: 10px;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  .hero-sub {
    font-size: 14px;
  }
  
  .row-header h3 { 
    font-size: 18px; 
  }
  
  .selected-series-poster { 
    width: 96px; 
    height: 136px; 
  }
  
  .selected-series-title {
    font-size: 18px;
  }
  
  .player-wrap iframe { 
    height: 280px; 
  }
  
  .search-suggestions {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }
  
  .poster {
    width: 100px;
    height: 150px;
  }
  
  .footer {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .controls {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* =========================
   Micro animations
   ========================= */
@keyframes popIn {
  from { 
    transform: translateY(10px) scale(0.98); 
    opacity: 0; 
  }
  to { 
    transform: translateY(0) scale(1); 
    opacity: 1; 
  }
}

@keyframes fadeUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* =========================
   Accessibility
   ========================= */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .poster,
  .featured,
  .control-section {
    border: 2px solid var(--text);
  }
  
  .theme-btn,
  .media-toggle-btn,
  .load-btn {
    border: 2px solid var(--text);
  }
}

/* =========================
   Loading states
   ========================= */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================
   Utility classes
   ========================= */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================
   Print styles
   ========================= */
@media print {
  .topbar,
  .controls,
  .theme-switcher,
  .media-toggle,
  .player-container,
  .footer {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .poster,
  .featured {
    break-inside: avoid;
  }
}