/* ============================================================================
   SKMovies — Premium Production-Grade UI v6.2.1
   Full overhaul: glassmorphism, full-bleed hero backdrop, minimalist download buttons,
   grid-based screenshot viewer, full responsiveness.
   ============================================================================ */

/* ─── Design Tokens ──────────────────────────────────────────────────── */
:root {
  --font-primary: 'Exo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-secondary: 'Noto Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Brand Colors */
  --red: #ff1e42;
  --red-dark: #d90429;
  --red-glow: 0 0 25px rgba(255, 30, 66, 0.45);

  /* Neutrals */
  --black: #0a0909;
  --white: #ffffff;
  --grey: #535353;

  /* Light Mode */
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;

  /* Dark Mode — Ultra Sleek Midnight Dark */
  --bg-dark: #0b0e14;
  --card-bg-dark: #131722;
  --card-border-dark: rgba(255, 255, 255, 0.08);
  --text-dark: #f8fafc;
  --text-muted-dark: #94a3b8;

  /* Accents & States */
  --gold: #fbbf24;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 14px 35px rgba(255, 30, 66, 0.18);
  --shadow-card-dark-hover: 0 14px 40px rgba(255, 30, 66, 0.22), 0 0 20px rgba(0, 0, 0, 0.6);
  --shadow-modal: 0 25px 60px rgba(0, 0, 0, 0.6);


  /* Borders & Radius */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  /* Easings */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --maxw: 1160px;

  /* Image placeholders */
  --img-blur: 20px;
}

/* ─── Reset ──────────────────────────────────────────────────────────── */
*, ::after, ::before { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[hidden] { display: none !important; }

/* [PERF] Removed `transition` on body — was triggering a 300ms repaint on
   every dark-mode toggle AND on every scroll (because the body's `position`
   and `overflow` inline styles change when scrollLock.lock() runs). */
body {
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--bg);
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKklEQVQYV2N89+7dfwYoeP36NQMjTADEERUVhQjAOCCFjDdv3vwPkoEBAL8XF+r4Wri+AAAAAElFTkSuQmCC);
  background-repeat: repeat;
  color: var(--text);
  font-family: var(--font-secondary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-ui,
.dark-ui body,
body.dark-ui {
  background-color: #0b0e14 !important;
  color: var(--text-dark);
}
.dark-ui h1, .dark-ui h2, .dark-ui h3, .dark-ui h4, .dark-ui h5, .dark-ui h6 { color: var(--text-dark); }
.dark-ui p { color: var(--text-muted-dark); }

/* ─── Micro-Interactions ──────────────────────────────────────────────── */
button, .pill, .hero-btn, .dl-btn, .single-post, .nav-menu a, .header-logo, .cat-chip {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}
button:active, .pill:active, .hero-btn:active, .dl-btn:active, .cat-chip:active {
  transform: scale(0.95) !important;
}
.hero-btn:hover, .dl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 30, 66, 0.35);
}


img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
::selection { background: var(--red); color: #fff; }

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ─── Scrollbars ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }
.dark-ui ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ─── Containers ──────────────────────────────────────────────────────── */
.container { width: 100%; padding: 0 20px; margin: 0 auto; max-width: var(--maxw); }
.container-fluid { width: 100%; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--red); color: #fff; padding: 8px 16px; z-index: 100; font-weight: bold; }
.skip-link:focus { left: 0; }

/* ─── Typography Scale ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-primary); line-height: 1.25; }
h1 { font-size: clamp(22px, 4.5vw, 32px); }
h2 { font-size: clamp(18px, 3.5vw, 24px); }
h3 { font-size: clamp(15px, 2.5vw, 18px); }
p { font-size: 14px; line-height: 1.6; }

/* ─── Premium Header ──────────────────────────────────────────────────── */
.site-header {
  position: relative;
  background: radial-gradient(circle at top right, rgba(251, 17, 20, 0.08), transparent 45%), var(--card-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
  z-index: 80;
}
.dark-ui .site-header {
  background: radial-gradient(circle at top right, rgba(251, 17, 20, 0.06), transparent 40%), var(--bg-dark);
  border-bottom-color: var(--card-border-dark);
}
.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  pointer-events: none;
}

/* Menu toggle button */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.03);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  margin-right: 8px;
}
.menu-toggle:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.dark-ui .menu-toggle {
  background: rgba(255,255,255,0.04);
  color: var(--text-dark);
  border-color: var(--card-border-dark);
}
.menu-toggle:hover {
  background: rgba(251,17,20,0.05);
  color: var(--red);
}

/* Brand bar */
.header-brand {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  text-decoration: none;
  display: inline-block;
  user-select: none;
}
.logo-text {
  font-family: var(--font-primary);
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.dark-ui .logo-text {
  color: #ffffff;
}
.logo-accent {
  color: var(--red);
  font-weight: 900;
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Toggle Wrapper & Mode Switcher */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.toggle-icon { font-size: 14px; opacity: 0.8; }
.toggleWrapper { display: inline-block; height: 18px; position: relative; }
.toggleWrapper input { position: absolute; left: -99em; }
.toggle { cursor: pointer; display: inline-block; position: relative; width: 36px; height: 18px; background-color: #cbd5e1; border-radius: 50px; transition: background-color 200ms ease; }
.dark-ui .toggle { background-color: var(--red); }
.toggle__handler { display: inline-block; position: relative; z-index: 1; top: -6px; left: -10px; width: 18px; height: 18px; background-color: #ffcf96; border-radius: 50px; box-shadow: 0 1px 4px rgba(0,0,0,0.2); transition: all 300ms cubic-bezier(.68,-.55,.265,1.55); transform: rotate(-45deg); }
.dark-ui .toggle__handler { transform: rotate(45deg) translate(7px, -7px); background-color: #fff; }
.crater { position: absolute; background: rgba(0,0,0,0.08); border-radius: 50%; }
.crater--1 { width: 4px; height: 4px; top: 3px; left: 3px; }
.crater--2 { width: 3px; height: 3px; top: 8px; left: 1px; }
.crater--3 { width: 2px; height: 2px; top: 5px; left: 10px; }
.dark-ui .crater { background: rgba(0,0,0,0.15); }
.star { position: absolute; background: #ffcf96; border-radius: 50%; transition: opacity 0.3s; }
.star--1 { width: 2px; height: 2px; top: -2px; left: 6px; }
.star--2 { width: 1.5px; height: 1.5px; top: 4px; left: 16px; }
.star--3 { width: 2px; height: 2px; top: 12px; left: 14px; }
.dark-ui .star { background: #fff; opacity: 0; }

/* 18+ filter — Premium pill */
.filterWrapper { position: relative; cursor: pointer; user-select: none; }
.filterWrapper input { position: absolute; inset: 0; height: 100%; width: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.filterWrapper .filterButton {
  background: rgba(239,68,68,0.08);
  border: 1.5px solid rgba(239,68,68,0.3);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  color: #ef4444;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
}
.filterWrapper:hover .filterButton {
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.5);
  transform: translateY(-1px);
}
.filterWrapper input:checked + .filterButton {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.45);
  color: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,0.2), 0 2px 6px rgba(34,197,94,0.1);
}

/* Notice marquee strip */


/* Sticky search bar + nav bar */
/* [PERF] Removed backdrop-filter from sticky nav-bar — it is always visible
   during scroll and was the #1 cause of jank on mid-range phones. The
   slightly more opaque solid background keeps the same premium look. */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.dark-ui .nav-bar {
  background: rgba(13, 15, 20, 0.94);
  border-bottom-color: var(--card-border-dark);
}
.nav-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
}

/* Search form */
.search-form {
  flex: 1;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  transition: all 0.2s var(--ease);
}
.dark-ui .search-form {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}
.search-form:focus-within {
  background: #fff;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(251,17,20,0.1);
}
.dark-ui .search-form:focus-within {
  background: #181d29;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(251,17,20,0.15);
}
.search-form .ab { color: var(--text-muted); opacity: 0.6; }
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
}
.dark-ui .search-input { color: #fff; }
.search-clear {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.search-clear:hover { background: rgba(0,0,0,0.05); }

/* Nav menu */
.nav-menu { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-menu::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 6px 14px;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-pill);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  font-family: var(--font-primary);
}
.dark-ui .nav-link { color: rgba(255, 255, 255, 0.8); }
.nav-link:hover { color: var(--red); background: rgba(251,17,20,0.05); }
.dark-ui .nav-link:hover { color: var(--red); background: rgba(255,255,255,0.05); }
.nav-link.is-active {
  background: var(--red);
  color: #fff;
}

/* ─── Section head & titles ───────────────────────────────────────────── */
.section-title { margin: 18px 0 12px; }
.section-title span {
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--red);
  border: 2px solid var(--black);
  border-radius: 10px;
  padding: 5px 12px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

/* ─── Featured Slider ─────────────────────────────────────────────────── */
.featured-section { margin-bottom: 24px; }
.featured-slider { position: relative; }
/* [PERF] Replaced backdrop-filter with solid translucent bg for prev/next —
   these are only visible while the slider is in view, but removing blur
   saves a paint cycle on every scroll past the featured section. */
.featured-slider .prev, .featured-slider .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--border);
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.dark-ui .featured-slider .prev, .dark-ui .featured-slider .next {
  background: rgba(22, 27, 38, 0.85);
  border-color: var(--card-border-dark);
  color: #fff;
}
.featured-slider .prev { left: -18px; }
.featured-slider .next { right: -18px; }
.featured-slider .prev:hover, .featured-slider .next:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}
.slider { display: flex; overflow-x: auto; scrollbar-width: none; gap: 14px; padding: 4px 0 8px; scroll-snap-type: x mandatory; }
.slider::-webkit-scrollbar { display: none; }
.slider-post { flex-shrink: 0; width: 85%; max-width: 360px; scroll-snap-align: start; }
.featured-post {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s var(--ease), box-shadow 0.28s;
  background: #000;
}
.featured-post:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.dark-ui .featured-post:hover { box-shadow: var(--shadow-card-dark-hover); }
.featured-post img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: transform 0.4s var(--ease); }
.featured-post:hover img { transform: scale(1.03); }
.featured-post .title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  padding: 24px 16px 12px;
}
.featured-post .title h3 {
  color: #fff;
  font-size: 13.5px;
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.3;
}

/* ─── Movie Grid & Cards ──────────────────────────────────────────────── */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 12px 0 24px;
  content-visibility: auto;
  contain-intrinsic-size: 0 800px;
}
@media (min-width: 540px) { .movies-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .movies-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1024px) { .movies-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.single-post {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s;
  cursor: pointer;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 200px 300px;
}
.dark-ui .single-post {
  background: var(--card-bg-dark);
  border-color: var(--card-border-dark);
}
.single-post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(255, 30, 66, 0.4);
}
.dark-ui .single-post:hover {
  box-shadow: var(--shadow-card-dark-hover);
  border-color: rgba(255, 30, 66, 0.5);
}
.dark-ui .single-post:hover .post-desc {
  border-bottom-color: var(--red);
}

.dark-ui .thumb {
  background: #1a202c;
  box-shadow: 0 5px 10px rgba(0,0,0,0.4);
}
.single-post:hover .thumb img { transform: scale(1.04); }
.thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,15,20,0.6) 0%, transparent 60%);
  pointer-events: none;
}
.thumb .badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
}
.badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 800;
  border-radius: 4px;
  background: rgba(13,15,20,0.75);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-primary);
  text-transform: uppercase;
  backface-visibility: hidden;
}

/* Card details */
.post-desc {
  padding: 12px;
  border-radius: 0 0 15px 15px;
  border-bottom: 3px solid #585858;
  background: #fff;
  box-shadow: 0 5px 10px rgba(0,0,0,0.06);
  transition: background 0.3s;
}
.dark-ui .post-desc {
  background: var(--card-bg-dark);
  border-bottom-color: rgba(255,255,255,0.1);
  box-shadow: 0 5px 10px rgba(0,0,0,0.4);
}
.post-title {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.dark-ui .post-title { color: #f1f5f9; }
.single-post:hover .post-title { color: var(--red); }
.post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.dark-ui .post-meta { border-top-color: var(--card-border-dark); color: var(--text-muted-dark); }
.post-meta-item { display: inline-flex; align-items: center; gap: 3px; }
.post-meta .dot { opacity: 0.4; }

/* ─── Filters & Pills ─────────────────────────────────────────────────── */
.filters { margin: 6px 0 16px; }
.filters__scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters__scroll::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0;
  padding: 5px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
  font-family: var(--font-primary);
}
.dark-ui .pill { background: var(--card-bg-dark); border-color: var(--card-border-dark); color: var(--text-muted-dark); }
.pill:hover { color: var(--red); border-color: var(--red); background: rgba(251,17,20,0.03); }
.pill:active { transform: scale(0.95); }

/* ─── Skeletons ───────────────────────────────────────────────────────── */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 12px 0;
}
@media (min-width: 540px) { .skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .skeleton-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1024px) { .skeleton-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.skeleton {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  contain: layout style paint;
}
.dark-ui .skeleton { background: var(--card-bg-dark); border-color: var(--card-border-dark); }
.skeleton__poster {
  aspect-ratio: 2/3;
  background: linear-gradient(90deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.dark-ui .skeleton__poster { background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%); background-size: 200% 100%; }
.skeleton__line {
  height: 10px; margin: 10px 12px 0; border-radius: 4px;
  background: linear-gradient(90deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.dark-ui .skeleton__line { background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%); background-size: 200% 100%; }
.skeleton__line:last-child { width: 50%; margin-bottom: 12px; }
.skeleton-modal {
  min-height: 80vh;
  background: linear-gradient(90deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
.dark-ui .skeleton-modal { background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%); background-size: 200% 100%; }

/* ─── Loading more button ────────────────────────────────────────────── */
.view-more { text-align: center; margin: 24px 0 10px; }
#loadMoreBtn {
  padding: 10px 24px;
  border: 1.5px solid var(--red);
  background: transparent;
  color: var(--red);
  border-radius: var(--radius-pill);
  font-family: var(--font-primary);
  font-weight: 700;
  transition: all 0.2s var(--ease);
}
#loadMoreBtn:hover {
  background: var(--red);
  color: #fff;
  transform: translateY(-1px);
}
#loadMoreBtn:active { transform: scale(0.96); }

/* ─── Modern Neon Loading Spinner ───────────────────────────────────── */
.skm-spinner-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
  width: 100%;
}
.skm-loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  position: relative;
  animation: skmRotate 0.9s linear infinite;
}
.skm-loader::before,
.skm-loader::after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  inset: 0px;
  border-radius: 50%;
  border: 3.5px solid transparent;
}
.skm-loader::before {
  border-top-color: var(--red);
  border-right-color: var(--red);
  filter: drop-shadow(0 0 8px rgba(255, 30, 66, 0.8));
}
.skm-loader::after {
  border-bottom-color: #00f2fe;
  border-left-color: #00f2fe;
  animation: skmRotateOpposite 1.4s linear infinite;
  filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.6));
}
@keyframes skmRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes skmRotateOpposite {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skm-loading-text {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  animation: skmPulse 1.5s ease-in-out infinite;
}
@keyframes skmPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ─── Full-Screen Modal & Missing Keyframes Fix ────────────────────── */
.modal[hidden] {
  display: none !important;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUpFull { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideUpSheet { from { transform: translateY(80px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }


.modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100 !important;
  display: flex;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  padding-top: env(safe-area-inset-top) !important;
  padding-bottom: env(safe-area-inset-bottom) !important;
  padding-left: env(safe-area-inset-left) !important;
  padding-right: env(safe-area-inset-right) !important;
}
/* [PERF] Reduced backdrop blur from 12px → 6px on modal backdrop. The blur
   is only mounted while modal is open (so cost is bounded), but 12px was
   overkill and caused fan-spin on older laptops. */
.modal__backdrop {
  position: absolute;
  inset: 0;
  /* [#v7.1.0] PERF: blur removed (Android jank) — near-solid scrim */
  background: rgba(13, 15, 20, 0.97);
  animation: fadeIn 0.25s var(--ease-out);
  will-change: transform;
  transform: translateZ(0);
}
.modal__card {
  position: relative !important;
  background: var(--card-bg) !important;
  width: 100% !important; /* Fixed from 100vw to prevent horizontal scroll bugs */
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  z-index: 2 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  animation: slideUpFull 0.32s var(--ease-out); /* Animation restored for JS callbacks */
  transform: translateZ(0); 
  backface-visibility: hidden;
  overscroll-behavior: contain;
}
.dark-ui .modal__card { background: var(--bg-dark) !important; }

/* Float back close button */
/* [PERF] Removed backdrop-filter from modal__close button. The close button
   is a 40x40px fixed overlay; the blur is invisible at that size and
   costs a separate compositing layer. */
.modal__close {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  left: calc(16px + env(safe-area-inset-left));
  z-index: 120;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  transition: background-color 0.2s, transform 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.modal__close:hover {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.08);
}

.modal__body {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

/* ─── Premium Poster Background Hero Section ─────────────────────────── */
.movie-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  margin-top: 0;
  width: 100%;
  content-visibility: auto;
  contain-intrinsic-size: 0 460px;
}
.movie-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 15, 20, 0.95) 6%, rgba(13, 15, 20, 0.8) 55%, rgba(13, 15, 20, 0.4) 100%);
  z-index: 1;
}
.dark-ui .movie-hero__overlay {
  background: linear-gradient(to top, rgba(13, 15, 20, 0.98) 6%, rgba(13, 15, 20, 0.88) 55%, rgba(13, 15, 20, 0.4) 100%);
}

@media (min-width: 768px) {
  .movie-hero {
    min-height: 520px;
    background-position: center 20%;
  }
  .movie-hero__overlay {
    background: linear-gradient(to right, rgba(13, 15, 20, 0.96) 35%, rgba(13, 15, 20, 0.75) 70%, rgba(13, 15, 20, 0.2) 100%),
                linear-gradient(to top, rgba(13, 15, 20, 0.8) 4%, transparent 20%);
  }
  .dark-ui .movie-hero__overlay {
    background: linear-gradient(to right, rgba(13, 15, 20, 0.98) 35%, rgba(13, 15, 20, 0.85) 70%, rgba(13, 15, 20, 0.2) 100%),
                linear-gradient(to top, rgba(13, 15, 20, 0.8) 4%, transparent 20%);
  }
}

.movie-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 24px 36px;
}
.movie-hero__info {
  max-width: 640px;
}
.movie-hero__title {
  font-family: var(--font-primary);
  font-size: clamp(20px, 4.5vw, 32px);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.movie-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
/* [PERF] Removed backdrop-filter from .chip — chips sit on top of the
   movie-hero overlay which already has its own gradient. Blur was invisible. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.18);
}
.chip--imdb { background: rgba(245,197,24,0.22); border-color: rgba(245,197,24,0.35); color: var(--gold); }
.chip--quality { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.35); color: #f87171; }

.movie-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.hero-btn--primary { background: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(251,17,20,0.3); }
.hero-btn--primary:hover { background: var(--red-dark); transform: translateY(-1px); }
/* [PERF] Removed backdrop-filter from hero-btn--ghost — same rationale as
   .chip: sits on top of an already-opaque overlay gradient. */
.hero-btn--ghost {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.hero-btn--ghost:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }
.hero-btn--fav[data-fav="1"] { background: rgba(251,191,36,0.2); border-color: rgba(251,191,36,0.35); color: var(--gold); }
/* Player mode toggle — distinct accent so users notice it */
#playerModeBtn { border-color: rgba(255,255,255,.35); }
#playerModeBtn[data-mode="hdhub4u"] { background: rgba(16,185,129,.18); border-color: rgba(52,211,153,.45); color: #34d399; }
#playerModeBtn[data-mode="hdhub4u"]:hover { background: rgba(16,185,129,.28); }
#playerModeBtn[data-mode="inpage"] { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
#playerModeBtn[data-mode="inpage"]:hover { background: rgba(255,255,255,.22); }

@media (max-width: 640px) {
  .hero-btn { padding: 8px 12px; font-size: 12px; gap: 4px; }
  #playerModeBtn { padding: 8px 10px; }
}

/* Movie Info Grid */
.movie-detail-body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 48px;
}
.movie-info-cols {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .movie-info-cols {
    flex-direction: row;
    align-items: flex-start;
  }
}

.movie-info-details {
  flex: 1;
  min-width: 0;
}
.movie-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f1f5f9;
  border-radius: var(--radius-lg);
}
.dark-ui .movie-info-grid { background: rgba(255,255,255,0.02); }
.movie-info-row { display: flex; gap: 12px; font-size: 13px; }
.movie-info-row strong { width: 90px; flex-shrink: 0; font-weight: 700; color: var(--text); font-family: var(--font-primary); }
.dark-ui .movie-info-row strong { color: var(--text-dark); }
.movie-info-row span { color: var(--text-muted); }
.dark-ui .movie-info-row span { color: var(--text-muted-dark); }

/* Storyline */
.movie-storyline { margin-bottom: 24px; padding: 16px; background: #f1f5f9; border-radius: var(--radius-lg); }
.dark-ui .movie-storyline { background: rgba(255,255,255,0.02); }
.movie-storyline-label { font-family: var(--font-primary); font-weight: 800; font-size: 12px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.movie-storyline p { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.dark-ui .movie-storyline p { color: var(--text-muted-dark); }

/* Section Title */
.post-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border);
}
.dark-ui .post-section-title { color: var(--text-dark); border-bottom-color: var(--card-border-dark); }
.post-section-title::before { font-size: 14px; }
.post-section-title.download::before { content: '🎬'; }
.post-section-title.screenshots::before { content: '🖼️'; }

/* ─── Grid-Based Big Screenshot view ────────────────────────────────── */
.screenshots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 12px 0 24px;
}
@media (min-width: 600px) {
  .screenshots {
    grid-template-columns: repeat(2, 1fr);
  }
}
.screenshot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  aspect-ratio: 16/9;
}
.dark-ui .screenshot { border-color: var(--card-border-dark); }
.screenshot:hover { transform: scale(1.015); box-shadow: var(--shadow-card); }
.screenshot img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Minimalist Polished Download Grid ────────────────────────────── */
.download-sections { display: flex; flex-direction: column; gap: 16px; }
.dl-group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.dark-ui .dl-group { background: var(--card-bg-dark); border-color: var(--card-border-dark); }
.dl-group__title {
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 12.5px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.02);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dark-ui .dl-group__title { background: rgba(255,255,255,0.02); border-bottom-color: var(--card-border-dark); color: var(--text-dark); }
.dl-group__title::before { content: '📂'; }

.dl-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  padding: 16px;
}
@media (max-width: 480px) { .dl-group__grid { grid-template-columns: repeat(2, 1fr); } }

/* Single Minimalist Download Button */
.dl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  color: #334155;
  transition: all 0.2s var(--ease);
  min-height: 72px;
  text-align: center;
}
.dark-ui .dl-btn {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.06);
  color: #e2e8f0;
}
.dl-btn:hover {
  transform: translateY(-2px);
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 6px 15px rgba(251,17,20,0.08);
}
.dark-ui .dl-btn:hover {
  background: #1d2331;
  box-shadow: 0 6px 18px rgba(251,17,20,0.12);
}
.dl-btn:active { transform: scale(0.96); }

.dl-btn__quality {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-family: var(--font-primary);
}
.dl-btn__size {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}
.dark-ui .dl-btn__size { color: var(--text-muted-dark); }

/* Remove legacy color variations */
.dl-btn--sd, .dl-btn--hd, .dl-btn--fhd, .dl-btn--uhd { background: inherit; color: inherit; border-color: inherit; }
.dark-ui .dl-btn--sd, .dark-ui .dl-btn--hd, .dark-ui .dl-btn--fhd, .dark-ui .dl-btn--uhd { background: inherit; color: inherit; border-color: inherit; }

/* ─── Premium Bottom Sheet (Fetch URL / Stream UI) ────────────────────── */
.sheet[hidden] { display: none !important; }

@keyframes sheetBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetPanelUp {
  from { transform: translateY(100%) scale(0.98); opacity: 0; }
  to   { transform: translateY(0)     scale(1);    opacity: 1; }
}

.sheet {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: flex-end; justify-content: center;
}

.sheet__backdrop {
  position: absolute; inset: 0;
  /* [#v7.1.0] PERF: blur removed */
  background: rgba(4, 5, 10, 0.96);
  animation: sheetBackdropIn 0.28s ease;
  will-change: opacity;
}

/* ── Panel ── */
.sheet__panel {
  position: relative;
  width: 100%; max-width: 540px;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 2;
  padding: 0 0 env(safe-area-inset-bottom, 20px);
  border-radius: 22px 22px 0 0;
  background: #ffffff;
  box-shadow: 0 -6px 60px rgba(0,0,0,0.25);
  border-top: 1px solid rgba(0,0,0,0.06);
  animation: sheetPanelUp 0.38s cubic-bezier(0.34,1.28,0.64,1);
  transform-origin: bottom center;
  scrollbar-width: none;
}
.sheet__panel::-webkit-scrollbar { display: none; }
.dark-ui .sheet__panel {
  background: linear-gradient(175deg, #161b28 0%, #0c0f18 100%);
  border-top: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 -6px 60px rgba(0,0,0,0.6), 0 -1px 0 rgba(255,255,255,0.04);
}

/* ── Drag Handle ── */
.sheet__handle {
  display: flex;
  justify-content: center;
  padding: 14px 0 6px;
}
.sheet__handle::before {
  content: '';
  width: 40px; height: 4px;
  background: rgba(0,0,0,0.12);
  border-radius: 99px;
}
.dark-ui .sheet__handle::before { background: rgba(255,255,255,0.14); }

/* ── Header ── */
.sheet__header {
  position: relative;
  text-align: center;
  padding: 6px 20px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.dark-ui .sheet__header { border-bottom-color: rgba(255,255,255,0.06); }

.sheet__title {
  font-size: 16px; font-weight: 900;
  letter-spacing: -0.2px;
  font-family: var(--font-primary);
  color: #0f172a;
}
.dark-ui .sheet__title { color: #f1f5f9; }

.sheet__hint {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 500;
  margin-top: 3px;
}
.dark-ui .sheet__hint { color: #64748b; }

/* ── Close Button ── */
.sheet__close {
  position: absolute !important;
  top: 50%; right: 16px;
  transform: translateY(-50%);
  width: 32px !important; height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,0.06) !important;
  border: none !important;
  color: #64748b;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1) !important;
  z-index: 10;
}
.dark-ui .sheet__close {
  background: rgba(255,255,255,0.09) !important;
  color: rgba(255,255,255,0.5) !important;
}
.sheet__close:hover {
  background: #ff1e42 !important;
  color: #fff !important;
  transform: translateY(-50%) scale(1.12) !important;
  box-shadow: 0 4px 16px rgba(255,30,66,0.4) !important;
}
.sheet__close:active { transform: translateY(-50%) scale(0.9) rotate(90deg) !important; }

/* ── Body Padding ── */
.sheet__body-inner { padding: 18px 16px 0; }

/* ── Play Actions Grid ── */
.sheet__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px 14px 14px;
}
@media (min-width: 440px) { .sheet__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 18px 18px 16px; } }
@media (min-width: 540px) { .sheet__grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Sheet Button Base ── */
.sheet__btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 18px 10px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
  cursor: pointer;
  text-decoration: none;
  color: #334155;
  transition: all 0.22s cubic-bezier(0.34,1.45,0.64,1);
  overflow: hidden;
}
.sheet__btn::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.5) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.sheet__btn:hover::before { opacity: 1; }
.dark-ui .sheet__btn {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.07);
  color: #e2e8f0;
}
.dark-ui .sheet__btn::before {
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 70%);
}
.sheet__btn:hover {
  border-color: rgba(255,30,66,0.5);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(255,30,66,0.12);
  background: #fff;
}
.dark-ui .sheet__btn:hover {
  background: rgba(255,255,255,0.07);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  border-color: rgba(255,30,66,0.45);
}
.sheet__btn:active { transform: scale(0.96); }

/* ── Button Icon ── */
.sheet__btn-icon {
  width: 46px; height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(0,0,0,0.04);
  border-radius: 14px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.sheet__btn:hover .sheet__btn-icon { transform: scale(1.1); }
.dark-ui .sheet__btn-icon {
  background: rgba(255,255,255,0.06);
}

/* ── Primary Action (Ad-free Player) ── */
.sheet__btn--primary {
  background: linear-gradient(145deg, #fff8f8 0%, #fff 100%);
  border-color: rgba(255,30,66,0.35);
  grid-column: span 2;
}
@media (min-width: 540px) { .sheet__btn--primary { grid-column: span 3; flex-direction: row; gap: 16px; padding: 18px 24px; justify-content: flex-start; } }
.dark-ui .sheet__btn--primary {
  background: linear-gradient(145deg, rgba(255,30,66,0.12) 0%, rgba(255,30,66,0.04) 100%);
  border-color: rgba(255,30,66,0.4);
}
.sheet__btn--primary .sheet__btn-icon {
  background: linear-gradient(135deg, #ff1e42, #c90026);
  color: #fff;
  box-shadow: 0 5px 18px rgba(255,30,66,0.45);
  border-radius: 50%;
  width: 52px; height: 52px;
  font-size: 26px;
}
.sheet__btn--primary:hover {
  background: linear-gradient(145deg, #fff0f0, #fff8f8);
  border-color: rgba(255,30,66,0.6);
  box-shadow: 0 10px 30px rgba(255,30,66,0.18);
}

/* ── Separator Tip inside grid ── */
.sheet__btn--tip {
  grid-column: 1 / -1;
  flex-direction: row;
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  padding: 4px 4px;
  gap: 6px;
  cursor: default;
  box-shadow: none;
  transform: none !important;
}
.sheet__btn--tip:hover { background: transparent !important; box-shadow: none !important; border-color: transparent !important; transform: none !important; }
.dark-ui .sheet__btn--tip { color: #475569; }

/* ── URL Copy Section ── */
.sheet__url-box { margin: 0 14px 14px; }
.sheet__url-label {
  font-size: 11px; font-weight: 700;
  color: #94a3b8;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 5px;
  text-transform: uppercase; letter-spacing: 0.5px;
  font-family: var(--font-primary);
}
.sheet__url-label::before { content: '🔗'; font-size: 13px; }
.dark-ui .sheet__url-label { color: #475569; }
.sheet__url {
  display: flex; align-items: center;
  background: rgba(241,245,249,0.8);
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px 4px 4px 12px;
  transition: border-color 0.2s;
  gap: 6px;
}
.dark-ui .sheet__url {
  background: rgba(0,0,0,0.25);
  border-color: rgba(255,255,255,0.08);
}
.sheet__url:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,30,66,0.1); }
.sheet__url input {
  flex: 1; min-width: 0;
  background: transparent; border: none;
  font-size: 11.5px; outline: none;
  color: #475569; font-family: monospace;
}
.dark-ui .sheet__url input { color: #94a3b8; }
.sheet__url-copy {
  background: var(--red);
  color: #fff; border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 11.5px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.sheet__url-copy:hover { background: #c90026; transform: scale(1.04); }
.sheet__url-copy:active { transform: scale(0.96); }

.sheet__tip {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 0 14px 18px;
  line-height: 1.6;
}
.dark-ui .sheet__tip { color: #475569; }

/* ── Loading State ── */
.loading-card {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  padding: 40px 20px 30px;
  grid-column: 1/-1;
}
.loading-card__spinner {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3.5px solid rgba(255,30,66,0.15);
  border-top-color: var(--red);
  border-right-color: var(--red);
  animation: skmRotate 0.8s linear infinite;
  box-shadow: 0 0 16px rgba(255,30,66,0.2);
}
.loading-card__title {
  font-family: var(--font-primary);
  font-weight: 800; font-size: 14px;
  color: #0f172a;
}
.dark-ui .loading-card__title { color: #f1f5f9; }
.loading-card__hint { font-size: 12px; color: #94a3b8; }
.loading-card__progress {
  width: 100%; max-width: 200px; height: 3px;
  background: rgba(255,30,66,0.1);
  border-radius: 99px; overflow: hidden;
}
.loading-card__progress::after {
  content: '';
  display: block; height: 100%;
  width: 40%;
  background: var(--red);
  border-radius: 99px;
  animation: progressSlide 1.2s ease-in-out infinite alternate;
}
@keyframes progressSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}
.loading-dots::after {
  content: '';
  animation: dots 1.4s steps(3, end) infinite;
}
@keyframes dots {
  0%   { content: ''; }
  33%  { content: '.'; }
  66%  { content: '..'; }
  100% { content: '...'; }
}

/* ── Large screen sheet ── */
@media (min-width: 600px) {
  .sheet { align-items: flex-end; justify-content: center; padding-bottom: 0; }
  .sheet__panel {
    border-radius: 24px 24px 0 0;
    max-height: 85dvh;
    box-shadow: 0 -8px 80px rgba(0,0,0,0.3), 0 -1px 0 rgba(255,255,255,0.06);
  }
  .dark-ui .sheet__panel {
    box-shadow: 0 -8px 80px rgba(0,0,0,0.7), 0 -1px 0 rgba(255,255,255,0.05);
  }
}

.premium-spinner {
  width: 44px; height: 44px;
  border: 4px solid rgba(255, 30, 66, 0.15);
  border-left-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 24px auto;
}



/* ─── Dashboard ───────────────────────────────────────────────────────── */
.dashboard { display: flex; flex-direction: column; gap: 16px; padding: 16px 0; }
.dash-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dash-stat { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; text-align: center; }
.dark-ui .dash-stat { background: var(--card-bg-dark); border-color: var(--card-border-dark); }
.dash-stat .num { font-size: 24px; font-weight: 800; color: var(--red); display: block; font-family: var(--font-primary); margin-bottom: 4px; }
.dash-stat .label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.dark-ui .dash-stat .label { color: var(--text-muted-dark); }

.dash-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.dark-ui .dash-section { background: var(--card-bg-dark); border-color: var(--card-border-dark); }
.dash-section h3 { font-size: 13.5px; font-weight: 800; padding: 12px 16px; border-bottom: 1px solid var(--border); font-family: var(--font-primary); }
.dark-ui .dash-section h3 { border-bottom-color: var(--card-border-dark); }

.dash-list { display: flex; flex-direction: column; }
.dash-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.dark-ui .dash-item { border-bottom-color: var(--card-border-dark); }
.dash-item:last-child { border-bottom: none; }
.dash-item__poster { width: 36px; height: 50px; border-radius: var(--radius-sm); overflow: hidden; background: var(--border); }
.dash-item__poster img { width: 100%; height: 100%; object-fit: cover; }
.dash-item__body { flex: 1; min-width: 0; }
.dash-item__title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-primary); }
.dash-item__meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.dash-item__action { font-size: 11px; color: var(--red); font-weight: 700; }

.url-list { display: flex; flex-direction: column; }
.url-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 11px; }
.dark-ui .url-item { border-bottom-color: var(--card-border-dark); }
.url-item:last-child { border-bottom: none; }
.url-item__quality { padding: 2px 6px; background: var(--red); color: #fff; border-radius: 4px; font-weight: 800; font-size: 9px; font-family: var(--font-primary); }
.url-item__url { flex: 1; min-width: 0; font-family: monospace; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.url-item__copy { padding: 4px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 10px; font-weight: 700; cursor: pointer; }
.dark-ui .url-item__copy { background: rgba(255,255,255,0.05); border-color: var(--card-border-dark); color: var(--text-dark); }

/* ─── Footer ──────────────────────────────────────────────────────────── */
footer {
  background: #090b0e;
  color: #64748b;
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.03);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 600px) { .footer-inner { grid-template-columns: 1.5fr 1fr; } }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-logo { height: 28px; width: auto; opacity: 0.8; }
.footer-tagline { font-size: 12px; color: #475569; max-width: 280px; }
.footer-tg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(30,136,229,0.08);
  border: 1px solid rgba(30,136,229,0.2);
  border-radius: var(--radius-pill);
  color: #42a5f5;
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}
.footer-nav h4 { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #94a3b8; margin-bottom: 12px; font-family: var(--font-primary); }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: #475569; font-size: 12.5px; transition: color 0.2s; }
.footer-nav a:hover { color: var(--red); }
.footer-brand-pill { background: var(--red); color: #fff; font-family: var(--font-primary); font-weight: 800; font-size: 12px; padding: 4px 14px; border-radius: var(--radius-pill); display: inline-block; margin-bottom: 8px; }
.footer-copyright { font-size: 11px; color: #334155; }

/* ─── Go-to-top ───────────────────────────────────────────────────────── */
#go-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s var(--ease);
  z-index: 40;
  box-shadow: 0 4px 10px rgba(251,17,20,0.3);
}
#go-top.is-visible { opacity: 1; pointer-events: auto; }
#go-top:hover { transform: translateY(-2px); }

/* ─── Responsive Media Queries ────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-brand { padding: 10px 16px; }
  .logo-text { font-size: 20px; }
  .menu-toggle { display: inline-flex; }
  .header-brand { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .header-logo { margin-right: auto; }
  .nav-bar__inner { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 16px 12px; }
  .search-form { max-width: 100%; width: 100%; }
  
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 4px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }
  .dark-ui .nav-menu { border-top-color: var(--card-border-dark); }
  .nav-menu.is-open { display: flex; }
  .nav-link { width: 100%; padding: 8px 14px; border-radius: var(--radius-sm); }
  
  .movie-hero { min-height: 360px; }
  .movie-hero__content { padding: 60px 16px 24px; }
  .movie-hero__title { font-size: 22px; }
  
  .movie-detail-body { padding: 16px 16px 36px; }
  .post-section-title { font-size: 12.5px; margin: 20px 0 12px; }
  .dl-group__title { font-size: 12px; padding: 10px 14px; }
}

@media (max-width: 480px) {
  .header-controls { gap: 10px; }
  .notice-strip marquee, #noticeMarquee { padding-left: 70px; font-size: 11px; }
  .notice-strip-label { font-size: 9px; padding: 0 8px; }
  .movies-grid { gap: 12px; }
  .post-title { font-size: 12px; min-height: 2.8em; }
  .post-meta { font-size: 10px; }
  
  .movie-hero { min-height: 300px; }
  .movie-hero__content { padding: 40px 12px 16px; }
  .movie-hero__title { font-size: 18px; }
  .movie-hero__chips { margin-bottom: 12px; }
  .hero-btn { padding: 8px 14px; font-size: 12px; }
  
  .dl-btn { min-height: 60px; padding: 10px 6px; }
  .dl-btn__quality { font-size: 12.5px; }
  .dl-btn__size { font-size: 9.5px; }
}

/* ─── Dbtn Download Button Styles (Original Clone) ────────────────────── */
.Dbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #636363;
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  font-family: var(--font-primary);
  text-transform: uppercase;
}
.Dbtn.sd { background: #ffc107; color: #000 !important; }
.Dbtn.hd { background: #ff5722; color: #fff !important; }
.Dbtn.watch { background: #8d6e63; color: #fff !important; }
.Dbtn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); filter: brightness(1.05); }

/* ─── Upcoming Notice Strip Overrides (mlsbd.co Match) ─────────────────── */
.notice-strip {
  background: var(--red) !important;
  color: #fff !important;
  border-radius: 7px;
  margin: 12px 0;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--black);
}
.notice-strip-label {
  background: var(--black) !important;
  color: #fff !important;
  font-weight: 900;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.notice-strip marquee, #noticeMarquee {
  font-size: 12px;
  font-weight: 700;
}

/* ─── Footer Overrides (mlsbd.co Match) ────────────────────────────────── */
footer.container-fluid {
  margin-top: 40px;
  padding: 0 !important;
}
.footer-top {
  background: var(--grey);
  color: #fff;
  text-align: center;
  padding: 15px 20px;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-primary);
  letter-spacing: 0.5px;
}
.footer-bottom {
  background: var(--black);
  color: #888;
  padding: 30px 20px 20px;
  text-align: center;
  position: relative;
}
.footer-text p {
  margin-bottom: 12px;
  font-size: 13px;
}
.footer-links {
  margin: 15px 0;
}
.footer-links ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 0;
  flex-wrap: wrap;
}
.footer-links a {
  color: #bbb;
  font-weight: 600;
  font-size: 13px;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--red);
}
.footer-bottom .copyright {
  font-size: 11px;
  color: #666;
}
.footer-bottom .mlsbd {
  display: block;
  margin-top: 15px;
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 900;
  color: #222;
  letter-spacing: -0.5px;
}
.dark-ui .footer-bottom .mlsbd {
  color: #444;
}

/* ─── Interactive Cursor Pointer Rules ──────────────────────────────── */
button,
a,
[role="button"],
.single-post,
.pill,
.sheet__btn,
.dl-btn,
.hero-btn,
.url-item__copy,
.toggleWrapper label,
.filterWrapper,
.notice-strip-label,
.search-clear {
  cursor: pointer !important;
}

/* ─── Source Toggle UI — Premium Pill ─────────────────────────── */
.source-toggle-wrapper { display: flex; align-items: center; }
.source-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 13px 4px 5px;
  border-radius: 999px;
  border: 1.5px solid rgba(251,17,20,0.35);
  background: rgba(251,17,20,0.08);
  cursor: pointer;
  color: #ef4444;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  min-width: 100px;
}
.source-toggle:hover {
  background: rgba(251,17,20,0.14);
  border-color: rgba(251,17,20,0.55);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(251,17,20,0.15);
}
.source-toggle__indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red, #fb1114);
  box-shadow: 0 0 0 3px rgba(251,17,20,0.2);
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
/* FDM / FreeDrive state */
.source-toggle.fdm {
  border-color: rgba(124,77,255,0.4);
  background: rgba(124,77,255,0.08);
  color: #a78bfa;
}
.source-toggle.fdm:hover {
  background: rgba(124,77,255,0.14);
  border-color: rgba(124,77,255,0.6);
  box-shadow: 0 0 12px rgba(124,77,255,0.2);
}
.source-toggle.fdm .source-toggle__indicator {
  background: #7c4dff;
  box-shadow: 0 0 0 3px rgba(124,77,255,0.2);
}
/* HDHub4u state */
.source-toggle.hd {
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.08);
  color: #34d399;
}
.source-toggle.hd:hover {
  background: rgba(16,185,129,0.14);
  border-color: rgba(16,185,129,0.6);
  box-shadow: 0 0 12px rgba(16,185,129,0.2);
}
.source-toggle.hd .source-toggle__indicator {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
}
/* MovieBox state */
.source-toggle.mb {
  border-color: rgba(245,158,11,0.4);
  background: rgba(245,158,11,0.08);
  color: #fbbf24;
}
.source-toggle.mb:hover {
  background: rgba(245,158,11,0.14);
  border-color: rgba(245,158,11,0.6);
  box-shadow: 0 0 12px rgba(245,158,11,0.2);
}
.source-toggle.mb .source-toggle__indicator {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.2);
}

/* ─── Web Video Player (MX Player Pro style) ──────────────────── */
.player-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: #000; animation: fadeIn 0.3s ease;
  will-change: transform;
  transform: translateZ(0);
}
.player-modal__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.95);
}
.player-container {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  overscroll-behavior: contain;
}
.web-video-player {
  max-width: 100%; max-height: 100%;
  transition: transform 0.3s ease;
  outline: none;
  will-change: transform;
  transform: translateZ(0);
}
.web-video-player.rotate-90 { transform: rotate(90deg); transform-origin: center; }
.web-video-player.rotate-180 { transform: rotate(180deg); }
.web-video-player.rotate-270 { transform: rotate(270deg); transform-origin: center; }
.web-video-player.stretch { object-fit: fill !important; width: 100%; height: 100%; }
.web-video-player.fit { object-fit: contain; }

/* Controls overlay */
.player-controls {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
  z-index: 10;
}
.player-container:hover .player-controls,
.player-controls.show { opacity: 1; pointer-events: auto; }

/* Top bar */
.player-top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}
.player-title {
  color: #fff; font-size: 16px; font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 60%;
}
.player-top-actions {
  display: flex; gap: 8px;
}

/* Buttons */
.player-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0,0,0,0.5);
  color: #fff; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.player-btn:hover { background: rgba(229,9,20,0.8); }
.player-btn:active { transform: scale(0.92); }
.player-btn svg { width: 22px; height: 22px; }
.player-btn--close:hover { background: rgba(229,9,20,0.9); }

/* Bottom bar */
.player-bottom-bar {
  padding: 8px 16px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

/* Seek bar */
.player-seek-bar {
  position: relative; height: 6px;
  background: rgba(255,255,255,0.2); border-radius: 3px;
  cursor: pointer; margin-bottom: 8px;
  transition: height 0.15s;
}
.player-seek-bar:hover { height: 8px; }
.player-seek-buffer {
  position: absolute; top: 0; left: 0; height: 100%;
  background: rgba(255,255,255,0.3); border-radius: 3px;
}
.player-seek-progress {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--red, #fb1114); border-radius: 3px;
}
.player-seek-handle {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; opacity: 0;
  transition: opacity 0.15s;
}
.player-seek-bar:hover .player-seek-handle { opacity: 1; }

/* Time bar */
.player-time-bar {
  display: flex; align-items: center; gap: 8px;
}
.player-time {
  color: #fff; font-size: 13px; font-weight: 500;
  min-width: 36px; text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.player-time-sep { color: rgba(255,255,255,0.5); }
.player-spacer { flex: 1; }

/* Speed control */
.player-speed {
  width: auto; padding: 0 12px; border-radius: 20px;
  font-size: 13px; font-weight: 700;
}
.speed-menu {
  position: absolute; bottom: 60px; right: 16px;
  background: rgba(0,0,0,0.9); border-radius: 12px;
  padding: 8px; display: flex; flex-direction: column; gap: 4px;
  z-index: 20;
}
.speed-menu button {
  padding: 8px 16px; border-radius: 8px;
  color: #fff; font-size: 14px; font-weight: 600;
  background: transparent; border: none; cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}
.speed-menu button:hover { background: rgba(255,255,255,0.15); }
.speed-menu button.is-active { background: var(--red, #fb1114); }

/* Volume */
.player-volume { display: flex; align-items: center; gap: 4px; }
.player-volume-slider {
  width: 60px; height: 4px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.2); border-radius: 2px;
  outline: none;
}
.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; cursor: pointer;
}
.player-volume-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; cursor: pointer; border: none;
}

/* Fullscreen mode */
.player-modal:fullscreen .player-container { width: 100vw; height: 100vh; }
.player-modal:fullscreen .web-video-player { width: 100%; height: 100%; }

/* Responsive */
@media (max-width: 768px) {
  .player-top-bar { padding: 8px 10px; }
  .player-title { font-size: 14px; max-width: 50%; }
  .player-btn { width: 36px; height: 36px; }
  .player-btn svg { width: 20px; height: 20px; }
  .player-bottom-bar { padding: 6px 10px 8px; }
  .player-volume-slider { width: 40px; }
  .player-time { font-size: 12px; min-width: 32px; }
  .source-toggle { min-width: 72px; padding: 2px 8px 2px 3px; font-size: 9px; }
  .source-toggle__indicator { width: 14px; height: 14px; }
  /* [#v5.8.7] Smaller dropdown on mobile to prevent screen zoom */
  .source-mini-dropdown { min-width: 120px; max-width: 160px; font-size: 10px; }
  .source-mini-dropdown__item { padding: 5px 8px; font-size: 10px; }
  .source-mini-dropdown__item-icon { width: 14px; height: 14px; font-size: 8px; }
}

/* ─── Premium Smooth Transitions ──────────────────────────────────── */

/* [PERF] Removed body from the global transition list (already done above).
   Kept transitions on the other elements because they only fire on dark-mode
   toggle, not on scroll. */
.site-header,
.nav-bar,
.notice-strip,
.footer-text,
.post-desc,
.single-post,
.modal__card {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.2s ease;
}

/* Smooth content section reveal */
.movies-grid,
.filters,
.section-head,
.featured-section {
  transition: opacity 0.3s ease;
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}



/* ─── Sprint 2 & 3 & 4 Layout, Polish and safe area additions ──────── */

/* Dynamic viewport height adjustments */
.modal__card {
  max-height: 100vh;
  max-height: 100dvh;
}
.sheet__panel {
  max-height: 85vh;
  max-height: 85dvh;
}
.player-modal {
  height: 100vh;
  height: 100dvh;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Safe areas */
.sheet__panel {
  padding-bottom: calc(32px + env(safe-area-inset-bottom)) !important;
}

/* [PERF] Removed backdrop-filter from player-close-fab. While a video is
   playing, every paint counts. */
.player-close-fab {
  position: fixed !important;
  top: calc(12px + env(safe-area-inset-top)) !important;
  right: calc(12px + env(safe-area-inset-right)) !important;
  z-index: 250 !important;
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.8) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  cursor: pointer !important;
  transition: background-color 0.2s !important, transform 0.2s !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
  padding: 0 !important;
  will-change: transform;
  transform: translateZ(0);
}
.player-close-fab:hover {
  background: var(--red) !important;
  border-color: var(--red) !important;
  transform: scale(1.08) !important;
}
.player-close-fab:active { transform: scale(0.92) !important; }

/* Notice Marquee CSS ticker */
.notice-marquee {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}
.notice-marquee__track {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 28s linear infinite;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .notice-marquee__track { animation: none; padding-left: 0; }
}

/* Loading Dots animation */
.loading-dots::after {
  content: '...';
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  animation: dots-width 1.4s steps(4, end) infinite;
}
@keyframes dots-width {
  0%   { width: 0; }
  100% { width: 1.2em; }
}

/* Premium loading card */
.loading-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 20px;
  text-align: center;
}
.loading-card__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.dark-ui .loading-card__spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: var(--red);
}
.loading-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-primary);
}
.loading-card__hint {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.5;
}
.loading-card__progress {
  width: 100%;
  max-width: 200px;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.dark-ui .loading-card__progress {
  background: rgba(255, 255, 255, 0.08);
}
.loading-card__progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: progress-slide 1.5s ease-in-out infinite;
}
@keyframes progress-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes spin { to { transform: rotate(360deg); } }
.dark-ui .loading-card__spinner {
  border-color: rgba(255, 255, 255, 0.08);
  border-top-color: var(--red);
}
.dark-ui .loading-card__title { color: #fff; }

/* Toast overrides for error messages */
.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  background: #1e293b;
  color: #f8fafc;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 400;
  opacity: 0;
  max-width: calc(100vw - 32px);
  text-align: center;
  cursor: pointer;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--success { background: #10b981; }
.toast--error {
  border-radius: var(--radius-lg);
  white-space: normal;
  line-height: 1.4;
  background: #ef4444; /* red background for error */
}

/* Tactile touch feedback on pills */
.pill {
  transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.pill:active {
  transform: scale(0.95);
}
.pill.is-active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 4px 12px rgba(251, 17, 20, 0.3);
}
/* [PERF] Kept the pill-flash animation — it's only fired once on click,
   not continuously, so it's cheap. */

/* Aspect ratio adjustments to prevent layout shift */
.movie-info-poster {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 2 / 3;
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 200px 300px;
}
.movie-info-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb {
  aspect-ratio: 2 / 3;
  background: var(--bg);
  content-visibility: auto;
  contain-intrinsic-size: 200px 300px;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.4s var(--ease);
  will-change: transform;
  transform: translateZ(0);
}
.thumb img.is-loaded {
  opacity: 1;
}

/* Search input spacing for clear button */
.search-input {
  padding-right: 36px !important;
}
input[type="search"], .search-input {
  font-size: 16px !important;
}

/* Shimmer Skeleton cards */
.skeleton-card, .skeleton-modal {
  background: linear-gradient(90deg,
    rgba(255,255,255,.04) 0%,
    rgba(255,255,255,.08) 50%,
    rgba(255,255,255,.04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Badges for dashboard */
.url-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,.08);
  color: var(--text-muted);
  margin-left: 6px;
}
.url-badge--expired {
  background: rgba(244,67,54,.15);
  color: #ef5350;
}
.dash-url-row.is-expired {
  opacity: .5;
}
.dash-url-link--dead {
  color: var(--text-muted);
  font-style: italic;
}

/* Context menu */
.context-menu {
  position: fixed;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 500;
  min-width: 180px;
  border: 1px solid var(--border);
}
.context-menu__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
}
.context-menu__item:hover, .context-menu__item:active {
  background: var(--bg);
}
.dark-ui .context-menu__item:hover, .dark-ui .context-menu__item:active {
  background: rgba(255, 255, 255, 0.08);
}

/* Storyline Read More toggle link */
.storyline-toggle {
  background: none;
  border: none;
  color: var(--red);
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
}

/* Prefers reduced data support */
@media (prefers-reduced-data: reduce) {
  .featured-post img,
  .screenshot img {
    display: none !important;
  }
  .thumb img {
    filter: blur(8px);
    transform: scale(1.1);
  }
}

/* Custom Overrides for Issues #33, #52, #13 */

/* ─── Missing utility classes ─────────────────────────────────────── */
.view-more-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red); color: #fff;
  border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s;
}
.view-more-btn:hover { opacity: 0.85; }
.dark-ui .view-more-btn { background: var(--red); color: #fff; }

.dash-empty {
  padding: 16px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}
.dark-ui .dash-empty { color: var(--text-muted-dark); }

.empty {
  padding: 40px 16px; text-align: center;
  color: var(--text-muted); font-size: 14px;
}
.dark-ui .empty { color: var(--text-muted-dark); }

/* ─── Dbtn dark mode ─────────────────────────────────────────────── */
.dark-ui .Dbtn {
  background: rgba(255,255,255,0.06);
  color: var(--text-dark);
  border-color: var(--card-border-dark);
}
.dark-ui .Dbtn:hover {
  background: rgba(255,255,255,0.12);
}

/* ─── Context menu dark mode ──────────────────────────────────────── */
.dark-ui .context-menu {
  background: var(--card-bg-dark);
  border-color: var(--card-border-dark);
  color: var(--text-dark);
}

/* ─── Search clear touch target ───────────────────────────────────── */
.search-clear {
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .skeleton-card, .skeleton-modal {
    animation: none !important;
    background: rgba(255,255,255,.06);
  }
}

.url-item.is-expired {
  opacity: 0.6;
}



/* [#v5.8.7] Mini source dropdown — compact, curved pill dropdown (Android-optimized) */
.source-mini-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: auto;
  min-width: 140px;
  max-width: 180px;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.99);
  /* [#v7.1.0] PERF: blur removed */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
  z-index: 200;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  animation: dropdownFadeIn 0.15s ease-out;
  font-size: 12px;
  /* [#v5.8.7] Prevent Android auto-zoom: use fixed font-size >= 16px is NOT needed
     for non-input elements, but keep text readable */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.source-mini-dropdown__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.source-mini-dropdown__item:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #f1f5f9;
}
.source-mini-dropdown__item.is-active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}
.source-mini-dropdown__item-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
}
.source-mini-dropdown__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 8px;
}
.source-mini-dropdown__unlock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  color: #c084fc;
  border: 1px dashed rgba(168, 85, 247, 0.3);
  margin-top: 3px;
}
.source-mini-dropdown__unlock:hover {
  background: rgba(168, 85, 247, 0.1);
}

/* [#v5.9.2] Categories mini dropdown — warm white bg + red gradient */
.cat-mini-dropdown {
  position: fixed;
  min-width: 160px;
  max-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  background: linear-gradient(180deg, #fff9f4 0%, #fff0f0 100%);
  border: 1.5px solid rgba(251, 17, 20, 0.2);
  border-radius: 14px;
  padding: 6px;
  z-index: 500;
  box-shadow: 0 8px 24px rgba(251, 17, 20, 0.15);
  animation: catDropdownIn 0.18s ease-out;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@keyframes catDropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.cat-mini-dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #991b1b;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.cat-mini-dropdown__item:hover {
  background: linear-gradient(135deg, rgba(251,17,20,0.12), rgba(251,17,20,0.06));
  color: #dc2626;
}
.cat-mini-dropdown__item.is-active {
  background: linear-gradient(135deg, rgba(251,17,20,0.18), rgba(251,17,20,0.1));
  color: #b91c1c;
  font-weight: 700;
}
.cat-mini-dropdown__item-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(251,17,20,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

/* [#v5.9.2] Also make source mini dropdown warm white + red gradient */
.source-mini-dropdown {
  background: linear-gradient(180deg, #fff9f4 0%, #fff0f0 100%) !important;
  border: 1.5px solid rgba(251, 17, 20, 0.2) !important;
  box-shadow: 0 8px 24px rgba(251, 17, 20, 0.15) !important;
}
.source-mini-dropdown__item {
  color: #991b1b !important;
}
.source-mini-dropdown__item:hover {
  background: linear-gradient(135deg, rgba(251,17,20,0.12), rgba(251,17,20,0.06)) !important;
  color: #dc2626 !important;
}
.source-mini-dropdown__item.is-active {
  background: linear-gradient(135deg, rgba(251,17,20,0.18), rgba(251,17,20,0.1)) !important;
  color: #b91c1c !important;
}
.source-mini-dropdown__item-icon {
  background: rgba(251,17,20,0.1) !important;
}
.source-mini-dropdown__unlock {
  color: #7c3aed !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
  background: rgba(168, 85, 247, 0.05) !important;
}
.source-mini-dropdown__unlock:hover {
  background: rgba(168, 85, 247, 0.12) !important;
}

/* Mobile sizing for categories dropdown */
@media (max-width: 768px) {
  .cat-mini-dropdown { min-width: 140px; max-width: 180px; font-size: 11px; }
  .cat-mini-dropdown__item { padding: 6px 10px; font-size: 11px; }
  .cat-mini-dropdown__item-icon { width: 16px; height: 16px; font-size: 9px; }
}


/* [#v5.9.3] Hide scrollbar on dropdowns */
.cat-mini-dropdown::-webkit-scrollbar,
.source-mini-dropdown::-webkit-scrollbar {
  display: none;
}
.cat-mini-dropdown,
.source-mini-dropdown {
  -ms-overflow-style: none;
  scrollbar-width: none;
}