/* ═══════════════════════════════════════════════════════
   StreamX v2 — style.css
   Dynamic TMDB-powered streaming site
═══════════════════════════════════════════════════════ */

/* ── Reset & Variables ─────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #ff2a6d;
  --primary-hover: #ff4785;
  --primary-glow: rgba(255, 42, 109, 0.35);
  --primary-glass: rgba(255, 42, 109, 0.14);
  --primary-glass-border: rgba(255, 42, 109, 0.36);
  --red: #ff2a6d;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --indigo: #6366f1;
  --cyan: #00f2fe;
  --green: #10b981;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.2);

  /* CineJoy Signature Gradients */
  --cinejoy-grad-prism: linear-gradient(135deg, #ff2a6d 0%, #9333ea 50%, #00f2fe 100%);
  --cinejoy-grad-primary: linear-gradient(135deg, #ff2a6d 0%, #7928ca 100%);
  --cinejoy-grad-hover: linear-gradient(135deg, #ff4785 0%, #9333ea 100%);
  --cinejoy-grad-anime: linear-gradient(135deg, #00f2fe 0%, #3b82f6 100%);
  --cinejoy-grad-glass: linear-gradient(135deg, rgba(255, 42, 109, 0.2) 0%, rgba(124, 58, 237, 0.15) 100%);

  /* macOS Liquid Glass Palette (Glass instead of flat black) */
  --bg: #070913;
  --surface: rgba(18, 24, 40, 0.65);
  --surface-hover: rgba(26, 36, 58, 0.75);
  --surface2: rgba(22, 30, 48, 0.6);
  --surface3: rgba(28, 38, 62, 0.72);

  /* macOS / Apple TV+ Refined Liquid Glass Design Tokens */
  --glass-bg-1: rgba(255, 255, 255, 0.06);
  --glass-bg-2: rgba(20, 26, 44, 0.58);
  --glass-bg-3: rgba(16, 20, 36, 0.72);
  --glass-bg-hover: rgba(255, 255, 255, 0.12);
  --glass-bg-active: rgba(255, 255, 255, 0.2);

  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-light: rgba(255, 255, 255, 0.16);
  --glass-border-strong: rgba(255, 255, 255, 0.26);
  --glass-border-top: rgba(255, 255, 255, 0.35);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --glass-highlight-strong: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  --glass-sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 60%);

  --glass-blur-sm: 12px;
  --glass-blur-md: 24px;
  --glass-blur-lg: 36px;
  --glass-saturation: saturate(200%) contrast(105%);

  --glass-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
  --glass-shadow-md: 0 14px 36px rgba(0, 0, 0, 0.42);
  --glass-shadow-lg: 0 28px 72px rgba(0, 0, 0, 0.65);
  --glass-glow-card: 0 20px 48px -10px rgba(0, 0, 0, 0.75), 0 0 28px -4px rgba(255, 42, 109, 0.25);

  --border: var(--glass-border);
  --border-strong: var(--glass-border-light);

  /* Typography tokens */
  --text: #f9fafb;
  --text2: rgba(249, 250, 251, 0.74);
  --text3: rgba(249, 250, 251, 0.44);

  /* Radii */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Dimensions */
  --nav-h: 64px;
  --sidebar-w: 240px;
  --sidebar-collapsed-w: 70px;

  /* macOS Smooth Fluid Transitions */
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.32s cubic-bezier(0.16, 1, 0.3, 1);

  /* Elevation */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.75);
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #070913;
  background-image: 
    radial-gradient(1000px 650px at 8% 6%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(1200px 750px at 92% 14%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(1100px 700px at 50% 48%, rgba(255, 42, 109, 0.08), transparent 65%),
    radial-gradient(900px 600px at 85% 82%, rgba(0, 242, 254, 0.12), transparent 60%),
    radial-gradient(1000px 700px at 12% 88%, rgba(99, 102, 241, 0.14), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient living aura behind all frosted glass */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle 800px at 18% 18%, rgba(59, 130, 246, 0.12), transparent 65%),
    radial-gradient(circle 750px at 82% 28%, rgba(168, 85, 247, 0.12), transparent 65%),
    radial-gradient(circle 700px at 48% 68%, rgba(255, 42, 109, 0.06), transparent 65%),
    radial-gradient(circle 850px at 78% 88%, rgba(0, 242, 254, 0.08), transparent 65%);
  filter: blur(50px);
  opacity: 0.9;
}

/* Sleek Glass Scrollbars (macOS / Apple TV style) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ── API Key Banner ────────────────────────────────── */
#api-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #7c3aed;
  color: #fff;
  font-size: 13px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#api-banner a {
  color: #fbbf24;
  text-decoration: underline;
}

#api-banner code {
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

#api-banner button {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── Navigation ────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: rgba(14, 17, 24, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  letter-spacing: -0.5px;
  transition: opacity var(--transition);
}

.nav-logo:hover {
  opacity: 0.9;
}

.nav-logo svg {
  width: 20px;
  height: 20px;
  fill: var(--red);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-weight: 600;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 14px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  width: 250px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.search-wrap:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 18px rgba(0, 0, 0, 0.28);
}

.search-wrap:focus-within {
  width: 320px;
  background: rgba(22, 30, 52, 0.65);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 3px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 30px rgba(0, 0, 0, 0.4);
}

.search-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
}

.search-wrap input::placeholder {
  color: var(--text3);
}

.search-wrap svg {
  flex-shrink: 0;
  color: var(--text3);
  transition: color 0.2s;
}

.search-wrap:focus-within svg {
  color: #ffffff;
}

.search-kbd {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.2;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, monospace;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: opacity 0.2s;
}

.search-wrap:focus-within .search-kbd {
  opacity: 0;
}

.search-icon-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text3);
  transition: color 0.2s, transform 0.15s;
}

.search-icon-btn:hover {
  color: #fff;
  transform: scale(1.08);
}

.search-wrap:focus-within .search-icon-btn {
  color: #fff;
}

.mobile-search-btn,
.search-close-mobile-btn,
.pm-mobile-bar {
  display: none;
}

.search-history {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, rgba(22, 28, 48, 0.78) 0%, rgba(14, 18, 32, 0.85) 100%);
  backdrop-filter: blur(32px) saturate(210%);
  -webkit-backdrop-filter: blur(32px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 14px;
  display: none;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 1000;
}

.search-history.show {
  display: block;
  animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-history-item {
  padding: 11px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-history-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.wl-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  transition: background var(--transition);
}

.wl-nav-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.wl-count-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}

/* ── Pages ─────────────────────────────────────────── */
.page {
  padding-top: calc(var(--nav-h) + 20px);
  min-height: 100vh;
}

#page-home {
  padding-top: 0;
}

/* ── Cinematic Hero Core & Video Background ────────── */
#hero,
#anime-hero {
  position: relative;
  width: 100%;
  height: 86vh;
  min-height: 580px;
  max-height: 880px;
  background-color: #07090f;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 0;
  margin: 0;
  border: none;
  box-shadow: none;
  contain: layout;
}

#anime-hero {
  border-bottom: 1px solid rgba(53, 213, 191, 0.15);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  z-index: 1;
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.hero-video-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
  background-color: transparent;
}

.hero-video-layer.is-playing {
  opacity: 1;
}

.hero-trailer-iframe-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 aspect ratio */
  min-height: 100%;
  min-width: 177.78vh; /* 16:9 ratio guarantee */
  transform: translate(-50%, -50%) scale(1.35);
  pointer-events: none;
}

.hero-trailer-iframe-wrap iframe,
.hero-trailer-iframe-wrap div {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  pointer-events: none;
}

.hero-cinematic-vignette,
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: 
    linear-gradient(90deg, rgba(7, 9, 15, 0.95) 0%, rgba(7, 9, 15, 0.82) 28%, rgba(7, 9, 15, 0.42) 58%, rgba(7, 9, 15, 0.08) 85%, transparent 100%),
    linear-gradient(0deg, #07090f 0%, rgba(7, 9, 15, 0.92) 22%, rgba(7, 9, 15, 0.45) 48%, transparent 75%),
    linear-gradient(180deg, rgba(7, 9, 15, 0.72) 0%, rgba(7, 9, 15, 0.2) 20%, transparent 40%);
}

.anime-hero-overlay.hero-cinematic-vignette {
  background: 
    linear-gradient(90deg, rgba(6, 10, 20, 0.95) 0%, rgba(6, 10, 20, 0.82) 28%, rgba(6, 10, 20, 0.42) 58%, rgba(6, 10, 20, 0.08) 85%, transparent 100%),
    linear-gradient(0deg, #060a14 0%, rgba(6, 10, 20, 0.92) 22%, rgba(6, 10, 20, 0.45) 48%, transparent 75%),
    linear-gradient(180deg, rgba(6, 10, 20, 0.72) 0%, rgba(6, 10, 20, 0.2) 20%, transparent 40%);
}

/* ── Hero Top Controls & Sound Button ───────────────── */
.hero-top-controls {
  position: absolute;
  top: 28px;
  right: 36px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: var(--radius-full, 9999px);
  background: rgba(14, 20, 36, 0.68);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  user-select: none;
}

.hero-sound-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 #ffffff;
}

.hero-sound-btn.is-unmuted {
  background: rgba(255, 42, 109, 0.28);
  border-color: rgba(255, 42, 109, 0.65);
  border-top-color: rgba(255, 140, 180, 0.85);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(255, 42, 109, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#anime-hero .hero-sound-btn.is-unmuted {
  background: rgba(53, 213, 191, 0.28);
  border-color: rgba(53, 213, 191, 0.65);
  border-top-color: rgba(120, 255, 235, 0.85);
  box-shadow: 0 0 24px rgba(53, 213, 191, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero-sound-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-sound-text {
  font-size: 12.5px;
  font-weight: 600;
}

.hero-content {
  position: relative;
  z-index: 5;
  margin: 0 0 48px 44px;
  padding: 0;
  max-width: 660px;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  pointer-events: auto;
}

@media (max-width: 767px) {
  #hero,
  #anime-hero {
    height: 72vh;
    min-height: 480px;
    max-height: 580px;
  }

  .hero-top-controls {
    top: 16px;
    right: 16px;
  }

  .hero-sound-btn {
    padding: 7px 14px;
    font-size: 11.5px;
    gap: 6px;
  }

  .hero-content {
    margin: 0 16px 24px 16px;
    padding: 0;
    max-width: 100%;
    background: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.hero-genres {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: #ffffff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.9);
}

.hero-overview {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.62;
  margin-bottom: 18px;
  max-width: 520px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 20px;
}

.hero-rating-num {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold);
  margin-left: 4px;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#hero:hover .hero-arrow {
  opacity: 1;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 42, 109, 0.35), inset 0 1px 0 #ffffff;
}

.hero-dots {
  position: absolute;
  bottom: 24px;
  right: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  padding: 0;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.hero-dot.active {
  width: 28px;
  background: var(--primary);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 14px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ── Home Destinations Selector ─────────────────────── */
.home-destinations-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 24px 10px 24px;
  position: relative;
  z-index: 15;
}

.dest-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.dest-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.dest-btn.active {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.22) 0%, rgba(139, 92, 246, 0.18) 100%);
  border-color: rgba(255, 42, 109, 0.55);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(255, 42, 109, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#dest-btn-anime.active,
#anime-dest-btn-anime.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.22) 0%, rgba(139, 92, 246, 0.16) 100%);
  border-color: #00f2fe;
  color: #ffffff;
  box-shadow: 0 0 24px rgba(0, 242, 254, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ── Content Destination Sections ──────────────────── */
.content-destination-section {
  position: relative;
  width: 100%;
}

/* ── Anime Subnav Pills ───────────────────────────── */
.anime-subnav-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 20px 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.anime-subnav-pills::-webkit-scrollbar {
  display: none;
}

.anime-subnav-pills .pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.anime-subnav-pills .pill-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: rgba(53, 213, 191, 0.4);
}

.anime-subnav-pills .pill-btn.active {
  background: rgba(53, 213, 191, 0.16);
  color: #35d5bf;
  border-color: rgba(53, 213, 191, 0.6);
  box-shadow: 0 0 16px rgba(53, 213, 191, 0.25);
}

/* ── Section Gateway Divider ───────────────────────── */
.section-gateway-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 60px 32px 36px 32px;
}

.gateway-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53, 213, 191, 0.45), transparent);
}

.gateway-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 24px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(53, 213, 191, 0.35);
  color: #35d5bf;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 28px rgba(53, 213, 191, 0.22);
}

/* ── Anime Hero Banner ─────────────────────────────── */
.anime-hero-banner {
  position: relative;
  width: 100%;
  height: 86vh;
  min-height: 580px;
  max-height: 880px;
  background-color: #060a14;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 0;
  margin: 0;
  border: none;
  box-shadow: none;
}

.anime-hero-banner.hero-fade {
  opacity: 0;
  transform: scale(1.02);
}

.anime-hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, rgba(8, 14, 28, 0.92) 0%, rgba(8, 14, 28, 0.6) 42%, rgba(8, 14, 28, 0.18) 75%, transparent 100%),
    linear-gradient(0deg, #080a12 0%, rgba(8, 14, 28, 0.75) 25%, rgba(8, 14, 28, 0.15) 55%, transparent 80%),
    linear-gradient(180deg, rgba(8, 14, 28, 0.6) 0%, transparent 25%);
  pointer-events: none;
}

.anime-hero-content {
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.anime-hero-banner:hover .hero-arrow {
  opacity: 1;
}

.anime-hero-banner .hero-dot.active {
  background: #35d5bf;
  box-shadow: 0 0 14px rgba(53, 213, 191, 0.6);
}

.badge-anime {
  background: rgba(53, 213, 191, 0.18);
  color: #35d5bf;
  border: 1px solid rgba(53, 213, 191, 0.38);
}

.badge-donghua {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.38);
}

.badge-ep {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.anime-btn-primary {
  background: linear-gradient(135deg, #35d5bf 0%, #0ea5e9 100%) !important;
  color: #04121a !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 20px rgba(53, 213, 191, 0.35) !important;
}

.anime-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(53, 213, 191, 0.5) !important;
}

@media (max-width: 767px) {
  .home-destinations-bar {
    padding: 10px 14px 4px 14px;
    gap: 8px;
  }
  .dest-btn {
    padding: 8px 14px;
    font-size: 12px;
    gap: 6px;
  }
  .anime-hero-banner {
    margin: 0;
    height: 72vh;
    min-height: 480px;
    max-height: 580px;
    border-radius: 0;
  }
  .section-gateway-divider {
    margin: 36px 14px 20px 14px;
  }
  .gateway-badge {
    font-size: 11px;
    padding: 6px 14px;
    letter-spacing: 1px;
  }
}

/* ── Buttons ────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ff2a6d 0%, #7928ca 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(255, 42, 109, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff4785 0%, #9333ea 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 42, 109, 0.5), 0 0 20px rgba(147, 51, 234, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  background: var(--glass-bg-2);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-secondary:active {
  transform: translateY(1px) scale(0.98);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.badge-movie {
  background: rgba(255, 42, 109, 0.22);
  color: #ffffff;
  border-color: rgba(255, 42, 109, 0.48);
  box-shadow: 0 4px 14px rgba(255, 42, 109, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.badge-tv {
  background: rgba(59, 130, 246, 0.28);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.badge-drama {
  background: rgba(236, 72, 153, 0.28);
  color: #ffffff;
  border-color: rgba(236, 72, 153, 0.5);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.badge-4k {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.badge-year {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text2);
}

.badge-meta {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text3);
  font-size: 9px;
}

.badge-anime {
  background: rgba(139, 92, 246, 0.28);
  color: #ffffff;
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.badge-donghua {
  background: rgba(16, 185, 129, 0.28);
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ── Stars ──────────────────────────────────────────── */
.star {
  font-size: 11px;
  color: var(--gold);
}

.star.empty {
  color: rgba(255, 255, 255, 0.2);
}

/* ── Home rows ──────────────────────────────────────── */
#home-rows,
#history-rows {
  padding: 0 32px 64px;
}

.row-section {
  margin-bottom: 40px;
  position: relative;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.row-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-see-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.row-see-all:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--glass-border-strong);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), var(--glass-shadow-sm);
}

.row-error {
  font-size: 13px;
  color: var(--text3);
  padding: 24px 0;
  text-align: center;
}

.row-rail-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.row-arrow {
  position: absolute;
  top: calc(50% - 24px);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.row-rail-wrap:hover .row-arrow {
  opacity: 0.95;
}

.row-arrow-prev {
  left: 10px;
}

.row-arrow-next {
  right: 10px;
}

.row-arrow:hover {
  opacity: 1 !important;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 18px rgba(255, 42, 109, 0.35), inset 0 1px 0 #ffffff;
}

.row-arrow svg {
  transition: transform 0.2s ease;
}

.row-arrow:hover svg {
  transform: scale(1.15);
}

.row-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 16px;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  user-select: none;
  width: 100%;
}

.row-scroll::-webkit-scrollbar {
  height: 5px;
}

.row-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.row-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}

.row-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.row-loader {
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
  flex-shrink: 0;
  width: 175px;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: visible;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
  background: transparent;
}

.card:hover {
  transform: translateY(-8px) scale(1.035);
  z-index: 20;
}

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

.card:hover .card-wl {
  opacity: 1;
  transform: scale(1);
}

/* Continue Watching Widescreen Card */
.history-card {
  width: 260px;
}

.card-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, rgba(20, 24, 36, 0.6) 0%, rgba(12, 14, 22, 0.8) 100%);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: border-color 0.28s ease, box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Specular Reflection Shimmer on Card Hover (Apple TV+ style) */
.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 35%, rgba(255, 255, 255, 0.14) 48%, rgba(255, 255, 255, 0.26) 50%, rgba(255, 255, 255, 0.14) 52%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 3;
}

.card:hover .card-poster::after {
  transform: translateX(120%);
}

.card:hover .card-poster {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.85), 0 0 25px -4px rgba(255, 42, 109, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.history-poster {
  aspect-ratio: 16/9;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card-img {
  transform: scale(1.065);
}

.card-img.loaded {
  opacity: 1;
}

.card-no-img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, rgba(26, 34, 56, 0.6) 0%, rgba(14, 18, 30, 0.75) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0%, rgba(14, 18, 32, 0.58) 100%);
  backdrop-filter: blur(6px) saturate(160%);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  transform: scale(0.85);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.2s ease;
}

.card:hover .card-play-btn {
  transform: scale(1);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 20px rgba(255, 255, 255, 0.5), inset 0 1px 0 #ffffff;
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  z-index: 4;
  background: rgba(18, 24, 40, 0.68);
  backdrop-filter: blur(16px) saturate(190%);
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.card-wl {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(18, 24, 40, 0.68);
  backdrop-filter: blur(16px) saturate(190%);
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  z-index: 5;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.9);
}

.card:hover .card-wl {
  opacity: 1;
  transform: scale(1);
}

.card-wl.added {
  opacity: 1;
  background: var(--primary);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 16px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: scale(1);
}

.card-wl:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.12);
}

.card-wl.added:hover {
  background: var(--primary-hover);
}

/* Continue Watching Progress & Ep Tag */
.history-ep {
  position: absolute;
  bottom: 12px;
  left: 10px;
  background: rgba(18, 24, 40, 0.72);
  backdrop-filter: blur(16px) saturate(190%);
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  z-index: 3;
  letter-spacing: 0.4px;
}

.history-remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(18, 24, 40, 0.72);
  backdrop-filter: blur(16px) saturate(190%);
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.9);
}

.history-card:hover .history-remove-btn {
  opacity: 1;
  transform: scale(1);
}

.history-remove-btn:hover {
  background: var(--primary);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.12);
  box-shadow: 0 0 14px var(--primary-glow);
}

.history-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  z-index: 4;
}

.history-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff2a6d, #9333ea, #00f2fe);
  box-shadow: 0 0 12px rgba(255, 42, 109, 0.7);
  border-radius: 0 3px 3px 0;
  transition: width 0.3s ease;
}

.card-info {
  padding: 10px 4px 0;
}

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text3);
}

.card-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-weight: 700;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
}

.card-year {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text2);
}

.history-time-hint {
  color: var(--text2);
  font-weight: 500;
}

/* Skeleton card */
.card-skeleton {
  pointer-events: none;
}

.card-skeleton .card-poster {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite ease-in-out;
  border-color: transparent;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ── Search page ────────────────────────────────────── */
#page-search {
  padding: calc(var(--nav-h) + 20px) 20px 60px;
}

#search-label {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 16px;
}

.search-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.browse-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.search-grid .card {
  width: auto;
}

.browse-grid .card {
  width: 140px !important;
}

.search-grid .card-poster,
.browse-grid .card-poster {
  width: 100%;
}

.search-error {
  font-size: 13px;
  color: var(--text3);
  padding: 40px 0;
  text-align: center;
}

/* ── Browse page ────────────────────────────────────── */
#page-browse {
  padding: calc(var(--nav-h) + 20px) 20px 60px;
}

.browse-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.browse-header h1 {
  font-size: 20px;
  font-weight: 600;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: background var(--transition);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.13);
}

/* ── Watchlist page ─────────────────────────────────── */
#page-watchlist {
  padding: calc(var(--nav-h) + 20px) 20px 60px;
}

.wl-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.wl-header h1 {
  font-size: 20px;
  font-weight: 600;
}

#wl-count {
  font-size: 12px;
  color: var(--text3);
}

.wl-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.wl-grid .card {
  width: auto;
}

.wl-grid .card-poster {
  width: 100%;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}

/* ── Scroll sentinel ────────────────────────────────── */
.scroll-sentinel {
  flex-shrink: 0;
  width: 1px;
  height: 100px;
  visibility: hidden;
}

/* ── Loaders ────────────────────────────────────────── */
.loader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

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

.loader-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px;
}

.loader-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text3);
  animation: bounce 0.8s infinite;
}

.loader-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.loader-dots span:nth-child(3) {
  animation-delay: 0.30s;
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: translateY(0)
  }

  40% {
    transform: translateY(-8px)
  }
}

/* ── Player Modal ───────────────────────────────────── */
#player-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: radial-gradient(circle at 50% 35%, rgba(35, 52, 90, 0.45), rgba(10, 13, 22, 0.68) 75%);
  backdrop-filter: blur(36px) saturate(210%) brightness(96%);
  -webkit-backdrop-filter: blur(36px) saturate(210%) brightness(96%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overscroll-behavior: contain;
}

#player-modal-bg.open {
  display: flex !important;
}

.player-modal {
  background: linear-gradient(135deg, rgba(22, 28, 48, 0.75) 0%, rgba(14, 18, 32, 0.82) 100%);
  backdrop-filter: blur(40px) saturate(220%) brightness(104%);
  -webkit-backdrop-filter: blur(40px) saturate(220%) brightness(104%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  width: min(940px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.75), 0 0 50px -10px rgba(255, 42, 109, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 0 30px rgba(255, 255, 255, 0.02);
}

.pm-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  background: rgba(22, 28, 46, 0.55);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  z-index: 10;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pm-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pm-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: scale(1.08);
}

.pm-header-title {
  font-size: 14px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  letter-spacing: -0.2px;
}

.pm-header-actions {
  margin-left: auto;
}

.pm-wl-btn {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.pm-wl-btn.added {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 12px var(--primary-glow);
}

.pm-wl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.pm-body {
  overflow-y: auto;
  flex: 1;
}

.pm-body::-webkit-scrollbar {
  width: 6px;
}

.pm-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}

.pm-hero {
  height: 270px;
  background-size: cover;
  background-position: center 20%;
  background-color: var(--surface2);
  position: relative;
  flex-shrink: 0;
}

.pm-hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, rgba(16, 20, 34, 0.88) 0%, rgba(16, 20, 34, 0.58) 45%, rgba(16, 20, 34, 0.2) 100%),
    linear-gradient(0deg, rgba(16, 20, 34, 0.95) 0%, rgba(16, 20, 34, 0.65) 35%, transparent 80%);
}

.pm-hero-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  z-index: 2;
}

.pm-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 6px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.pm-tagline {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 10px;
  font-style: italic;
}

.pm-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.pm-rating-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pm-rating-num {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--gold);
  margin-left: 4px;
}

.pm-votes {
  font-size: 12px;
  color: var(--text3);
}

.pm-hero-cta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pm-cta-btn {
  padding: 8px 18px !important;
  font-size: 13px !important;
  border-radius: var(--radius-sm) !important;
}

.pm-content {
  padding: 24px 28px 36px;
}

.pm-overview {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.68;
  margin-bottom: 14px;
  max-width: 820px;
}

.pm-genres {
  font-size: 12.5px;
  color: var(--text3);
  margin-bottom: 20px;
}

.pm-label {
  color: var(--text2);
  font-weight: 600;
}

/* TV controls */
.pm-tv-ctrl {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

select.ep-sel {
  background: var(--surface2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  padding: 8px 12px;
  flex: 1;
  min-width: 140px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}

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

select.ep-sel option {
  background: var(--surface);
  color: #fff;
}

/* Tabs */
.pm-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.pm-tab {
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--text3);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  margin-bottom: -1px;
  cursor: pointer;
}

.pm-tab.active {
  color: #fff;
  border-bottom-color: var(--primary);
}

.pm-tab:hover {
  color: var(--text2);
}

.pm-tab-content {
  display: none;
}

.pm-tab-content.active {
  display: block;
}

/* Server grid */
.pm-srv-label {
  font-size: 10px;
  color: var(--text3);
}

/* Provider Selector Dropdown */
.pm-provider-ctrl {
  margin: 12px 0 16px;
}

.pm-provider-label {
  display: block;
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pm-provider-select-wrap {
  position: relative;
  width: 100%;
}

.pm-provider-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px 40px 12px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pm-provider-select:hover,
.pm-provider-select:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.pm-provider-select option {
  background: #18191c;
  color: #fff;
  padding: 10px;
  font-size: 13px;
}

.pm-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.pm-provider-desc {
  font-size: 11px;
  color: var(--text3);
  margin-top: 6px;
  padding-left: 2px;
}

/* Fallback Toast Notification */
.pm-fallback-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fef08a;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 12px;
  animation: fadeIn 0.3s ease;
}

.pm-toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.pm-srv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 6px;
}


.pm-dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 6px;
}

.srv-btn,
.dl-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-radius: var(--radius);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 12px;
  transition: all var(--transition);
  text-decoration: none;
}

.srv-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.dl-btn {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.05);
}

.dl-btn:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.srv-icon,
.dl-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.dl-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.srv-info {
  flex: 1;
  min-width: 0;
}

.srv-name {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dl-name {
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srv-desc {
  font-size: 10px;
  color: var(--text3);
  margin-top: 1px;
}

.srv-arrow,
.dl-arrow {
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
}

.srv-btn:hover .srv-arrow,
.dl-btn:hover .dl-arrow {
  color: #fff;
}

.pm-note {
  font-size: 10px;
  color: var(--text3);
  text-align: center;
  padding: 8px 0 2px;
  line-height: 1.5;
}

.pm-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 20px 0 10px;
}

/* Cast */
.pm-cast-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.pm-cast-scroll::-webkit-scrollbar {
  height: 3px;
}

.pm-cast-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.cast-card {
  flex-shrink: 0;
  width: 70px;
}

.cast-photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--surface2);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  overflow: hidden;
}

.cast-initials {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
}

.cast-name {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

.cast-role {
  font-size: 9px;
  color: var(--text3);
  text-align: center;
  line-height: 1.3;
}

/* Recommendations */
.pm-rec-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.pm-rec-scroll::-webkit-scrollbar {
  height: 3px;
}

.pm-rec-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.rec-card {
  flex-shrink: 0;
  width: 100px;
  cursor: pointer;
}

.rec-card:hover .rec-overlay {
  opacity: 1;
}

.rec-poster {
  width: 100px;
  height: 150px;
  border-radius: 6px;
  background: var(--surface2) center/cover;
  position: relative;
  overflow: hidden;
  margin-bottom: 5px;
}

.rec-no-img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.15);
}

.rec-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  font-size: 18px;
}

.rec-title {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.rec-year {
  font-size: 9px;
  color: var(--text3);
  text-align: center;
  margin-top: 2px;
}

/* Skeleton lines */
.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  animation: shimmer 1.5s infinite;
}

.w60 {
  width: 60%;
}

.w40 {
  width: 40%;
}

/* ── Scrollbar global ───────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

/* ── Footer ─────────────────────────────────────────── */
footer {
  background: rgba(18, 24, 40, 0.45);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 28px 20px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text3);
}

footer a {
  color: var(--text2);
}

footer a:hover {
  color: #fff;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
  #hero,
  #anime-hero {
    height: 72vh;
    min-height: 480px;
    max-height: 580px;
    align-items: flex-end;
  }

  .hero-content {
    padding: 0 16px 32px;
    max-width: 100%;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .hero-title {
    font-size: 28px;
    line-height: 1.15;
    margin-bottom: 8px;
  }

  .hero-overview {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-arrow {
    display: none;
  }

  .row-arrow {
    display: none;
  }

  nav {
    padding: 0 14px;
    gap: 8px;
  }

  .search-wrap {
    width: 140px;
    padding: 6px 10px;
  }

  .search-wrap:focus-within {
    width: 190px;
  }

  #home-rows,
  #history-rows {
    padding: 0 16px 44px;
  }

  #page-search,
  #page-browse,
  #page-watchlist {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pm-srv-grid,
  .pm-dl-grid {
    grid-template-columns: 1fr;
  }

  .pm-hero {
    height: 170px;
  }

  .pm-hero-info {
    padding: 14px;
  }

  .pm-title {
    font-size: 18px;
  }

  .pm-content {
    padding: 14px;
  }

  #player-modal-bg {
    padding: 0;
    align-items: stretch;
  }

  .player-modal {
    max-height: 100dvh;
    height: 100dvh;
    width: 100vw;
    border-radius: 0;
  }

  .card {
    width: 135px;
  }

  .history-card {
    width: 210px;
  }
}

@media (max-width: 400px) {
  .card {
    width: 120px;
  }

  .history-card {
    width: 180px;
  }

  .hero-btns {
    gap: 8px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 9px 16px;
    font-size: 13px;
  }
}

/* Indian Cinema Dropdown */

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 190px;
  background: linear-gradient(135deg, rgba(22, 28, 48, 0.78) 0%, rgba(14, 18, 32, 0.85) 100%);
  backdrop-filter: blur(32px) saturate(210%);
  -webkit-backdrop-filter: blur(32px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  overflow: hidden;
  z-index: 9999;
  flex-direction: column;
  padding: 6px;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown:hover .dropdown-content {
  display: flex;
}

.dropdown-content a {
  display: block;
  width: 100%;
  padding: 10px 14px;
  color: var(--text2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
}

.dropdown-content a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}


.row-section {
  width: 100%;
}

.row-scroll {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 12px;
}

.row-scroll .card {
  flex: 0 0 140px !important;
}

#browse-grid .row-scroll .card {
  width: 140px !important;
  flex: 0 0 140px !important;
}

.srv-btn.active {
  border: 2px solid #ff2a6d;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.22) 0%, rgba(139, 92, 246, 0.16) 100%);
  box-shadow: 0 0 16px rgba(255, 42, 109, 0.35);
  transform: translateY(-2px);
}

.srv-btn.active .srv-name {
  color: #fff;
  font-weight: 700;
}

.srv-btn.active .srv-icon {
  transform: scale(1.15);
}

.srv-btn.active::after {
  content: "✓";
  margin-left: auto;
  color: #22c55e;
  font-weight: bold;
  font-size: 16px;
}

@media (min-width: 769px) {
  .hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;

    border-radius: 50%;
    background: rgba(0, 0, 0, .45);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 26px;
    color: #fff;

    cursor: pointer;

    opacity: 1;

    transition: .25s;

    z-index: 20;
  }

  .hero-prev {
    left: 18px;
  }

  .hero-next {
    right: 18px;
  }

  .hero-arrow:hover {
    background: linear-gradient(135deg, rgba(255, 42, 109, 0.9), rgba(121, 40, 202, 0.9));
    transform: translateY(-50%) scale(1.1);
  }
}

/* Anime Playback Styles */
.anime-ep-card {
  cursor: pointer;
  transition: all var(--transition);
}

.anime-ep-card:hover {
  background: var(--surface2) !important;
  border-color: var(--primary) !important;
  transform: translateY(-2px);
}

.anime-ep-card.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.16) 0%, rgba(139, 92, 246, 0.12) 100%) !important;
  border-color: #00f2fe !important;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.pm-player-wrap {
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(26, 34, 56, 0.75) 0%, rgba(10, 14, 24, 0.95) 100%);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 15px 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 35px -5px rgba(255, 42, 109, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.pm-player-wrap video {
  display: block;
}

.anime-player-controls {
  background: linear-gradient(135deg, rgba(22, 28, 48, 0.65) 0%, rgba(14, 18, 30, 0.6) 100%);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.anime-ctrl-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.anime-ctrl-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.anime-ctrl-options {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(190%);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
  width: fit-content;
}

.anime-ctrl-btn {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.anime-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.anime-ctrl-btn.active {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  border-top-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  font-weight: 700;
}

.anime-ep-card-rich.playing-active {
  border-color: #00f2fe !important;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.16) 0%, rgba(139, 92, 246, 0.12) 100%) !important;
}

.playing-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.85) 0%, rgba(121, 40, 202, 0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}

/* Compact Episode Grid Buttons */
.anime-ep-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.anime-ep-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.anime-ep-btn.active {
  background: var(--primary) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 6px 20px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  font-weight: 700;
}

.anime-ep-btn.watched {
  color: #888;
  border-color: rgba(0, 255, 0, 0.2);
  background: rgba(0, 255, 0, 0.02);
}

/* Season selector horizontal bar */
.anime-season-selector-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 15px;
  scrollbar-width: thin;
}

.anime-season-selector-bar::-webkit-scrollbar {
  height: 4px;
}

.anime-season-selector-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.anime-season-selector-tab {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text3);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.anime-season-selector-tab:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.anime-season-selector-tab.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

/* Jump to Episode Input */
.anime-season-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 15px;
}

.anime-jump-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  width: 95px;
  margin-left: auto;
  outline: none;
  transition: all 0.2s ease;
}

.anime-jump-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

/* Premium Anime UI updates */
.anime-season-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: none;
}

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

.anime-season-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
}

.anime-season-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.anime-season-tab.active {
  background: linear-gradient(135deg, #00f2fe 0%, #3b82f6 100%);
  color: #04121a;
  border-color: #00f2fe;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 242, 254, 0.35);
}

.anime-ep-grid-rich {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 24px;
}

.anime-ep-card-rich {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.anime-ep-card-rich:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.anime-ep-card-rich.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.14) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: #00f2fe;
  box-shadow: 0 4px 16px rgba(0, 242, 254, 0.25);
}

.anime-ep-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(26, 34, 56, 0.6) 0%, rgba(14, 18, 30, 0.8) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

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

.anime-ep-card-rich:hover .anime-ep-thumb {
  transform: scale(1.05);
}

.anime-ep-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.anime-ep-play-overlay svg {
  width: 42px;
  height: 42px;
  fill: #fff;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  transform: scale(0.85);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.anime-ep-card-rich:hover .anime-ep-play-overlay svg {
  transform: scale(1);
}

.anime-ep-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.anime-ep-badge.filler {
  background: var(--primary);
}

.anime-ep-badge.recap {
  background: #3a86ff;
}

.anime-ep-info-rich {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.anime-ep-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
}

.anime-ep-num-label {
  color: var(--primary);
  font-weight: 700;
}

.anime-ep-title-rich {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.anime-ep-title-jp {
  font-size: 11px;
  color: var(--text3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-relation-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  scrollbar-width: thin;
}

.pm-relation-scroll::-webkit-scrollbar {
  height: 4px;
}

.pm-relation-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.relation-card {
  flex: 0 0 130px;
  cursor: pointer;
  position: relative;
}

.relation-card:hover .relation-poster {
  transform: scale(1.03);
  border-color: rgba(255, 255, 255, 0.25);
}

.relation-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.relation-tag-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  text-align: center;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relation-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  margin-top: 6px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.15s ease;
}

.relation-card:hover .relation-title {
  color: #fff;
}

.relation-meta {
  font-size: 10px;
  color: var(--text3);
  margin-top: 2px;
}

.anime-ep-card-rich.playing-active {
  border-color: #00f2fe !important;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.16) 0%, rgba(139, 92, 246, 0.12) 100%) !important;
}

.playing-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.85) 0%, rgba(121, 40, 202, 0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}

/* Compact Episode Grid Buttons */
.anime-ep-btn {
  width: 50px;
  height: 50px;
  background: var(--glass-bg-1, rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(var(--glass-blur-sm, 12px));
  -webkit-backdrop-filter: blur(var(--glass-blur-sm, 12px));
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm, 10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.anime-ep-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--glass-border-strong);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), var(--glass-shadow-sm);
}

.anime-ep-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 16px var(--primary-glow) !important;
  font-weight: 700;
}

.anime-ep-btn.watched {
  color: #888;
  border-color: rgba(0, 255, 0, 0.15);
  background: rgba(0, 255, 0, 0.03);
}

/* Season selector horizontal bar */
.anime-season-selector-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 15px;
  scrollbar-width: thin;
}

.anime-season-selector-bar::-webkit-scrollbar {
  height: 4px;
}

.anime-season-selector-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.anime-season-selector-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text3);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.anime-season-selector-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.anime-season-selector-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Jump to Episode Input */
.anime-season-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 15px;
}

.anime-jump-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  width: 95px;
  margin-left: auto;
  outline: none;
  transition: all 0.2s ease;
}

.anime-jump-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

/* ── Mobile Navigation Drawer ─────────────────── */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  margin-right: 8px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 40%, rgba(26, 38, 68, 0.45), rgba(8, 10, 18, 0.6) 80%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  max-width: 85%;
  background: linear-gradient(180deg, rgba(22, 28, 48, 0.72) 0%, rgba(14, 18, 30, 0.68) 100%);
  backdrop-filter: blur(32px) saturate(210%);
  -webkit-backdrop-filter: blur(32px) saturate(210%);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08), 20px 0 50px rgba(0, 0, 0, 0.5);
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.drawer-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.drawer-logo svg {
  width: 20px;
  height: 20px;
  fill: var(--red);
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.drawer-close:hover {
  color: #fff;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.drawer-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm, 10px);
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.drawer-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border);
}

.drawer-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.18) 0%, rgba(139, 92, 246, 0.14) 100%);
  border: 1px solid rgba(255, 42, 109, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 16px rgba(255, 42, 109, 0.25);
  font-weight: 600;
}

.drawer-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text3);
  letter-spacing: 1.5px;
  margin-top: 16px;
  margin-bottom: 6px;
  padding-left: 14px;
}

.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
  flex-shrink: 0;
}

/* Responsive updates for screens below 768px */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none !important;
  }
}

/* Premium StreamX Visual Toast Alert */
.streamx-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 50px);
  background: rgba(20, 20, 25, 0.95);
  border: 1px solid var(--border);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.streamx-toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PHASE 2 - READING MODULE & SIDEBAR STYLING
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Theme custom properties variables ──────────────── */
:root {
  --primary: #ff2a6d;
}

body {
  --red: var(--primary);
}

body.theme-crimson {
  --primary: #e50914;
}

body.theme-sapphire {
  --primary: #3b82f6;
}

body.theme-emerald {
  --primary: #10b981;
}

body.theme-nordic {
  --primary: #00bcd4;
}

body.theme-cinejoy,
body:not([class*="theme-"]) {
  --primary: #ff2a6d;
}

/* ── Layout Offsets (Screens >= 768px) ─────────────── */
@media (min-width: 768px) {
  body {
    padding-left: var(--sidebar-w, 240px) !important;
    transition: padding-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.sidebar-collapsed {
    padding-left: var(--sidebar-collapsed-w, 70px) !important;
  }

  .top-header {
    left: calc(var(--sidebar-w, 240px) + 20px) !important;
    right: 24px !important;
    top: 14px !important;
    transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.sidebar-collapsed .top-header {
    left: calc(var(--sidebar-collapsed-w, 70px) + 20px) !important;
  }

  .page {
    transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@media (max-width: 767px) {
  body {
    padding-left: 0 !important;
  }
}

/* ── Desktop Sidebar ───────────────────────────────── */
/* ── Desktop Sidebar ───────────────────────────────── */
.desktop-sidebar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w, 240px);
  background: linear-gradient(180deg, rgba(20, 26, 44, 0.65) 0%, rgba(12, 16, 28, 0.55) 100%);
  backdrop-filter: blur(32px) saturate(210%) brightness(105%);
  -webkit-backdrop-filter: blur(32px) saturate(210%) brightness(105%);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.35), inset -1px 0 0 rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 101;
  flex-direction: column;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .desktop-sidebar {
    display: flex !important;
  }
}

@media (max-width: 767px) {
  .desktop-sidebar {
    display: none !important;
  }
}

.desktop-sidebar.collapsed {
  width: var(--sidebar-collapsed-w, 70px);
}

.desktop-sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0 8px;
}

.desktop-sidebar.collapsed .sidebar-logo {
  justify-content: center;
  margin: 0 auto;
}

.desktop-sidebar.collapsed .sidebar-toggle-btn {
  display: none;
}

.sidebar-header {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.sidebar-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.sidebar-logo svg {
  width: 22px;
  height: 22px;
  fill: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.desktop-sidebar.collapsed .logo-text {
  display: none;
}

.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all var(--transition);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-toggle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.desktop-sidebar.collapsed .sidebar-toggle-btn {
  transform: rotate(180deg);
  margin: 0 auto;
}

.sidebar-links-container {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-section-title {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text3);
  letter-spacing: 1.5px;
  margin: 16px 0 6px 12px;
  white-space: nowrap;
}

.desktop-sidebar.collapsed .sidebar-section-title {
  display: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  white-space: nowrap;
}

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

.sidebar-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.18) 0%, rgba(139, 92, 246, 0.14) 100%);
  border: 1px solid rgba(255, 42, 109, 0.38);
  box-shadow: 0 4px 16px rgba(255, 42, 109, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.sidebar-link.active svg {
  color: #ff2a6d !important;
  filter: drop-shadow(0 0 8px rgba(255, 42, 109, 0.6));
}

.sidebar-icon-svg {
  width: 18px;
  height: 18px;
  color: var(--text2);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
  opacity: 0.85;
}

.sidebar-link:hover .sidebar-icon-svg {
  color: #ffffff;
  opacity: 1;
  transform: scale(1.06);
}

.sidebar-link-text {
  flex: 1;
  transition: opacity 0.2s;
}

.desktop-sidebar.collapsed .sidebar-link-text {
  display: none;
}

.sidebar-chevron {
  margin-left: auto;
  color: var(--text3);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.sidebar-link.open .sidebar-chevron {
  transform: rotate(180deg);
}

.desktop-sidebar.collapsed .sidebar-chevron {
  display: none;
}

.desktop-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 10px 0;
}

.sidebar-sublinks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 24px;
  margin-bottom: 4px;
}

.desktop-sidebar.collapsed .sidebar-sublinks {
  display: none !important;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--text2);
  font-size: 12.5px;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.sidebar-sublink:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-sublink.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.sidebar-sublink .sidebar-icon-svg {
  width: 15px;
  height: 15px;
  opacity: 0.8;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 10px 8px;
  flex-shrink: 0;
}

/* ── Minimal Header Elements ────────────────────────── */
.top-header {
  position: fixed;
  top: 12px;
  left: 16px;
  right: 16px;
  height: 56px;
  border-radius: 18px;
  z-index: 100;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(18, 24, 40, 0.6) !important;
  backdrop-filter: blur(32px) saturate(210%) brightness(105%);
  -webkit-backdrop-filter: blur(32px) saturate(210%) brightness(105%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-header.is-scrolled {
  background: rgba(18, 24, 42, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.header-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text2);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-right: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.header-menu-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.header-logo svg {
  width: 20px;
  height: 20px;
  fill: var(--red);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

@media (min-width: 768px) {
  /* On desktop, hide duplicate logo from top header (it's already in the sidebar) */
  .top-header .header-logo {
    display: none !important;
  }
}

@media (max-width: 767px) {
  /* On mobile, show header logo */
  .top-header .header-logo {
    display: flex;
  }
}

.nav-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text2);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.nav-icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.notification-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary-glow);
  animation: pulse-beacon 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-beacon {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

.nav-profile {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-top-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all var(--transition);
  flex-shrink: 0;
}

.nav-profile:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 14px var(--primary-glow);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Search Page Filter Panel ──────────────────────── */
.search-filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(16, 19, 28, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 18px;
  border-radius: 16px;
  margin-bottom: 24px;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.search-context-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.search-cat-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.search-cat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.search-cat-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.filter-dropdown {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text2);
  padding: 7px 14px;
  font-size: 12.5px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 110px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.filter-dropdown:hover,
.filter-dropdown:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.filter-btn-clear {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  margin-left: auto;
}

.filter-btn-clear:hover {
  text-decoration: underline;
}

/* ── Advanced Video Player UI & Overlay Styles ───────────────────── */
.player-container-theater {
  position: relative;
  width: 100%;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.player-container-theater.theater-mode {
  max-width: 100% !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  border-radius: 0 !important;
  background: radial-gradient(circle at 50% 50%, rgba(20, 26, 44, 0.85) 0%, rgba(8, 10, 16, 0.98) 100%);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}

.player-container-theater.theater-mode #anime-video-player,
.player-container-theater.theater-mode #anime-iframe-player {
  height: 60vh !important;
  border-radius: 0 !important;
}

.player-buffering-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(14, 18, 30, 0.55);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  z-index: 15;
  pointer-events: none;
}

.player-buffering-overlay .loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  filter: drop-shadow(0 0 10px var(--primary));
}

.player-buffering-overlay .buffering-text {
  margin-top: 15px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
}

.player-title-overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 24, 40, 0.68);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  padding: 8px 16px;
  border-radius: 20px;
  z-index: 12;
  font-size: 13px;
  color: #fff;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.player-title-overlay .title-series {
  font-weight: 700;
  color: var(--primary);
}

.player-title-overlay .title-divider {
  opacity: 0.5;
}

.player-title-overlay .title-episode {
  color: rgba(255, 255, 255, 0.9);
}

.player-help-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(30, 45, 80, 0.4), rgba(8, 11, 20, 0.65) 80%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 20;
  padding: 20px;
}

.player-help-overlay .help-content {
  background: linear-gradient(135deg, rgba(24, 32, 54, 0.78) 0%, rgba(14, 18, 30, 0.82) 100%);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-lg, 18px);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.player-help-overlay h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--primary);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 8px;
}

.player-help-overlay .help-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-help-overlay .help-grid div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text2);
}

.player-help-overlay kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-family: monospace;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.player-flash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 25;
  pointer-events: none;
  animation: flash-animation 0.4s ease-out forwards;
}

@keyframes flash-animation {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.player-mini-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: var(--glass-bg-2, rgba(14, 16, 25, 0.88));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-left: 1px solid var(--glass-border);
  z-index: 18;
  display: flex;
  flex-direction: column;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.06), -12px 0 35px rgba(0, 0, 0, 0.65);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.player-mini-drawer .mini-drawer-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition);
}

.player-mini-drawer .mini-drawer-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--glass-border-strong);
}

.player-mini-drawer .mini-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-mini-drawer .mini-ep-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--glass-bg-1, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm, 10px);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.player-mini-drawer .mini-ep-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border-strong);
  transform: translateX(-2px);
}

.player-mini-drawer .mini-ep-item.active {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.18) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(255, 42, 109, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 14px rgba(255, 42, 109, 0.25);
}

.player-mini-drawer .mini-ep-thumb {
  width: 60px;
  height: 35px;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
}

.player-mini-drawer .mini-ep-info {
  flex: 1;
}

.player-mini-drawer .mini-ep-num {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
}

.player-mini-drawer .mini-ep-title {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  color: var(--text);
}

.vol-boost-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.vol-boost-slider {
  width: 100px;
  height: 4px;
  accent-color: var(--primary);
}

.vol-boost-val {
  font-size: 11px;
  color: var(--primary);
  font-weight: bold;
}

/* ── Lazy Image Loading Animations ───────────────────────────────── */
img.lazy {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

img.loaded {
  opacity: 1;
}

/* ── PREMIUM ANIKOTO REDESIGN STYLES ───────────────────────────────── */

/* Aspect Ratio Player and Container sizing */
.pm-player-wrap {
  aspect-ratio: 16/9 !important;
  width: 100% !important;
  height: auto !important;
  max-height: 75vh !important;
  background: radial-gradient(circle at 50% 50%, rgba(26, 34, 56, 0.75) 0%, rgba(10, 14, 24, 0.95) 100%) !important;
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 40px -5px rgba(255, 42, 109, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 14px 0;
}

#anime-player-wrap {
  border-radius: 14px 14px 0 0 !important;
  border-bottom: none !important;
  margin-bottom: 0 !important;
}

#stream-frame,
#anime-video-player,
#anime-iframe-player,
#anime-iframe-container {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 16/9 !important;
  max-height: 75vh !important;
  border: 0 !important;
  border-radius: inherit;
  display: block;
}

#anime-video-player.player-hidden,
#anime-iframe-player.player-hidden,
.player-hidden {
  display: none !important;
}

#anime-video-player.player-visible,
#anime-iframe-player.player-visible,
.player-visible {
  display: block !important;
}

/* Under-Player Slim Action Bar */
.anime-action-bar-slim {
  background: var(--glass-bg-1, rgba(14, 16, 25, 0.72));
  backdrop-filter: blur(var(--glass-blur-md, 20px)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur-md, 20px)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0 0 var(--radius-lg, 16px) var(--radius-lg, 16px);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.anime-action-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.anime-action-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.anime-action-checkbox-label:hover {
  color: #fff;
}

.anime-action-checkbox-label input {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin: 0;
  border-radius: 4px;
}

.anime-action-middle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.anime-action-middle button {
  background: var(--glass-bg-2, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius-sm, 10px);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.anime-action-middle button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--glass-border-strong);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), var(--glass-shadow-sm);
}

.anime-action-middle button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: var(--glass-border) !important;
  transform: none !important;
  box-shadow: none !important;
}

.anime-action-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.anime-action-btn-pill {
  background: var(--glass-bg-2, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius-sm, 10px);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.anime-action-btn-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--glass-border-strong);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), var(--glass-shadow-sm);
}

/* Anikoto-style Server Selector Box */
.anime-server-selector-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .anime-server-selector-container {
    grid-template-columns: 1fr;
  }
}

.anime-server-info-card {
  background: var(--glass-bg-1, rgba(14, 16, 25, 0.7));
  backdrop-filter: blur(var(--glass-blur-md, 20px)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur-md, 20px)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 16px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow-sm);
}

.anime-server-info-text {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text2);
}

.anime-server-info-text strong {
  color: var(--text);
  font-weight: 600;
}

.anime-server-pills-card {
  background: var(--glass-bg-1, rgba(14, 16, 25, 0.7));
  backdrop-filter: blur(var(--glass-blur-md, 20px)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur-md, 20px)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 16px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow-sm);
}

.anime-server-row-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.anime-server-row-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  width: 50px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.anime-server-pills-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(190%);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  padding: 4px;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.server-pill-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text2);
  padding: 6px 16px;
  border-radius: var(--radius-full, 9999px);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
}

.server-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.server-pill-btn.active {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  border-top-color: rgba(255, 255, 255, 0.5) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

/* Visual Season Selection Poster Grid */
.anime-seasons-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  margin-top: 16px;
  margin-bottom: 24px;
}

.season-poster-card {
  background: var(--glass-bg-1, rgba(14, 16, 25, 0.65));
  backdrop-filter: blur(var(--glass-blur-sm, 12px));
  -webkit-backdrop-filter: blur(var(--glass-blur-sm, 12px));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 220px;
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow-sm);
}

.season-poster-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--glass-border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--glass-shadow-md);
}

.season-poster-card.active {
  border-color: var(--primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 16px rgba(255, 42, 109, 0.4);
}

.season-poster-img {
  width: 100%;
  height: 165px;
  background-size: cover;
  background-position: center;
  position: relative;
  transition: transform 0.3s ease;
}

.season-poster-card:hover .season-poster-img {
  transform: scale(1.04);
}

.season-poster-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(18, 24, 40, 0.72);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full, 9999px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.season-poster-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anime-settings-popover {
  width: 300px;
  max-height: 420px;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(22, 28, 48, 0.78) 0%, rgba(14, 18, 32, 0.85) 100%);
  backdrop-filter: blur(32px) saturate(210%);
  -webkit-backdrop-filter: blur(32px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  padding: 12px;
}

.settings-card {
  background: linear-gradient(135deg, rgba(22, 28, 48, 0.65) 0%, rgba(14, 18, 30, 0.55) 100%) !important;
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* ── Fallbacks & Accessibility ───────────────────────────────────── */
@supports not (backdrop-filter: blur(1px)) {
  .top-header,
  nav,
  .desktop-sidebar,
  .player-modal,
  .pm-header,
  .anime-action-bar-slim,
  .anime-server-info-card,
  .anime-server-pills-card,
  .player-mini-drawer,
  .player-help-overlay .help-content,
  .dropdown-content,
  .search-filter-panel,
  .search-history,
  .mobile-nav-drawer {
    background-color: #0f121a !important;
  }
}

@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;
  }
}

/* ── Dedicated Video Player Bottom Bar ────────────────────────────── */
.anime-player-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 19, 32, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 10px 18px;
  gap: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.anime-bottom-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.anime-auto-next-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text1, #fff);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition, 0.2s ease);
}

.anime-auto-next-label:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.anime-auto-next-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.auto-next-slider {
  position: relative;
  width: 32px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.auto-next-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.anime-auto-next-label input[type="checkbox"]:checked + .auto-next-slider {
  background: var(--primary, #00d2ff);
  box-shadow: 0 0 10px var(--primary-glow, rgba(0, 210, 255, 0.5));
}

.anime-auto-next-label input[type="checkbox"]:checked + .auto-next-slider::before {
  transform: translateX(14px);
  background: #fff;
}

.auto-next-text {
  letter-spacing: 0.2px;
}

.anime-bottom-bar-center {
  display: flex;
  align-items: center;
}

.current-ep-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary, #00d2ff);
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.25);
  padding: 4px 12px;
  border-radius: 20px;
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.3);
}

.anime-bottom-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.anime-prev-ep-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.anime-prev-ep-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.anime-prev-ep-btn:active:not(:disabled) {
  transform: translateY(0);
}

.anime-prev-ep-btn:disabled,
.anime-prev-ep-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.anime-next-ep-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25) 0%, rgba(0, 163, 255, 0.35) 100%);
  border: 1px solid rgba(0, 210, 255, 0.4);
  border-top: 1px solid rgba(0, 210, 255, 0.7);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 180, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.anime-next-ep-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.4) 0%, rgba(0, 163, 255, 0.55) 100%);
  border-color: rgba(0, 210, 255, 0.8);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.anime-next-ep-btn:active:not(:disabled) {
  transform: translateY(0);
}

.anime-next-ep-btn:disabled,
.anime-next-ep-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* ── Top Header Profile Dropdown ──────────────────────────────────── */
.nav-profile-container {
  position: relative;
  display: inline-block;
}

.nav-profile {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-profile:hover,
.nav-profile:focus-visible {
  border-color: var(--primary, #00d2ff);
  box-shadow: 0 0 14px var(--primary-glow, rgba(0, 210, 255, 0.5));
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-vip-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid #0f121a;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 270px;
  background: linear-gradient(145deg, rgba(20, 26, 44, 0.95) 0%, rgba(12, 16, 28, 0.96) 100%);
  backdrop-filter: blur(36px) saturate(220%);
  -webkit-backdrop-filter: blur(36px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 16px;
  z-index: 1000;
  animation: pdropFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pdropFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pdrop-header {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px;
  border-radius: 10px;
  transition: background 0.18s ease;
}

.pdrop-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pdrop-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary, #00d2ff);
  box-shadow: 0 0 10px var(--primary-glow, rgba(0, 210, 255, 0.35));
}

.pdrop-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.pdrop-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdrop-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.28);
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}

.pdrop-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 6px;
  margin-top: 14px;
  text-align: center;
}

.pdrop-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdrop-stat-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary, #00d2ff);
}

.pdrop-stat-label {
  font-size: 10px;
  color: var(--text3, #8e9bb0);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pdrop-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 12px 0 8px 0;
}

.pdrop-menu-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdrop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text2, #b8c4d9);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.pdrop-item svg {
  color: var(--text3, #8e9bb0);
  transition: color 0.15s ease;
}

.pdrop-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pdrop-item:hover svg {
  color: var(--primary, #00d2ff);
}

/* ── Dedicated Profile Page Layout ────────────────────────────────── */
#page-profile {
  padding-bottom: 60px;
}

.profile-hero-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(24, 30, 52, 0.85) 0%, rgba(14, 18, 30, 0.75) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  margin-bottom: 28px;
}

.profile-hero-backdrop {
  height: 120px;
  background: radial-gradient(circle at 75% 30%, rgba(0, 210, 255, 0.25) 0%, rgba(124, 58, 237, 0.15) 50%, rgba(10, 14, 24, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-hero-content {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 0 32px 28px 32px;
  position: relative;
  margin-top: -50px;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2, #b8c4d9);
  transition: all 0.2s ease;
}

.header-profile-btn:hover .profile-avatar-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.pdrop-avatar-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #00d2ff);
  flex-shrink: 0;
}

.profile-page-avatar-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #00d2ff);
  flex-shrink: 0;
}

.profile-badge-local {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--primary, #00d2ff);
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.profile-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
  letter-spacing: -0.5px;
}

.profile-handle {
  font-size: 13px;
  color: var(--primary, #00d2ff);
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-bio {
  font-size: 14px;
  color: var(--text2, #b8c4d9);
  line-height: 1.5;
  max-width: 680px;
  margin-bottom: 16px;
}

.profile-action-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-profile-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary, #00d2ff) 0%, #0284c7 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-profile-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-profile-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text1, #fff);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-profile-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ── Streaming Stats Grid ─────────────────────────────────────────── */
.profile-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 16px 0;
}

.profile-section-title h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(22, 28, 48, 0.65) 0%, rgba(14, 18, 30, 0.55) 100%);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.icon-cyan {
  background: rgba(0, 210, 255, 0.15);
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.icon-violet {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.icon-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-card-data {
  display: flex;
  flex-direction: column;
}

.stat-card-number {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.stat-card-label {
  font-size: 12px;
  color: var(--text3, #8e9bb0);
  font-weight: 500;
}

.profile-items-scroll {
  min-height: 240px;
}

/* ── Profile Edit Modal ───────────────────────────────────────────── */


/* ═══════════════════════════════════════════════════════
   SENIOR CSS DESIGNER — CINEMA STREAMING FOOTER & DISCLAIMER
   ═══════════════════════════════════════════════════════ */

/* ── Cinema Footer Container ───────────────────────── */
.cinema-footer {
  background: linear-gradient(180deg, rgba(14, 18, 32, 0.65) 0%, rgba(6, 8, 16, 0.96) 100%);
  backdrop-filter: blur(36px) saturate(210%);
  -webkit-backdrop-filter: blur(36px) saturate(210%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  position: relative;
  z-index: 10;
  margin-top: 60px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 56px 36px 36px;
}

/* ── Top Branding & Disclaimer Notice ──────────────── */
.footer-top {
  display: flex;
  gap: 48px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 380px;
  flex: 1 1 320px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-logo:hover {
  transform: scale(1.03);
}

.footer-logo svg {
  fill: var(--primary, #ff2a6d);
  filter: drop-shadow(0 0 10px var(--primary-glow, rgba(255, 42, 109, 0.6)));
}

.footer-tagline {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text2);
  margin: 14px 0 18px;
}

.footer-status-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-top: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981, 0 0 4px #34d399;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ── Prominent Disclaimer Glass Box ─────────────────── */
.footer-disclaimer-box {
  flex: 2 1 480px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  position: relative;
  overflow: hidden;
}

.footer-disclaimer-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary, #00d2ff), rgba(139, 92, 246, 0.8), transparent);
}

.disclaimer-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.disclaimer-box-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.disclaimer-box-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text2);
  margin-bottom: 16px;
}

.disclaimer-box-text strong {
  color: #fff;
}

.disclaimer-box-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-action-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.footer-action-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.footer-action-btn:active {
  transform: translateY(0);
}

/* ── Footer 4-Column Navigation ─────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  padding: 44px 0 36px;
}

.footer-heading {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-heading::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--primary, #00d2ff);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-links a {
  color: var(--text2);
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(4px);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.footer-tips-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tip-item {
  display: flex;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text2);
}

.tip-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.tip-item strong {
  color: #fff;
}

/* ── Footer Bottom Copyright ───────────────────────── */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: var(--text3);
}

.footer-bottom-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-bottom-links a {
  color: var(--text3);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: #fff;
}

/* ── Disclaimer Modal Card ─────────────────────────── */
.disclaimer-modal-card {
  width: 820px;
  max-width: 95vw;
  max-height: 88vh;
  background: linear-gradient(145deg, rgba(16, 22, 38, 0.95) 0%, rgba(8, 12, 22, 0.98) 100%);
  backdrop-filter: blur(44px) saturate(220%);
  -webkit-backdrop-filter: blur(44px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.disclaimer-header-badge {
  background: rgba(255, 42, 109, 0.18);
  border: 1px solid rgba(255, 42, 109, 0.45);
  color: var(--primary, #ff2a6d);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

/* Modal Tabs */
.disclaimer-modal-nav {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  overflow-x: auto;
}

.disclaimer-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text2);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.disclaimer-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.disclaimer-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25) 0%, rgba(0, 150, 255, 0.35) 100%);
  border-color: rgba(0, 210, 255, 0.6);
  border-top: 1px solid rgba(0, 210, 255, 0.85);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 180, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Modal Body Panes */
.disclaimer-modal-body {
  padding: 26px 28px;
  overflow-y: auto;
  flex: 1;
}

.disclaimer-callout-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  gap: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #fff;
  margin-bottom: 22px;
}

.callout-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.disclaimer-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 18px 0 8px;
  letter-spacing: -0.2px;
}

.disclaimer-section-title:first-child {
  margin-top: 0;
}

.disclaimer-p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text2);
  margin-bottom: 12px;
}

.disclaimer-p strong {
  color: #fff;
}

.guideline-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.guideline-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.guideline-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.guideline-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.guideline-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.guideline-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text2);
}

.dmca-steps-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  padding: 18px;
  margin: 16px 0;
}

.dmca-steps-box h5 {
  font-size: 14px;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 10px;
}

.dmca-steps-box ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text2);
}

.privacy-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.privacy-checklist li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
  padding-left: 22px;
  position: relative;
}

.privacy-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.privacy-checklist code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #93c5fd;
  font-size: 12px;
}

/* ── Modal Custom Scrollbars ────────────────────────── */
.disclaimer-modal-body::-webkit-scrollbar,
.disclaimer-modal-nav::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.disclaimer-modal-body::-webkit-scrollbar-track,
.disclaimer-modal-nav::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}

.disclaimer-modal-body::-webkit-scrollbar-thumb,
.disclaimer-modal-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.disclaimer-modal-body::-webkit-scrollbar-thumb:hover,
.disclaimer-modal-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* Accessibility Focus States */
.disclaimer-tab-btn:focus-visible,
.footer-action-btn:focus-visible,
.footer-links a:focus-visible {
  outline: 2px solid var(--primary, #00d2ff);
  outline-offset: 2px;
}

/* ── Responsive Polish for Cinema Footer ───────────── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .footer-container {
    padding: 40px 20px 24px;
  }
  .footer-top {
    flex-direction: column;
    gap: 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   ── COMPREHENSIVE MOBILE PLAYER OPTIMIZATION (Movies, TV Series, Anime) ──
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* ── 1. FIXED TOP HEADER & NAVIGATION OVERHAUL ── */
  .top-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 12px !important;
    background: rgba(10, 14, 26, 0.94) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .nav-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 0 !important;
  }

  .logo {
    font-size: 19px !important;
    gap: 6px !important;
  }

  .nav-links {
    display: none !important;
  }

  .nav-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  /* Search Input hidden by default on mobile, replaced with icon button */
  .search-wrap {
    display: none !important;
  }

  .mobile-search-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    padding: 0 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  /* Full-width slide-in search bar when activated on mobile */
  .search-wrap.mobile-search-open,
  .top-header.mobile-search-open .search-wrap {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 52px !important;
    z-index: 10000 !important;
    background: #0b0e18 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 0 !important;
    padding: 0 12px !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85) !important;
    align-items: center !important;
  }

  .search-wrap.mobile-search-open input,
  .top-header.mobile-search-open .search-wrap input {
    font-size: 16px !important; /* 16px prevents iOS Safari auto-zoom */
    width: 100% !important;
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    outline: none !important;
    height: 38px !important;
  }

  .search-close-mobile-btn {
    display: none;
  }

  .search-wrap.mobile-search-open .search-close-mobile-btn,
  .top-header.mobile-search-open .search-wrap .search-close-mobile-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: none !important;
    color: #fff !important;
    font-size: 14px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  .search-kbd {
    display: none !important;
  }

  .search-wrap.mobile-search-open .search-history,
  .top-header.mobile-search-open .search-wrap .search-history {
    top: 52px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    border-radius: 0 0 16px 16px !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    background: rgba(11, 14, 24, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.9) !important;
    z-index: 10001 !important;
  }

  /* Watchlist Icon Button */
  .nav-icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  /* Hide redundant notifications button on mobile to save space for profile */
  button[aria-label="Notifications"] {
    display: none !important;
  }

  /* PROMINENT PROFILE ICON & DROPDOWN */
  .nav-profile-container {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin-left: 2px !important;
  }

  .nav-profile {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    border: 2px solid var(--primary, #00d2ff) !important;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.45) !important;
    cursor: pointer !important;
  }

  .profile-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .profile-vip-indicator {
    width: 9px !important;
    height: 9px !important;
    bottom: 0 !important;
    right: 0 !important;
    border: 2px solid #080b13 !important;
    display: block !important;
  }

  .profile-dropdown {
    position: fixed !important;
    top: 56px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    z-index: 1000 !important;
  }

  /* ── 2. HERO CAROUSEL & CONTENT OVERLAP RESOLUTION ── */
  /* Remove arrow buttons entirely on mobile - users swipe left/right */
  .hero-arrow,
  .hero-arrow.prev,
  .hero-arrow.next,
  .hero-prev,
  .hero-next,
  .hero-nav,
  .row-arrow,
  .content-row-arrow {
    display: none !important;
  }

  /* Page container spacing */
  .page {
    padding-top: 52px !important;
  }

  #page-home {
    padding-top: 0 !important;
  }

  #hero,
  #anime-hero {
    margin-top: 0 !important;
    height: 72vh !important;
    min-height: 480px !important;
    max-height: 580px !important;
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .hero-content {
    margin: 0 12px 20px 12px !important;
    padding: 16px 16px !important;
    width: calc(100% - 24px) !important;
    max-width: 100% !important;
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
  }

  .hero-title {
    font-size: 21px !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
    word-break: break-word !important;
  }

  .hero-badges {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }

  .hero-overview {
    font-size: 12px !important;
    line-height: 1.5 !important;
    max-height: 4.5em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 12px !important;
    color: rgba(255, 255, 255, 0.8) !important;
  }

  .hero-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .hero-btn {
    padding: 8px 14px !important;
    font-size: 12px !important;
    flex: 1 1 auto !important;
    justify-content: center !important;
  }

  /* ── 3. FULL-SCREEN MOBILE VIDEO PLAYER MODAL (NO HALF CUT-THROUGH) ── */
  #player-modal-bg {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #player-modal-bg.open {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
    background: #080b13 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .player-modal {
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    min-width: 100vw !important;
    min-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #080b13 !important;
    box-shadow: none !important;
  }

  .pm-header {
    position: sticky !important;
    top: 0 !important;
    height: 50px !important;
    min-height: 50px !important;
    padding: max(8px, env(safe-area-inset-top, 8px)) 12px 8px !important;
    background: rgba(12, 16, 28, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 100 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .pm-close {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
  }

  .pm-header-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100vw - 180px) !important;
  }

  .pm-wl-btn {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .pm-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0 0 max(40px, env(safe-area-inset-bottom, 40px)) 0 !important;
    background: #080b13 !important;
    overscroll-behavior-y: contain !important;
  }

  /* Ensure cinematic hero and detail banners remain visible and immersive on mobile */
  .pm-hero {
    display: block !important;
    height: 220px !important;
  }

  /* Mobile Info Header Bar right under the player */
  .pm-mobile-bar {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 10px 14px 4px !important;
  }

  .pm-mobile-bar .badge {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 5px !important;
  }

  /* Video Player Container: 16:9 ratio, edge-to-edge full width */
  .pm-player-wrap {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    height: auto !important;
    max-height: 50vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7) !important;
  }

  #stream-frame {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16/9 !important;
    max-height: 50vh !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: block !important;
    object-fit: contain !important;
    background: #000 !important;
  }

  #anime-video-player,
  #anime-iframe-player,
  #anime-iframe-container {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16/9 !important;
    max-height: 50vh !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: contain !important;
    background: #000 !important;
  }

  #anime-video-player.player-hidden,
  #anime-iframe-player.player-hidden {
    display: none !important;
  }

  #anime-video-player.player-visible,
  #anime-iframe-player.player-visible {
    display: block !important;
  }

  .pm-content {
    padding: 4px 14px 30px !important;
  }

  .pm-tabs {
    margin: 8px 0 10px !important;
    gap: 6px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-bottom: 6px !important;
  }

  .pm-tab {
    padding: 7px 14px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }

  /* TV Season & Episode Selectors */
  .pm-tv-ctrl {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 10px 0 !important;
  }

  .pm-tv-ctrl select.ep-sel {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
    height: 40px !important;
    border-radius: 8px !important;
  }

  #pm-next-ep-btn {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    height: 40px !important;
    justify-content: center !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }

  /* Streaming Provider Selector */
  .pm-provider-ctrl {
    margin: 10px 0 12px !important;
  }

  .pm-provider-select {
    width: 100% !important;
    padding: 10px 34px 10px 12px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
  }

  .pm-provider-desc {
    font-size: 10.5px !important;
  }

  .pm-srv-grid,
  .pm-dl-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .srv-btn,
  .dl-btn {
    padding: 9px 10px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
  }

  /* Text & Synopsis */
  .pm-overview {
    font-size: 12.5px !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.78) !important;
    margin: 12px 0 !important;
  }

  .pm-genres {
    font-size: 11.5px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-bottom: 14px !important;
  }

  /* Cast & Recommendations */
  .pm-section-title {
    font-size: 13px !important;
    margin: 14px 0 8px !important;
  }

  .cast-scroll,
  .rec-scroll {
    gap: 10px !important;
    padding-bottom: 6px !important;
  }

  .cast-card {
    width: 58px !important;
  }

  .cast-photo {
    width: 58px !important;
    height: 58px !important;
  }

  .cast-name {
    font-size: 9.5px !important;
  }

  .rec-card {
    width: 90px !important;
  }

  .rec-poster {
    width: 90px !important;
    height: 132px !important;
  }

  .rec-title {
    font-size: 11px !important;
  }

  /* ── 4. ANIME PLAYER & CONTROLS ON MOBILE ── */
  #anime-player-container {
    width: 100% !important;
    margin: 0 !important;
  }

  #anime-player-wrap {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    height: auto !important;
    max-height: 50vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .anime-player-bottom-bar {
    padding: 8px 10px !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    border-radius: 0 0 8px 8px !important;
  }

  .anime-bottom-bar-left {
    gap: 8px !important;
  }

  .anime-auto-next-label {
    padding: 5px 8px !important;
    font-size: 11px !important;
    gap: 6px !important;
    border-radius: 6px !important;
  }

  .auto-next-slider {
    width: 28px !important;
    height: 16px !important;
  }

  .auto-next-slider::before {
    width: 12px !important;
    height: 12px !important;
  }

  .anime-auto-next-label input[type="checkbox"]:checked + .auto-next-slider::before {
    transform: translateX(12px) !important;
  }

  .current-ep-badge {
    font-size: 11px !important;
    padding: 3px 8px !important;
  }

  .anime-bottom-bar-right {
    gap: 6px !important;
  }

  .anime-prev-ep-btn,
  .anime-next-ep-btn {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
    gap: 4px !important;
    border-radius: 6px !important;
  }

  .anime-player-controls {
    padding: 10px 12px !important;
    border-radius: 10px !important;
    margin: 10px 0 !important;
    gap: 8px !important;
  }

  .anime-ctrl-row {
    gap: 6px !important;
  }

  .anime-ctrl-label {
    font-size: 10.5px !important;
    gap: 4px !important;
  }

  .anime-ctrl-options {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    border-radius: 8px !important;
    padding: 3px 5px !important;
    gap: 4px !important;
  }

  .anime-ctrl-options::-webkit-scrollbar {
    display: none !important;
  }

  .anime-ctrl-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 6px 11px !important;
    font-size: 11px !important;
    min-height: 30px !important;
    border-radius: 6px !important;
  }

  .anime-season-tabs {
    padding: 4px 0 8px !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
    flex-wrap: wrap !important;
  }

  .anime-season-tab {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    border-radius: 16px !important;
  }

  .anime-jump-input {
    width: 80px !important;
    padding: 5px 8px !important;
    font-size: 11px !important;
    margin-left: auto !important;
  }

  .anime-ep-grid-rich {
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)) !important;
    gap: 6px !important;
    margin-top: 8px !important;
    margin-bottom: 16px !important;
  }

  .anime-ep-btn {
    width: 100% !important;
    height: 42px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
  }

  #skip-intro-btn,
  #skip-outro-btn {
    bottom: 45px !important;
    font-size: 11px !important;
    padding: 5px 10px !important;
  }

  /* ── 5. CAROUSEL & CONTENT HORIZONTAL TOUCH SCROLL ── */
  .row-scroll,
  .row-cards,
  .content-row-cards,
  .history-row,
  .recently-viewed-row {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 8px !important;
    touch-action: pan-x pan-y !important;
  }

  .row-scroll::-webkit-scrollbar,
  .row-cards::-webkit-scrollbar,
  .content-row-cards::-webkit-scrollbar,
  .history-row::-webkit-scrollbar,
  .recently-viewed-row::-webkit-scrollbar {
    display: none !important;
  }

  .card,
  .content-card {
    flex-shrink: 0 !important;
  }

  /* GPU performance optimization: disable expensive blur passes on thousands of card micro-elements during mobile scrolling */
  .card-badge,
  .card-wl,
  .card-play-btn,
  .card-overlay,
  .card-meta,
  .card-rating,
  .card-no-img {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .row-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 280px;
  }
}

/* Extra Compact Phones (< 400px) */
@media (max-width: 400px) {
  .top-header {
    padding: 0 8px !important;
  }

  .logo-text {
    font-size: 17px !important;
  }

  .anime-player-bottom-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .anime-bottom-bar-center {
    grid-column: 1 / -1 !important;
    justify-content: center !important;
  }

  .anime-bottom-bar-left {
    justify-content: flex-start !important;
  }

  .anime-bottom-bar-right {
    justify-content: flex-end !important;
  }

  .anime-ep-grid-rich {
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)) !important;
  }

  .anime-ep-btn {
    height: 38px !important;
    font-size: 11px !important;
  }
}

/* Landscape Mode for Mobile Phones (Max-height: 520px) */
@media (max-height: 520px) and (orientation: landscape) {
  .pm-hero {
    display: none !important;
  }

  .pm-header {
    height: 42px !important;
    min-height: 42px !important;
    padding-top: max(4px, env(safe-area-inset-top, 4px)) !important;
    padding-bottom: 4px !important;
  }

  .pm-content {
    padding: 4px 10px 16px !important;
  }

  .pm-player-wrap {
    max-height: 80vh !important;
    margin: 0 !important;
  }
}

/* ══════════════════════════════════════════════════════
   MOBILE CRITICAL FIX v8.0
   Fix 1: background-attachment:fixed is broken on iOS/mobile Safari
           and causes blank white / invisible page rendering.
   Fix 2: body::before with filter:blur on position:fixed thrashes
           the GPU and causes jank + potential blank rendering.
   Fix 3: Scroll performance optimizations.
   ══════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* FIX 1 — Remove broken background-attachment:fixed on mobile.
     Use background-size:cover with scroll attachment instead.
     This is the primary cause of the blank page on normal mobile mode. */
  body {
    background-attachment: scroll !important;
    background-size: auto !important;
  }

  /* FIX 2 — Disable the body::before fixed+blur pseudo-element on mobile.
     position:fixed + filter:blur() creates a new stacking context that
     breaks rendering in many mobile browsers, causing blank pages. */
  body::before {
    display: none !important;
  }

  /* FIX 3 — Scroll performance: enable native momentum scrolling
     and GPU-composited layer for the main scroll container. */
  html, body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
  }

  /* FIX 4 — Row horizontal scroll containers: enable passive touch-scroll
     so vertical page scroll is not blocked by horizontal swipe detection. */
  .row-scroll {
    touch-action: pan-x pinch-zoom;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
  }

  /* FIX 5 — Disable expensive backdrop-filter on cards during scroll.
     These cause per-frame repaints and are the main source of scroll jank.
     The card still looks great with the opaque background fallback. */
  .card-info,
  .card-badge,
  .card-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* FIX 6 — Reduce nav backdrop-filter cost on mobile (keep it but cheaper) */
  nav {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }
}

/* ══════════════════════════════════════════════════════
   MOBILE CRITICAL FIX v9.0
   Fix 7: Mobile player modal landscape/fullscreen survival.

   ROOT CAUSE: When a mobile browser enters/exits native fullscreen
   (e.g. iOS webkitEnterFullscreen, Android Chrome fullscreen),
   the backdrop-filter on #player-modal-bg causes a GPU rendering
   glitch where the browser briefly shows the page behind the modal
   (i.e. the home page) while the GPU repaints the blurred overlay.
   Audio continues because the <video> element is still active.

   Fix: On mobile, disable backdrop-filter on the player modal
   background and use a fully-opaque background instead.
   The player modal content (.player-modal) retains its own glass style.

   Fix 8: Ensure #player-modal-bg.open always has a high z-index on mobile
   regardless of device orientation (portrait or landscape).
   When a phone rotates to landscape, width may exceed 767px and the mobile
   z-index:99999 override from the previous block stops applying.
   Ensure the open modal always stays on top.
   ══════════════════════════════════════════════════════ */

/* Global: ensure the open player modal is ALWAYS visible and on top */
#player-modal-bg.open {
  display: flex !important;
  z-index: 99999 !important;
}

@media (max-width: 900px) {
  /* FIX 7 — Remove backdrop-filter from the modal BACKGROUND on mobile.
     The background itself should be opaque to prevent see-through glitches
     during fullscreen exit. The .player-modal inner dialog keeps its glass. */
  #player-modal-bg {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* Replace transparent radial-gradient background with solid opaque color
       so there is zero chance of the home page bleeding through */
    background: #080b13 !important;
  }

  /* FIX 8 — When the modal is open on any narrow/medium screen (portrait or
     landscape), force it to cover the full screen completely with solid bg */
  #player-modal-bg.open {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    z-index: 99999 !important;
    background: #080b13 !important;
  }
}

/* ══════════════════════════════════════════════════════
   MOBILE LANDSCAPE FULLSCREEN FIX (Fix 4 & Fix 9)
   When device rotates to landscape (height <= 600px):
   - Disable expensive body::before blur to prevent GPU thrashing
   - Ensure player modal fills 100% of viewport seamlessly
   - Zero padding/margins, solid background so home page never bleeds through
   ══════════════════════════════════════════════════════ */
@media (orientation: landscape) and (max-height: 600px) {
  body::before {
    display: none !important;
  }

  #player-modal-bg {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #080b13 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #player-modal-bg.open {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #080b13 !important;
    z-index: 99999 !important;
  }

  #player-modal-bg.open .player-modal {
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 100vw !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
  }
}

/* ══════════════════════════════════════════════════════
   STREAMX CINEMATIC DETAIL PAGE (Movies, Series & Dramas)
   ══════════════════════════════════════════════════════ */

#player-modal-bg.has-cinematic-detail,
#player-modal-bg:has(.cinematic-detail-modal) {
  padding: 0 !important;
  background: #080b13 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: block !important;
}

.player-modal.cinematic-detail-modal {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh !important;
  height: auto !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: #080b13 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Large Cinematic Trailer Hero (70-85% viewport height on desktop) */
.pm-cinematic-hero {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 520px;
  max-height: 82vh;
  overflow: hidden;
  background-size: cover;
  background-position: center 25%;
  background-color: #0c101a;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.pm-hero-video-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.pm-hero-video-layer.is-playing {
  opacity: 1;
}

.pm-hero-video-layer .hero-trailer-iframe-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.35);
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78vh;
  pointer-events: none;
}

.pm-hero-video-layer iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

/* Cinematic Vignette Gradients */
.pm-hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 11, 19, 0.96) 0%, rgba(8, 11, 19, 0.72) 40%, rgba(8, 11, 19, 0.22) 75%, transparent 100%),
    linear-gradient(0deg, #080b13 0%, rgba(8, 11, 19, 0.92) 25%, rgba(8, 11, 19, 0.35) 60%, transparent 100%),
    linear-gradient(180deg, rgba(8, 11, 19, 0.75) 0%, transparent 35%);
}

/* Top Controls Bar */
.pm-hero-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 11, 19, 0.85) 0%, rgba(8, 11, 19, 0.35) 60%, transparent 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.pm-hero-top-bar > * {
  pointer-events: auto;
}

.pm-hero-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: rgba(16, 22, 38, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pm-hero-back-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(-2px);
}

.pm-cinematic-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: rgba(16, 22, 38, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pm-cinematic-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.pm-hero-sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: rgba(16, 22, 38, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pm-hero-sound-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.pm-hero-sound-btn.is-unmuted {
  background: rgba(46, 213, 115, 0.2);
  border-color: rgba(46, 213, 115, 0.45);
  color: #2ed573;
}

/* Overlaid Title & Content Info */
.pm-hero-content {
  position: relative;
  z-index: 4;
  padding: 0 40px 40px 40px;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}

.pm-hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-hero-genres {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 4px;
  font-weight: 500;
}

.pm-hero-title {
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #ffffff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.85);
  margin: 0;
}

.pm-hero-tagline {
  font-size: 14.5px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.pm-hero-overview {
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 720px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.pm-hero-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pm-hero-rating .star-icon {
  width: 14px;
  height: 14px;
}

.pm-hero-rating .pm-rating-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold, #ffb800);
}

.pm-hero-rating .pm-votes {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}

.pm-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.pm-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff2a6d 0%, #7928ca 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.38);
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(255, 42, 109, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pm-play-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(255, 42, 109, 0.55), 0 0 20px rgba(121, 40, 202, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, #ff4d82 0%, #8b5cf6 100%);
}

/* Dedicated Anime & Donghua Modal Play Button */
.anime-detail-modal .pm-play-btn,
.pm-play-btn.anime-play-btn {
  background: linear-gradient(135deg, #00f2fe 0%, #3b82f6 100%) !important;
  color: #04121a !important;
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
  box-shadow: 0 6px 22px rgba(0, 242, 254, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.anime-detail-modal .pm-play-btn:hover,
.pm-play-btn.anime-play-btn:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #00f2fe 100%) !important;
  color: #04121a !important;
  box-shadow: 0 12px 32px rgba(0, 242, 254, 0.55), 0 0 20px rgba(56, 189, 248, 0.45) !important;
}

.pm-wl-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pm-wl-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.pm-wl-action-btn.added {
  background: rgba(46, 213, 115, 0.2);
  border-color: rgba(46, 213, 115, 0.4);
  color: #2ed573;
}

/* Content Body Below Hero */
.pm-cinematic-body {
  padding: 36px 40px 64px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* Playback Stream Section */
#pm-player-section {
  background: rgba(14, 18, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.pm-player-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.pm-current-playing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pm-player-nav-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pm-nav-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Season Selector */
.pm-season-selector-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pm-season-label {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.pm-season-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-season-pill {
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pm-season-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.pm-season-pill.active {
  background: #fff;
  color: #080b13;
  border-color: #fff;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.22);
}

/* Episode Cards Grid */
.pm-episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.pm-ep-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.pm-ep-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.pm-ep-card.active {
  border-color: #ff2a6d;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  box-shadow: 0 0 20px rgba(255, 42, 109, 0.3);
}

.pm-ep-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: #121826;
}

.pm-ep-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fff;
}

.pm-ep-card:hover .pm-ep-thumb-overlay {
  opacity: 1;
}

.pm-ep-num-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: rgba(8, 11, 19, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.pm-ep-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.pm-ep-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pm-ep-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.pm-ep-playing-tag {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  background: linear-gradient(135deg, #ff2a6d 0%, #7928ca 100%);
  color: #fff;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 42, 109, 0.35);
}

.pm-ep-meta {
  font-size: 12px;
  color: var(--gold, #ffb800);
  font-weight: 600;
}

.pm-ep-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Movie Information Card */
.pm-movie-info-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
}

.pm-overview-full {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
}

.pm-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.pm-meta-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3, rgba(255, 255, 255, 0.45));
  margin-bottom: 4px;
}

.pm-meta-val {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}

/* Mobile Responsiveness for Cinematic Detail Page */
@media (max-width: 768px) {
  .pm-cinematic-hero {
    height: 58vh !important;
    min-height: 390px !important;
    max-height: 520px !important;
    display: flex !important;
  }

  .pm-hero-top-bar {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 12px 16px !important;
  }

  .pm-hero-back-btn,
  .pm-hero-sound-btn {
    padding: 7px 13px !important;
    font-size: 12px !important;
  }

  .pm-hero-content {
    padding: 0 16px 24px 16px !important;
    max-width: 100% !important;
    gap: 10px !important;
  }

  .pm-hero-title {
    font-size: 24px !important;
    line-height: 1.15 !important;
  }

  .pm-hero-tagline {
    font-size: 13px !important;
  }

  .pm-hero-overview {
    font-size: 13px !important;
    -webkit-line-clamp: 2 !important;
  }

  .pm-hero-actions {
    gap: 10px !important;
    margin-top: 4px !important;
  }

  .pm-play-btn {
    padding: 10px 20px !important;
    font-size: 13.5px !important;
  }

  .pm-wl-action-btn {
    padding: 10px 16px !important;
    font-size: 13px !important;
  }

  .pm-cinematic-body {
    padding: 20px 16px 40px !important;
    gap: 24px !important;
  }

  .pm-episodes-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  #pm-player-section {
    padding: 14px !important;
  }

  .pm-episodes-header-row,
  .anime-episodes-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .pm-episodes-controls,
  .anime-episodes-controls {
    width: 100% !important;
    justify-content: space-between !important;
  }
  .pm-ep-search-box {
    flex: 1 !important;
  }
  .pm-ep-search-input {
    width: 100% !important;
  }
}

/* ── 9CineJoy Brand Identity & Episode Search/Sort Enhancements ── */
.brand-logo-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.brand-num {
  background: linear-gradient(135deg, #00f2fe 0%, #ff2a6d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  margin-right: 1px;
  display: inline-block;
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.45));
}

.brand-accent {
  background: linear-gradient(135deg, #ff2a6d 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pm-episodes-header-row,
.anime-episodes-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.pm-episodes-controls,
.anime-episodes-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pm-ep-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.pm-ep-search-icon {
  position: absolute;
  left: 12px;
  color: var(--text3);
  pointer-events: none;
}

.pm-ep-search-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  padding: 8px 30px 8px 34px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 180px;
  transition: all 0.2s ease;
}

.pm-ep-search-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: #ff2a6d;
  box-shadow: 0 0 0 2px rgba(255, 42, 109, 0.25);
  width: 220px;
}

.pm-ep-search-clear {
  position: absolute;
  right: 8px;
  background: transparent;
  border: 0;
  color: var(--text3);
  cursor: pointer;
  padding: 4px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pm-ep-search-clear:hover {
  color: #fff;
}

.pm-ep-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text2);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pm-ep-sort-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.pm-ep-sort-btn.desc .pm-sort-icon {
  transform: rotate(180deg);
}

.pm-episodes-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text3);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin: 12px 0;
  font-size: 14px;
}

/* Strict trailer layer non-interaction to eliminate third-party playback controls */
.hero-video-layer,
.anime-hero-video-layer,
.pm-hero-video-layer,
.hero-trailer-iframe-wrap,
.hero-trailer-iframe-wrap iframe,
.hero-trailer-iframe-wrap div,
.pm-hero-video-layer iframe {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  touch-action: none !important;
}