/*
 * Motchill style bundle — v1.0.15 (OP_THEME_VER_STYLE) — gồm base + pagination/filter + search
 * Homepage: motchill-mobile-final.css (header/grid giống trang trong) → file này.
 * Inner pages: legacy bundle → mobile-final → glass → file này (chrome + section 17).
 */

/* ═══════════════════════════════════════
   1. CUSTOM PROPERTIES
   ═══════════════════════════════════════ */
:root {
  /* Accent trung tính, ít “màu mè” — slate xám-xanh nhẹ */
  --accent: #a3aab8;
  --accent-2: #7e8694;
  --accent-grad: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.06) 100%);
  --surface-0: #0b0b0c;
  --surface-1: rgba(22, 22, 26, 0.65);
  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-bg-hover: rgba(255, 255, 255, 0.055);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-hover: rgba(255, 255, 255, 0.14);
  --glass-blur: blur(14px) saturate(118%);
  --glass-blur-heavy: blur(22px) saturate(125%);
  --glass-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  --text-1: rgba(255, 255, 255, 0.94);
  --text-2: rgba(255, 255, 255, 0.58);
  --text-3: rgba(255, 255, 255, 0.38);
  --header-h: 90px;
  --header-height: var(--header-h);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gap: 15px;
  --gap-sm: 8px;
  --gap-lg: 20px;
  --radius: 12px;
  --container: 1200px;
  --font: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  /* Badge / thương hiệu — dùng có chừng, tách vị trí */
  --badge-episode-grad: linear-gradient(135deg, #2563eb 0%, #4f46e5 48%, #7c3aed 100%);
  --badge-lang-grad: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  --tmdb-navy: #0d253f;
  --tmdb-green: #01d277;
  --tmdb-cyan: #01b4e4;
  --tmdb-mint: #90cea1;
  --tmdb-ink: #032541;
  --trailer-soon-grad: linear-gradient(135deg, #a855f7 0%, #db2777 100%);
  --trailer-thumb-grad: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  /* Slide poster / slider ngang — cùng tông badge tập (xanh–indigo) */
  --wg-slide-line: linear-gradient(90deg, #3b82f6 0%, #6366f1 45%, #8b5cf6 100%);
  --wg-slide-accent: #60a5fa;
  --wg-slide-accent-2: #a78bfa;
  --wg-slide-soft: rgba(59, 130, 246, 0.14);
  --wg-slide-border: rgba(96, 165, 250, 0.35);
  /* Most viewed / xem nhiều — tông lửa (fa-fire) */
  --wg-most-line: linear-gradient(90deg, #fb923c 0%, #f97316 50%, #ef4444 100%);
  --wg-most-rank-grad: linear-gradient(145deg, #fb923c 0%, #ea580c 55%, #dc2626 100%);
  --wg-most-icon: #fb923c;
  --wg-most-soft: rgba(249, 115, 22, 0.1);
  --wg-most-border: rgba(251, 146, 60, 0.35);
  /* Search tokens (merged from old motchill-search-global.css) */
  --mc-search-bg: rgba(255, 255, 255, 0.05);
  --mc-search-bg-focus: rgba(255, 255, 255, 0.08);
  --mc-search-border: rgba(255, 255, 255, 0.1);
  --mc-search-border-strong: rgba(255, 255, 255, 0.22);
  --mc-search-ring: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 24px rgba(0, 0, 0, 0.2);
  --mc-search-accent: #667eea;
  --mc-search-accent-2: #764ba2;
  --mc-search-placeholder: rgba(255, 255, 255, 0.45);
  --mc-search-pill-radius: 25px;
  --mc-search-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ═══════════════════════════════════════
   2. BASE
   ═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--surface-0); color: #fff; font-family: var(--font); }
/* Global typography baseline (moved from motchill-optimized.css) */
body,
html,
h1,
h2,
h3,
h4,
h5,
h6,
p,
div,
span,
a,
li,
ul,
ol,
input,
button,
textarea,
select {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
.fontcafe,
*[style*="font-family"] {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
body { padding-top: var(--header-h); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.lazyload, .lazyloading { opacity: 0; }
.lazyloaded { opacity: 1; transition: opacity 0.4s var(--ease); }
.hidden { display: none !important; }
.container { max-width: var(--container); margin: 0 auto; width: 100%; padding: 0 15px; background: transparent; }

/* ═══════════════════════════════════════
   3. HEADER — frosted glass
   ═══════════════════════════════════════ */
.motchill-header {
  position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 1000;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  transform: translateZ(0);
}
.motchill-header .container { max-width: var(--container); padding: 0 15px; }

/* Top bar */
.motchill-top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 0; gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Logo */
.motchill-logo { flex: 0 0 auto; min-width: 100px; display: flex; }
.motchill-logo a { display: block; }
.motchill-logo img { max-height: 45px; width: auto; filter: brightness(1.1); }
.motchill-logo span { color: #fff; font-size: 24px; font-weight: 700; }

/* User actions */
.motchill-user-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; justify-content: flex-end; }
.motchill-user-action {
  display: flex; align-items: center; gap: 6px; color: #fff;
  padding: 6px 12px; border-radius: 15px; font-size: 13px; font-weight: 500;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.25s var(--ease);
}
.motchill-user-action:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }
.motchill-user-action i { font-size: 15px; }
.motchill-user-action .motchill-user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bookmark-count { background: rgba(180, 90, 98, 0.92); color: #fff; border-radius: 10px; padding: 1px 6px; font-size: 11px; font-weight: 700; min-width: 18px; text-align: center; }

/* ═══════════════════════════════════════
   4. NAV — glass bar
   ═══════════════════════════════════════ */
.motchill-nav {
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
/* Chỉ hàng menu chính là flex — tránh submenu <ul> bị flex ngang (Năm / Ngôn ngữ / …) */
.motchill-nav > ul {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  max-width: var(--container);
}
.motchill-nav li { position: relative; }
/* Chỉ mục trên hàng menu — không đè padding/transform lên link trong dropdown */
.motchill-nav > ul > li > a {
  display: block;
  padding: 16px 22px;
  color: var(--text-1);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.2px;
  border-radius: 8px;
  margin: 0 3px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.motchill-nav > ul > li > a:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
  box-shadow: none;
}
.motchill-nav .motchill-nav-chevron { margin-left: 5px; font-size: 12px; opacity: 0.85; }

/* Submenu: mặc định 1 cột; ≥9 mục → 2 cột (giảm chiều cao) — :has() ~ Chrome 105+, Safari 15.4+ */
.motchill-submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  display: block;
  list-style: none;
  margin: 0;
  padding: 8px;
  min-width: 220px;
  max-width: min(92vw, 360px);
  width: max-content;
  max-height: min(65vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(15, 18, 28, 0.96);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  transform: translateY(-6px);
  transition: opacity 0.28s var(--ease), visibility 0.28s var(--ease), transform 0.28s var(--ease);
}
.motchill-nav .menu-item.has-children > .motchill-submenu:has(> li:nth-child(9)) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 2px;
  align-content: start;
  min-width: 300px;
  max-width: min(92vw, 520px);
  width: auto;
}
.motchill-nav li:hover > .motchill-submenu,
.motchill-nav li:focus-within > .motchill-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.motchill-submenu li {
  border-bottom: none;
  padding: 0;
  display: block;
  width: 100%;
  min-width: 0;
}
.motchill-nav .motchill-submenu li a {
  display: block;
  width: 100%;
  padding: 9px 12px;
  color: #d4d8e2;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  border-radius: 8px;
  margin: 0;
  white-space: normal;
  word-break: break-word;
  transform: none;
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}
.motchill-nav .motchill-submenu li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: none;
}

/* Thể loại / Quốc gia: cùng luật 1–2 cột (không ép display để :has 2 cột còn hiệu lực) */
.motchill-nav .menu-item-the-loai .motchill-submenu,
.motchill-nav .menu-item-quoc-gia .motchill-submenu {
  min-width: 260px;
  max-width: min(92vw, 520px);
  max-height: min(65vh, 440px);
}
.motchill-nav .menu-item-the-loai .motchill-submenu li a strong,
.motchill-nav .menu-item-quoc-gia .motchill-submenu li a strong { font-weight: 600; }

/* Desktop ≥1024px: giữ đồng bộ (trùng với base; media để override file khác nếu có) */
@media (min-width: 1024px) {
  .motchill-nav .menu-item.has-children > .motchill-submenu {
    left: 0;
    transform: translateY(-6px);
  }
  .motchill-nav .menu-item.has-children:hover > .motchill-submenu,
  .motchill-nav .menu-item.has-children:focus-within > .motchill-submenu {
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════
   6. MOBILE UI — hamburger, sidebar, search
   ═══════════════════════════════════════ */
:root { --icon-size: clamp(36px, 10vw, 44px); }
.mobile-buttons, .mobile-search-button, .mobile-search-container { display: none; }

/* Hamburger button — glass pill */
.mobile-buttons { flex: 0 0 var(--icon-size); }
.mobile-hamburger {
  width: var(--icon-size); height: var(--icon-size);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; border-radius: 10px;
  cursor: pointer; position: relative; z-index: 10; overflow: hidden;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.mobile-hamburger:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2); }
.mobile-hamburger:active { transform: translateY(0) scale(0.96); }
.mobile-hamburger::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; }
.mobile-hamburger:active::before { width: 100px; height: 100px; }

.hamburger-lines { width: 20px; height: 16px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.hamburger-lines span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: transform 0.28s var(--ease), opacity 0.28s var(--ease); }
.mobile-hamburger.active .hamburger-lines span:nth-child(1) { transform: rotate(45deg) translateY(7px) translateX(7px); }
.mobile-hamburger.active .hamburger-lines span:nth-child(2) { opacity: 0; transform: translateX(-20px); }
.mobile-hamburger.active .hamburger-lines span:nth-child(3) { transform: rotate(-45deg) translateY(-7px) translateX(7px); }
.mobile-hamburger.active { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.22); box-shadow: none; }

/* Mobile sidebar */
.mobile-sidebar {
  position: fixed; top: 0; left: -280px; width: 280px; height: 100vh; z-index: 2000;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: var(--glass-blur-heavy); -webkit-backdrop-filter: var(--glass-blur-heavy);
  transition: left 0.3s var(--ease); overflow-y: auto; padding: 20px;
}
.mobile-sidebar.active { left: 0; }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); margin-bottom: 15px; }
.mobile-menu-title { color: #fff; font-size: 18px; font-weight: 600; }
.mobile-nav { padding: 0; margin: 0; }
a.mobile-menu-item { display: flex; align-items: center; gap: 10px; padding: 14px 0; color: var(--text-1); font-size: 15px; font-weight: 500; border-bottom: 1px solid rgba(255, 255, 255, 0.04); transition: color 0.2s; }
a.mobile-menu-item:hover { color: var(--accent); }
a.mobile-menu-item i { width: 20px; text-align: center; color: var(--accent); font-size: 14px; }
.mobile-submenu { padding: 0 0 0 30px; display: none; }
.mobile-submenu.active { display: block; }
a.mobile-submenu-item { display: block; padding: 10px 0; font-size: 14px; color: var(--text-2); border-bottom: 1px solid rgba(255, 255, 255, 0.03); transition: color 0.2s; }
a.mobile-submenu-item:hover { color: var(--accent); }

.mobile-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 1999; opacity: 0; visibility: hidden; transition: all 0.3s; }
.mobile-overlay.active { opacity: 1; visibility: visible; }

/* ═══════════════════════════════════════
   7. HOMEPAGE LAYOUT
   ═══════════════════════════════════════ */
.motchill-homepage { background: var(--surface-0); min-height: 100vh; margin: 0; padding: 0; }
/* Chỉ hở nhẹ dưới header (body đã padding-top --header-h) */
.homepage-slider-full { margin-top: 12px; }
.homepage-container { padding-top: 50px; margin-top: 0; background: var(--surface-0); max-width: var(--container); margin-left: auto; margin-right: auto; }
.homepage-layout { display: flex; gap: 30px; align-items: flex-start; }
.homepage-main { flex: 0 0 70%; min-width: 0; }
.homepage-sidebar { flex: 0 0 30%; max-width: 30%; margin-top: 30px; padding-right: 15px; }
.additional-widgets { margin-top: 0; }
.homepage-skeleton { display: none; }

/* ═══════════════════════════════════════
   8. SECTION CARDS — glass (chỉ .homepage-section mặc định; sidebar xử lý block riêng — flat)
   ═══════════════════════════════════════ */
.homepage-section {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: 16px;
  box-shadow: var(--glass-shadow); padding: 15px; margin-bottom: 20px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
/* Nội dung chính: bỏ khung glass — flat như demo (lưới phim nổi trên nền trang) */
.homepage-main .homepage-section {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 28px 0;
  margin-bottom: 8px;
}
.homepage-main .homepage-section:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}
.homepage-section:hover { border-color: var(--glass-border-hover); box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28); transform: translateY(-1px); }
/* Ophim Slider (widget-slider-poster): wg .homepage-section — flat + tiêu đề gọn */
.homepage-slider-full .homepage-section {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 22px 0;
  margin-bottom: 6px;
}
.homepage-slider-full .homepage-section:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

/* Cột phải: flat — không glass (đã tách khỏi block §8; specificity > .wg-* mặc định §13b) */
.homepage-sidebar .most-view,
.homepage-sidebar .trailer,
.homepage-sidebar .homepage-section {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 22px 0;
  margin-bottom: 14px;
}
.homepage-sidebar .wg-tmdb-widget,
.homepage-sidebar .wg-most-viewed-widget,
.homepage-sidebar .trailer-compact-widget {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 22px 0;
  margin-bottom: 14px;
}
.homepage-sidebar .most-view:hover,
.homepage-sidebar .trailer:hover,
.homepage-sidebar .homepage-section:hover,
.homepage-sidebar .wg-tmdb-widget:hover,
.homepage-sidebar .wg-most-viewed-widget:hover,
.homepage-sidebar .trailer-compact-widget:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

/* Tiêu đề wg: gạch gradient mỏng 1px vừa khít icon + chữ — không kéo full khối header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-top: 16px;
  padding-bottom: 4px;
  position: relative;
  border-bottom: none;
}
.section-header::after {
  display: none;
}
.section-header .section-title {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.3px;
  line-height: 1.3;
  position: relative;
  width: fit-content;
  max-width: 100%;
  flex: 0 1 auto;
  min-width: 0;
  padding: 0 0 8px 0;
  box-sizing: border-box;
}
.section-header .section-title::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  border-radius: 1px;
  background: linear-gradient(90deg, #fb923c 0%, #f472b6 50%, #e879f9 100%);
  pointer-events: none;
}
.section-header .section-title i {
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
}

/* Chiếu rạp / slider: không kẻ ngang full width (ưu tiên specificity theme, không !important) */
.homepage-main .section-header,
.homepage-slider-full .section-header,
.motchill-homepage .wg-theater-section .section-header {
  border-bottom: none;
  box-shadow: none;
  background: transparent;
}
.homepage-main .wg-theater-section .theater-year-tabs,
.homepage-slider-full .wg-theater-section .theater-year-tabs,
.wg-theater-section .theater-year-tabs {
  border-top: none;
  box-shadow: none;
}

.section-more { color: var(--text-2); font-size: 13px; font-weight: 400; display: flex; align-items: center; gap: 5px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; padding: 5px 14px; transition: all 0.25s var(--ease); }
.section-more:hover { color: var(--accent); border-color: rgba(136, 140, 153, 0.3); background: rgba(136, 140, 153, 0.08); }
.section-content { position: relative; }

.widget-placeholder, .slider-placeholder {
  background: var(--glass-bg); border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius); padding: 40px 20px; text-align: center; color: #999; font-size: 14px;
}
.slider-placeholder { padding: 60px 20px; border-radius: var(--radius); font-size: 16px; }

.additional-widgets .widget { background: var(--glass-bg); border-radius: var(--radius); padding: 25px; margin-bottom: 30px; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
.additional-widgets .widget-title { color: #fff; font-size: 18px; font-weight: 600; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid rgba(136, 140, 153, 0.15); }

/* ═══════════════════════════════════════
   9. MOVIE CARDS (.list-films)
   ═══════════════════════════════════════ */
.list-films { background: transparent; border: none; padding: 0; margin-bottom: 20px; }
.list-films ul { display: flex; flex-wrap: wrap; gap: var(--gap); padding: 0; margin: 0; list-style: none; }

/* Thẻ phim: flat / clean — không khung đen; hover nhẹ chỉ trên ảnh (scale trong link) */
.list-films .item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  box-shadow: none;
}
.list-films .item:hover {
  transform: none;
  z-index: 1;
  border-color: transparent;
  box-shadow: none;
}
.list-films .item > a {
  display: block;
  position: relative;
  margin: 0;
  padding: 0;
  line-height: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

/* Ảnh poster: zoom nhẹ khi hover (chỉ ảnh trong link; transition không dùng !important) */
.list-films .item > a img.img-film,
.list-films .item > a img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  background: transparent;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.38s var(--ease), filter 0.35s ease;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.list-films .item:hover > a img.img-film,
.list-films .item:hover > a img {
  transform: scale(1.05);
  filter: brightness(1.06);
}
.list-films .item img {
  border-radius: var(--radius);
}

@media (prefers-reduced-motion: reduce) {
  .list-films .item > a img {
    transition: none;
  }
  .list-films .item:hover > a img {
    transform: none;
    filter: none;
  }
}

/* Name overlay */
.list-films .item .name {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 10px 12px; border-radius: 0 0 var(--radius) var(--radius);
  color: #fff; z-index: 3; min-height: 48px;
  transition: all 0.3s ease;
}
.list-films .item .name-title { color: #fff; font-size: 13px; font-weight: 500; line-height: 1.2; margin: 0 0 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.2px; }
.list-films .item .name-title a { color: #fff; }
.list-films .item:hover .name-title a { color: var(--text-1); text-shadow: none; }
.list-films .item .original-title-home { color: var(--text-2); font-size: 11px; font-weight: 300; line-height: 1.2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Play icon */
.list-films .item .icon-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 50px; height: 50px; background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  opacity: 0; z-index: 4; cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: all 0.3s var(--ease);
}
.list-films .item .icon-play::before { content: ""; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; margin-left: 2px; display: block; }
.list-films .item:hover .icon-play {
  opacity: 1;
  background: rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.list-films .item:hover .name {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

/* ═══════════════════════════════════════
   10. BADGES / LABELS
   ═══════════════════════════════════════ */
.list-films .item .label-episode,
.list-films .item .label-language { position: absolute; z-index: 6; }

.list-films .item .label-episode {
  top: 8px; left: 8px;
  background-image: var(--badge-episode-grad);
  color: #fff; font-size: 10px; font-weight: 700; padding: 5px 10px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.35px; white-space: nowrap; line-height: 1.2;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s var(--ease);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.list-films .item .badges-top-left {
  position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; z-index: 6; flex-wrap: nowrap; max-width: calc(100% - 16px); align-items: center;
}
.list-films .item .badges-top-left .label-episode { position: static; flex-shrink: 0; }

.list-films .item .label-language {
  position: absolute; bottom: 54px; right: 8px;
  background-image: var(--badge-lang-grad);
  color: #fff; font-size: 9px; font-weight: 700; padding: 4px 8px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.35px; white-space: nowrap; line-height: 1.2;
  max-width: 80%; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 2px 12px rgba(234, 88, 12, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.list-films .item .tmdb-rating {
  position: static;
  background: linear-gradient(145deg, rgba(13, 37, 63, 0.96) 0%, rgba(15, 45, 72, 0.98) 100%);
  color: rgba(255, 255, 255, 0.95);
  font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 3px; line-height: 1.2; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(1, 210, 119, 0.12), 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: all 0.3s var(--ease);
  border: 1px solid rgba(1, 180, 228, 0.28);
}
.list-films .item .tmdb-rating .fa-star { color: var(--tmdb-green); font-size: 9px; filter: drop-shadow(0 0 4px rgba(1, 210, 119, 0.35)); }

/* ═══════════════════════════════════════
   11. HOMEPAGE WIDGET GRID (items-4/5/6)
   ═══════════════════════════════════════ */
body .homepage-section.items-4 .list-films .item,
body .homepage-section.items-4 .list-films ul li.item { flex: 0 0 calc((100% - 45px) / 4); max-width: calc((100% - 45px) / 4); }
body .homepage-section.items-5 .list-films .item,
body .homepage-section.items-5 .list-films ul li.item { flex: 0 0 calc((100% - 60px) / 5); max-width: calc((100% - 60px) / 5); }
body .homepage-section.items-6 .list-films .item,
body .homepage-section.items-6 .list-films ul li.item { flex: 0 0 calc((100% - 75px) / 6); max-width: calc((100% - 75px) / 6); }

/* ═══════════════════════════════════════
   12. SIDEBAR
   ═══════════════════════════════════════ */
.homepage-sidebar .homepage-section:first-child { margin-top: 0; }
.homepage-sidebar .homepage-section:not(:first-child) { margin-top: 30px; }

/* Caption / title */
.homepage-sidebar .most-view .caption,
.homepage-sidebar .trailer .caption { margin-bottom: 20px; padding-bottom: 12px; position: relative; }
.homepage-sidebar .most-view .caption::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 44px; height: 2px;
  background: var(--wg-most-line); border-radius: 2px;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.3);
}
.homepage-sidebar .trailer .caption::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background: var(--accent-grad); border-radius: 2px; }
.homepage-sidebar .most-view .caption span,
.homepage-sidebar .trailer .caption span { color: #fff; font-size: 16px; font-weight: 600; margin: 0; letter-spacing: 0.5px; }

/* Tabs */
.most-view.has-view-tabs .caption-with-tabs,
.trailer.has-view-tabs .caption-with-tabs { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 16px; border-bottom: none; padding-bottom: 10px; margin-bottom: 0; position: relative; }
.most-view.has-view-tabs .caption-title,
.trailer.has-view-tabs .caption-title { flex-shrink: 0; font-size: 18px; font-weight: 700; color: var(--text-1); position: relative; padding-bottom: 8px; }
.most-view.has-view-tabs .caption-title::after,
.trailer.has-view-tabs .caption-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 48px; height: 2px; background: var(--accent-grad); border-radius: 2px; }
.most-view.has-view-tabs .caption-title .fa-fire { color: var(--wg-most-icon); margin-right: 6px; filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.35)); }
.trailer.has-view-tabs .caption-title .fa-fire { color: var(--accent); margin-right: 6px; opacity: 0.85; }

.sidebar-view-tabs { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sidebar-view-tab { padding: 4px 12px; font-size: 13px; font-weight: 500; color: var(--text-2); background: transparent; border: none; cursor: pointer; transition: all 0.2s var(--ease); border-radius: 6px; position: relative; }
.sidebar-view-tab:hover { color: rgba(255, 255, 255, 0.9); }
.sidebar-view-tab.active { color: #fff; background: rgba(255, 255, 255, 0.08); padding: 6px 14px; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-view-tab.loading { opacity: 0.7; cursor: wait; }

/* Tab Ngày / Tuần / Tháng — màu phân biệt (slide poster / slider + sidebar xem nhiều) */
.homepage-slider-full .sidebar-view-tabs,
.motchill-slider .sidebar-view-tabs,
.homepage-sidebar .has-view-tabs .sidebar-view-tabs {
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.homepage-slider-full .sidebar-view-tab,
.motchill-slider .sidebar-view-tab,
.homepage-sidebar .has-view-tabs .sidebar-view-tab {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
}
/* Ngày — cyan / sky */
.homepage-slider-full .sidebar-view-tab[data-timeframe="day"],
.motchill-slider .sidebar-view-tab[data-timeframe="day"],
.homepage-sidebar .has-view-tabs .sidebar-view-tab[data-timeframe="day"] {
  color: rgba(125, 211, 252, 0.92);
  border-color: rgba(56, 189, 248, 0.28);
}
.homepage-slider-full .sidebar-view-tab[data-timeframe="day"]:hover,
.motchill-slider .sidebar-view-tab[data-timeframe="day"]:hover,
.homepage-sidebar .has-view-tabs .sidebar-view-tab[data-timeframe="day"]:hover {
  color: #f0f9ff;
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
}
.homepage-slider-full .sidebar-view-tab[data-timeframe="day"].active,
.motchill-slider .sidebar-view-tab[data-timeframe="day"].active,
.homepage-sidebar .has-view-tabs .sidebar-view-tab[data-timeframe="day"].active {
  color: #082f49;
  font-weight: 700;
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 55%, #0ea5e9 100%);
  border-color: rgba(186, 230, 253, 0.55);
  box-shadow: 0 2px 14px rgba(14, 165, 233, 0.35);
  padding: 6px 14px;
}
/* Tuần — tím / indigo */
.homepage-slider-full .sidebar-view-tab[data-timeframe="week"],
.motchill-slider .sidebar-view-tab[data-timeframe="week"],
.homepage-sidebar .has-view-tabs .sidebar-view-tab[data-timeframe="week"] {
  color: rgba(196, 181, 253, 0.95);
  border-color: rgba(139, 92, 246, 0.3);
}
.homepage-slider-full .sidebar-view-tab[data-timeframe="week"]:hover,
.motchill-slider .sidebar-view-tab[data-timeframe="week"]:hover,
.homepage-sidebar .has-view-tabs .sidebar-view-tab[data-timeframe="week"]:hover {
  color: #f5f3ff;
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(167, 139, 250, 0.45);
}
.homepage-slider-full .sidebar-view-tab[data-timeframe="week"].active,
.motchill-slider .sidebar-view-tab[data-timeframe="week"].active,
.homepage-sidebar .has-view-tabs .sidebar-view-tab[data-timeframe="week"].active {
  color: #f5f3ff;
  font-weight: 700;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 55%, #4f46e5 100%);
  border-color: rgba(196, 181, 253, 0.4);
  box-shadow: 0 2px 14px rgba(99, 102, 241, 0.38);
  padding: 6px 14px;
}
/* Tháng — cam / amber */
.homepage-slider-full .sidebar-view-tab[data-timeframe="month"],
.motchill-slider .sidebar-view-tab[data-timeframe="month"],
.homepage-sidebar .has-view-tabs .sidebar-view-tab[data-timeframe="month"] {
  color: rgba(253, 224, 71, 0.95);
  border-color: rgba(245, 158, 11, 0.32);
}
.homepage-slider-full .sidebar-view-tab[data-timeframe="month"]:hover,
.motchill-slider .sidebar-view-tab[data-timeframe="month"]:hover,
.homepage-sidebar .has-view-tabs .sidebar-view-tab[data-timeframe="month"]:hover {
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(251, 191, 36, 0.45);
}
.homepage-slider-full .sidebar-view-tab[data-timeframe="month"].active,
.motchill-slider .sidebar-view-tab[data-timeframe="month"].active,
.homepage-sidebar .has-view-tabs .sidebar-view-tab[data-timeframe="month"].active {
  color: #1c1917;
  font-weight: 700;
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 50%, #d97706 100%);
  border-color: rgba(253, 224, 71, 0.55);
  box-shadow: 0 2px 14px rgba(245, 158, 11, 0.35);
  padding: 6px 14px;
}

.most-view.has-view-tabs .wg-sidebar-view-body,
.trailer.has-view-tabs .wg-sidebar-view-body { margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* Sidebar list — text style */
.homepage-sidebar .most-view .list-film { margin: 0; padding: 0; list-style: none; }
.homepage-sidebar .most-view .list-film .item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px; margin-bottom: 12px; min-height: 60px;
  transition: all 0.25s var(--ease);
}
.homepage-sidebar .most-view .list-film .item:hover { background: var(--wg-most-soft); border-color: var(--wg-most-border); transform: translateX(3px); }

.homepage-sidebar .most-view .list-film .item .number-rank {
  background-image: var(--wg-most-rank-grad);
  color: #fff;
  width: 25px; height: 25px; min-width: 25px; max-width: 25px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; flex-shrink: 0; position: relative;
  top: auto; left: auto; transform: none; margin-right: 12px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.homepage-sidebar .most-view .list-film .item .number-rank.absolute { position: relative; top: auto; left: auto; right: auto; bottom: auto; }

.homepage-sidebar .most-view .list-film .item span { flex: 1; margin-left: 0; display: flex; flex-direction: column; }
.homepage-sidebar .most-view .list-film .item span a { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3; display: block; margin-bottom: 3px; white-space: normal; overflow: hidden; text-overflow: ellipsis; word-break: break-word; }
.homepage-sidebar .most-view .list-film .item span a:hover { color: var(--wg-most-icon); }
.homepage-sidebar .most-view .list-film .item .count_view { color: rgba(253, 186, 116, 0.95); font-size: 11px; font-weight: 600; margin-top: 3px; display: block; width: 100%; }

/* Sidebar list — thumb style */
.homepage-sidebar .trailer .list-film { margin: 0; padding: 0; list-style: none; }
.homepage-sidebar .trailer .list-film .film-item-ver {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px; margin-bottom: 12px;
  transition: all 0.25s var(--ease);
}
.homepage-sidebar .trailer .list-film .film-item-ver:hover { background: rgba(136, 140, 153, 0.08); border-color: rgba(136, 140, 153, 0.12); transform: translateX(3px); }
.homepage-sidebar .trailer .list-film .film-item-ver a { width: 50px; height: 70px; border-radius: 6px; overflow: hidden; flex-shrink: 0; display: block; }
.homepage-sidebar .trailer .list-film .film-item-ver .avatar { width: 100%; height: 100%; object-fit: cover; }
.homepage-sidebar .trailer .list-film .film-item-ver .title { flex: 1; display: flex; flex-direction: column; }
.homepage-sidebar .trailer .list-film .film-item-ver .title .name { margin: 0 0 3px 0; font-size: 13px; font-weight: 600; line-height: 1.2; }
.homepage-sidebar .trailer .list-film .film-item-ver .title .name a { color: #fff; width: auto; height: auto; border-radius: 0; overflow: visible; flex-shrink: 1; display: inline; }
.homepage-sidebar .trailer .list-film .film-item-ver .title .name a:hover { color: var(--accent); }
.homepage-sidebar .trailer .list-film .film-item-ver .title .real-name { color: var(--text-2); font-size: 11px; margin: 0 0 2px 0; line-height: 1.3; }
.homepage-sidebar .trailer .list-film .film-item-ver .title .episode-label { color: var(--text-3); font-size: 10px; font-style: italic; margin: 0 0 3px 0; line-height: 1.2; }
.homepage-sidebar .trailer .list-film .film-item-ver .top-star { color: #fbbf24; font-size: 11px; margin-top: 3px; display: flex; align-items: center; gap: 3px; }
.homepage-sidebar .trailer .list-film .film-item-ver .top-star i.fa-star,
.homepage-sidebar .trailer .list-film .film-item-ver .top-star i.fa-star-half-o { color: #fbbf24; }
.homepage-sidebar .trailer .list-film .film-item-ver .top-star i.fa-star-o { color: rgba(255, 255, 255, 0.3); }
.homepage-sidebar .trailer .list-film .film-item-ver .top-star .rating-number { color: var(--text-2); font-size: 10px; margin-left: 3px; font-weight: 600; }
.homepage-sidebar .trailer .list-film .film-item-ver .top-star[style*="width"] { width: auto !important; max-width: 100%; }

.view-more { text-align: center; margin-top: 15px; padding: 10px 0; }
.view-more .section-more,
.homepage-sidebar .view-more a {
  color: var(--accent); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(136, 140, 153, 0.2); border-radius: 20px; padding: 6px 16px;
  transition: all 0.25s var(--ease);
}
.view-more .section-more:hover,
.homepage-sidebar .view-more a:hover { background: rgba(136, 140, 153, 0.08); border-color: rgba(136, 140, 153, 0.35); }

/* ═══════════════════════════════════════
   13. SLIDER SECTION (slider_simple)
   ═══════════════════════════════════════ */
.motchill-slider {
  background: transparent; border-radius: 0; padding: 12px 0 0 0; margin: 0 0 50px 0;
  box-shadow: none; border: none; position: relative; overflow: visible;
  width: 100%; max-height: 400px; height: auto;
}
.motchill-slider::before { display: none; }

.motchill-slider-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 0; margin-bottom: 20px; padding-bottom: 14px;
  position: relative; z-index: 10;
}
.motchill-slider-header::after { content: ''; position: absolute; bottom: 0; left: 0; width: 88px; height: 2px; background: var(--wg-slide-line); border-radius: 2px; box-shadow: 0 0 12px rgba(59, 130, 246, 0.35); }

.motchill-slider-title {
  color: #fff; font-size: 28px; font-weight: 600; margin: 0;
  display: flex; align-items: center; gap: 10px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  position: relative; z-index: 10; letter-spacing: 0.3px;
}
.motchill-slider-title i { color: var(--wg-slide-accent); font-size: 20px; filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.45)); }
.motchill-slider-more {
  color: var(--wg-slide-accent); border: 1px solid var(--wg-slide-border);
  padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 500;
  transition: all 0.25s var(--ease);
}
.motchill-slider-more:hover {
  background: var(--wg-slide-soft); border-color: rgba(96, 165, 250, 0.55); color: #e0e7ff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

/* Slider container + horizontal scroll */
.motchill-slider-container {
  position: relative; border-radius: 10px; width: 100%;
  max-width: var(--container); margin: 0 auto; padding: 0;
  overflow: visible;
}
.motchill-slider-items {
  display: flex; width: 100%;
  overflow-x: auto; overflow-y: hidden;
  gap: 15px; padding: 0; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
  cursor: grab; user-select: none;
}
.motchill-slider-items:active { cursor: grabbing; }
.motchill-slider-items::-webkit-scrollbar { display: none; }

/* Slider item card
   Chiều cao poster ≈ width × 3/2 (tỉ lệ 2:3). Desktop ≥744px: poster-container dùng aspect-ratio 2/3.
   Card cố định 220px → chiều cao ảnh ~330px (DevTools có thể ~333 do làm tròn/viền).
   Lưới .list-films trên cột main: độ rộng ô = (100% − khe flex) / n cột → ô thường hẹp hơn 220px → poster thấp hơn (vd ~290–295px). Không phải bug — khác độ rộng ô. */
.motchill-slider-item {
  flex: 0 0 220px; max-width: 220px; width: 220px;
  background: transparent; border-radius: 20px; overflow: hidden;
  position: relative; display: block; opacity: 1; visibility: visible;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); border: none;
  min-height: auto; height: auto; pointer-events: auto;
  transition: all 0.3s var(--ease);
}
.motchill-slider-item:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(99, 102, 241, 0.22);
  border-color: transparent; z-index: 10;
}
.motchill-slider-item a { display: block; position: relative; text-decoration: none; }

/* Poster with clip-path */
.motchill-slider-item .poster-container {
  position: relative; flex: 1; overflow: hidden;
  border-radius: 16px; background: transparent;
  transform: scale(1.02); margin: -2px;
  height: 340px; width: 100%;
  clip-path: polygon(0 15%, 100% 0%, 100% 100%, 0 100%);
}
.motchill-slider-item:nth-child(odd) .poster-container { clip-path: polygon(0 0%, 100% 15%, 100% 100%, 0 100%); }
.motchill-slider-item:nth-child(even) .poster-container { clip-path: polygon(0 15%, 100% 0%, 100% 100%, 0 100%); }

.motchill-slider-item img {
  width: 100%; height: 340px; max-height: 340px;
  object-fit: cover; object-position: center top;
  border-radius: 8px; border: 2px solid rgba(96, 165, 250, 0.12);
  transition: all 0.3s var(--ease); filter: brightness(0.95);
}
.motchill-slider-item:hover img { transform: scale(1.05); filter: brightness(1.05); border-color: rgba(96, 165, 250, 0.35); }

/* Desktop: poster chuẩn dọc 2:3, GIỮ clip-path xéo như demo */
@media (min-width: 744px) {
  .motchill-slider-item .poster-container {
    position: relative;
    height: auto;
    aspect-ratio: 2 / 3;
    width: 100%;
    clip-path: polygon(0 10%, 100% 0%, 100% 100%, 0 100%);
    transform: none;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
  }
  .motchill-slider-item:nth-child(odd) .poster-container,
  .motchill-slider-item:nth-child(even) .poster-container {
    clip-path: polygon(0 10%, 100% 0%, 100% 100%, 0 100%);
  }
  .motchill-slider-item:nth-child(odd) .poster-container {
    clip-path: polygon(0 0%, 100% 10%, 100% 100%, 0 100%);
  }
  .motchill-slider-item:nth-child(even) .poster-container {
    clip-path: polygon(0 10%, 100% 0%, 100% 100%, 0 100%);
  }
  .motchill-slider-item .poster-container > a {
    position: absolute;
    inset: 0;
    display: block;
    line-height: 0;
  }
  .motchill-slider-item .poster-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center top;
  }
}

/* Info section */
.motchill-slider-item .motchill-info {
  padding: 8px; background: transparent; flex-shrink: 0;
  position: relative; overflow: visible;
  display: flex; align-items: flex-start; gap: 8px;
  min-height: 80px; opacity: 1; visibility: visible;
}
.motchill-slider-item .ranking-number-new {
  font-size: 48px; font-weight: 800;
  background: linear-gradient(180deg, #fde68a 0%, #f59e0b 55%, #d97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fbbf24;
  text-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  line-height: 1; font-family: Arial, sans-serif;
  width: 60px; text-align: center;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 20px; position: relative; z-index: 2;
}
.ranking-number { display: none; }

.motchill-slider-item .movie-details {
  flex: 1; display: flex; flex-direction: column; gap: 4px;
  padding-top: 0; margin-top: 20px; text-align: left;
  opacity: 1; visibility: visible; height: auto; overflow: visible;
}
.motchill-slider-item .vietnamese-title {
  color: #fff; font-size: 15px; font-weight: 600;
  margin: 0 0 4px 0; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 120px; font-family: Arial, sans-serif;
}
.motchill-slider-item .vietnamese-title a { color: inherit; text-decoration: none; }
.motchill-slider-item .english-title {
  color: #bbb; font-size: 12px; font-style: italic; font-weight: 400;
  margin: 0 0 6px 0; line-height: 1.2; font-family: Arial, sans-serif;
}
.motchill-slider-item .current-episode {
  color: var(--wg-slide-accent); font-size: 12px; font-weight: 600;
  display: block; width: auto; margin: 0 0 4px 0;
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}
.motchill-slider-item .language-info {
  color: rgba(255, 255, 255, 0.9); font-size: 11px; font-style: normal;
}

/* Trending label — đỏ cinema, tách khỏi tông slide xanh */
.motchill-slider-item .trending-label {
  position: absolute; bottom: 8px; right: 8px;
  background-image: linear-gradient(135deg, #dc2626 0%, #b91c1c 55%, #991b1b 100%);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px; text-transform: uppercase;
  box-shadow: 0 2px 14px rgba(220, 38, 38, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  letter-spacing: 0.4px;
  border: 1px solid rgba(252, 165, 165, 0.45);
  z-index: 5; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.motchill-slider-item .trending-label i { font-size: 9px; opacity: 0.95; }

/* Navigation arrows */
.simple-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; pointer-events: none; z-index: 10; left: 0; right: 0;
}
.simple-prev, .simple-next {
  position: absolute;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50%;
  width: 45px; height: 45px; color: rgba(255, 255, 255, 0.85);
  font-size: 18px; cursor: pointer; pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s var(--ease);
}
.simple-prev { left: 0; }
.simple-next { right: 0; }
.simple-prev:hover, .simple-next:hover {
  background: var(--wg-slide-soft); color: var(--wg-slide-accent); border-color: var(--wg-slide-border);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

/* ═══════════════════════════════════════
   13b. STANDALONE WIDGETS (TMDB, Most Viewed, Sắp chiếu, Chiếu rạp)
   ═══════════════════════════════════════ */

/* --- Shared widget wrapper --- */
.wg-tmdb-widget, .wg-most-viewed-widget, .trailer-compact-widget {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: var(--glass-shadow);
  padding: 20px; margin-bottom: 24px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.wg-tmdb-widget:hover, .trailer-compact-widget:hover { border-color: var(--glass-border-hover); }
.wg-most-viewed-widget:hover { border-color: rgba(251, 146, 60, 0.22); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(249, 115, 22, 0.08); }

/* --- Shared widget headers --- */
.wg-tmdb-header, .wg-most-viewed-header, .trailer-compact-header {
  margin-bottom: 20px; padding-bottom: 12px; position: relative;
}
.wg-tmdb-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 56px; height: 2px;
  background: linear-gradient(90deg, var(--tmdb-mint), var(--tmdb-cyan)); border-radius: 2px;
}
.wg-most-viewed-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 56px; height: 2px;
  background: var(--wg-most-line); border-radius: 2px;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.35);
}
.trailer-compact-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 56px; height: 2px;
  background: linear-gradient(90deg, #a855f7, #db2777); border-radius: 2px;
}
.wg-tmdb-title, .wg-most-viewed-title { color: #fff; font-size: 18px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; }
.wg-tmdb-title i { color: var(--tmdb-cyan); font-size: 16px; filter: drop-shadow(0 0 6px rgba(1, 180, 228, 0.35)); }
.wg-most-viewed-title i { color: var(--wg-most-icon); font-size: 16px; filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.45)); }

/* --- Shared item list --- */
.wg-tmdb-content, .wg-most-viewed-content { margin-top: 15px; }
.wg-tmdb-list, .wg-most-viewed-list { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }

/* --- Shared item row --- */
.wg-tmdb-item, .wg-most-viewed-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 10px; margin-bottom: 8px;
  transition: all 0.25s var(--ease);
}
.wg-tmdb-item:hover { background: rgba(1, 180, 228, 0.07); border-color: rgba(1, 180, 228, 0.22); transform: translateX(2px); }
.wg-most-viewed-item:hover { background: var(--wg-most-soft); border-color: var(--wg-most-border); transform: translateX(3px); }

/* --- TMDB widget --- */
.wg-tmdb-rank {
  background: linear-gradient(145deg, var(--tmdb-mint) 0%, var(--tmdb-cyan) 100%);
  color: var(--tmdb-ink);
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(1, 180, 228, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(3, 37, 65, 0.12);
}
.wg-tmdb-poster { width: 55px; height: 75px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.wg-tmdb-poster img { width: 100%; height: 100%; object-fit: cover; }
.wg-tmdb-info { flex: 1; min-width: 0; }
.wg-tmdb-movie-title { margin: 0 0 4px 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.wg-tmdb-movie-title a { color: #fff; transition: color 0.2s; }
.wg-tmdb-movie-title a:hover { color: var(--tmdb-cyan); }

.wg-tmdb-rating { color: var(--text-2); font-size: 11px; margin: 0 0 4px 0; display: flex; align-items: center; gap: 3px; }
.wg-tmdb-rating .tmdb-badge {
  background: linear-gradient(135deg, var(--tmdb-mint), var(--tmdb-cyan));
  color: var(--tmdb-ink);
  font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.45px; margin-right: 5px;
  border: 1px solid rgba(3, 37, 65, 0.15);
  box-shadow: 0 1px 4px rgba(1, 180, 228, 0.2);
}
.wg-tmdb-rating i.fa-star, .wg-tmdb-rating i.fa-star-half-o { color: var(--tmdb-green); }
.wg-tmdb-rating i.fa-star-o { color: rgba(255, 255, 255, 0.22); }
.wg-tmdb-rating .rating-number { color: rgba(255, 255, 255, 0.88); font-size: 11px; margin-left: 3px; font-weight: 600; }
.wg-tmdb-votes { color: rgba(144, 206, 161, 0.85); font-size: 11px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.wg-tmdb-votes i { font-size: 10px; color: var(--tmdb-cyan); }

/* --- Most Viewed widget --- */
.wg-most-viewed-rank {
  background-image: var(--wg-most-rank-grad);
  color: #fff;
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.wg-most-viewed-poster { width: 55px; height: 75px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.wg-most-viewed-poster img { width: 100%; height: 100%; object-fit: cover; }
.wg-most-viewed-info { flex: 1; min-width: 0; }
.wg-most-viewed-movie-title { margin: 0 0 4px 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.wg-most-viewed-movie-title a { color: #fff; transition: color 0.2s; }
.wg-most-viewed-movie-title a:hover { color: var(--wg-most-icon); }
.wg-most-viewed-episode { color: var(--text-2); font-size: 11px; margin: 0 0 2px 0; line-height: 1.2; }
.wg-most-viewed-lang { color: var(--text-3); font-size: 10px; font-style: italic; margin: 0 0 4px 0; }
.wg-most-viewed-count { color: rgba(253, 186, 116, 0.92); font-size: 11px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 4px; }
.wg-most-viewed-count i { font-size: 10px; color: var(--wg-most-icon); opacity: 0.95; }

/* --- Sắp chiếu (trailer-compact) --- */
.trailer-compact-title { color: #fff; font-size: 18px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; }
.trailer-compact-title::before { content: ''; }
.coming-soon-badge {
  background-image: var(--trailer-soon-grad);
  color: #fff;
  padding: 3px 10px; border-radius: 12px; font-size: 9px; font-weight: 700;
  letter-spacing: 0.55px; text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 12px rgba(219, 39, 119, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.trailer-compact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.trailer-list-item {
  display: flex; gap: 12px; padding: 12px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 10px; margin-bottom: 8px;
  transition: all 0.25s var(--ease);
}
.trailer-list-item:hover { background: rgba(168, 85, 247, 0.06); border-color: rgba(219, 39, 119, 0.18); transform: translateX(2px); }

.trailer-thumb { flex: 0 0 90px; position: relative; border-radius: 8px; overflow: hidden; height: 130px; }
.trailer-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease); }
.trailer-list-item:hover .trailer-thumb img { transform: scale(1.05); }
.thumb-badge {
  position: absolute; top: 6px; left: 6px;
  background-image: var(--trailer-thumb-grad);
  color: #fff;
  padding: 2px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; z-index: 5;
  text-transform: uppercase; letter-spacing: 0.35px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.trailer-info { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.trailer-movie-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trailer-movie-title a { color: #fff; transition: color 0.2s; }
.trailer-movie-title a:hover { color: var(--accent); }
.trailer-original-title { font-size: 11px; color: var(--text-3); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.trailer-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.meta-item { font-size: 11px; color: #bbb; display: flex; align-items: center; gap: 4px; }
.meta-item i { color: var(--accent); font-size: 10px; }
.trailer-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.badge-small { padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 600; letter-spacing: 0.2px; white-space: nowrap; }
.badge-quality {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  color: #1c1917; font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 6px rgba(234, 179, 8, 0.25);
}
.badge-year {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.85) 0%, rgba(29, 78, 216, 0.9) 100%);
  color: #fff; font-weight: 600;
  border: 1px solid rgba(147, 197, 253, 0.35);
  box-shadow: 0 1px 6px rgba(37, 99, 235, 0.25);
}
.badge-status {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.88) 0%, rgba(5, 150, 105, 0.92) 100%);
  color: #ecfdf5; font-weight: 600;
  border: 1px solid rgba(167, 243, 208, 0.35);
  box-shadow: 0 1px 6px rgba(16, 185, 129, 0.22);
}
.trailer-rating { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.rating-stars { color: #fbbf24; font-size: 12px; letter-spacing: 1px; filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.25)); }
.rating-score { color: #fde68a; font-weight: 700; font-size: 12px; }
.trailer-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.22) 0%, rgba(168, 85, 247, 0.18) 100%);
  border: 1px solid rgba(219, 39, 119, 0.35);
  color: #fce7f3; padding: 5px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
  transition: all 0.25s var(--ease); width: fit-content;
}
.trailer-action-btn::before { content: '▶'; font-size: 9px; color: #f9a8d4; }
.trailer-action-btn:hover {
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.35) 0%, rgba(168, 85, 247, 0.3) 100%);
  border-color: rgba(244, 114, 182, 0.5);
  color: #fff;
}
.no-trailers { text-align: center; padding: 40px 20px; color: var(--text-3); }

/* --- Chiếu rạp (theater) year tabs --- */
.wg-theater-section .theater-year-tabs { display: flex; gap: 8px; margin: 15px 0 20px; flex-wrap: wrap; }
.wg-theater-section .year-tab {
  padding: 7px 14px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 8px;
  color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: all 0.25s var(--ease); display: flex; align-items: center; gap: 5px;
}
.wg-theater-section .year-tab:hover { background: rgba(136, 140, 153, 0.08); border-color: rgba(136, 140, 153, 0.2); color: var(--accent); }
.wg-theater-section .year-tab.active {
  background: rgba(136, 140, 153, 0.2); border-color: rgba(136, 140, 153, 0.3);
  color: #fff; box-shadow: 0 2px 10px rgba(136, 140, 153, 0.2);
}
.wg-theater-section .year-tab .badge-new { background: rgba(255, 255, 255, 0.1); color: var(--text-2); font-size: 9px; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, 0.08); }
.wg-theater-section .theater-item::after {
  content: "\f03d"; font-family: 'FontAwesome'; position: absolute; top: 8px;
  right: 8px; background: rgba(136, 140, 153, 0.8); color: #fff;
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 10px; z-index: 5;
}
.no-theater-movies { text-align: center; padding: 40px 20px; }
.no-theater-movies .empty-message { color: var(--text-3); font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Chiếu rạp: dùng class items-4|5|6 trên .homepage-section (wg_ophim_theater) — không cố định 4 cột */
.homepage-slider-full .wg-theater-section {
  max-width: var(--container); margin-left: auto; margin-right: auto;
}

/* ═══════════════════════════════════════
   14. FOOTER — glass
   ═══════════════════════════════════════ */
.motchill-footer {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, 0.05); color: #aaa; padding: 0; margin: 0;
}
.motchill-footer .footer-inner { max-width: var(--container); margin: 0 auto; padding: 40px 20px 20px; background: transparent; }
.motchill-footer .footer-elements { display: flex; flex-direction: column; }
.motchill-footer .side-left { display: flex; flex-direction: column; align-items: center; }

.motchill-footer .vietnam-flag { display: flex; align-items: center; justify-content: center; gap: 8px; background: #78140f; color: #fff; padding: 0.5rem 0.7rem; border-radius: 2rem; margin-bottom: 20px; font-weight: 500; font-size: 14px; }
.motchill-footer .vietnam-flag img { width: 20px; height: auto; }
.motchill-footer .icon-20 { width: 20px; height: 20px; }
.motchill-footer .inc-icon img, .motchill-footer .inc-icon svg { width: 100%; height: 100%; }
.motchill-footer .vietnam-flag span { color: #fff; font-weight: 500; font-size: 14px; }

.motchill-footer .footer-brand-row { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 30px; }
.motchill-footer .footer-logo { display: flex; align-items: center; justify-content: center; }
.motchill-footer .footer-logo img, .motchill-footer .footer-logo h2 { max-height: 40px; color: #fff; font-weight: 700; font-size: 24px; margin: 0; }

.motchill-footer .footer-socials { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.motchill-footer .footer-social {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px; color: #fff; transition: all 0.25s var(--ease);
}
.motchill-footer .footer-social:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); }
.motchill-footer .footer-social i { font-size: 16px; }

.motchill-footer .footer-links { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; margin: 20px 0; }
.motchill-footer .footer-links a { color: var(--text-2); font-size: 14px; white-space: nowrap; transition: color 0.2s var(--ease); }
.motchill-footer .footer-links a:hover { color: var(--accent); }

.motchill-footer .footer-desc { text-align: center; color: var(--text-3); line-height: 1.7; font-size: 14px; margin: 20px auto; max-width: 900px; }
.motchill-footer .footer-copy { text-align: center; color: var(--text-3); font-size: 14px; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* ═══════════════════════════════════════
   15. UTILITIES
   ═══════════════════════════════════════ */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50%;
  width: 50px; height: 50px; color: #fff; cursor: pointer; z-index: 1000;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); transition: all 0.3s var(--ease);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.18); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-spin { animation: spin 1s linear infinite; }

.preload .motchill-main-layout, .preload .motchill-right-content { opacity: 0; }
html:not(.preload) .motchill-main-layout, html:not(.preload) .motchill-right-content { opacity: 1; transition: opacity 0.15s ease-in; }

/* Utility spacing */
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 30px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; }

/* ═══════════════════════════════════════
   16. RESPONSIVE — 5 breakpoints
   ═══════════════════════════════════════ */

/* ── Desktop ≥ 744px shared slider rules ── */
@media (min-width: 744px) {
  .motchill-slider-header, .motchill-slider .motchill-slider-header { margin-top: 0; }
  /* Trước đây 60px + margin slider-full = khoảng trống lớn dưới header */
  .motchill-slider { padding: 8px 0 28px 0; margin-bottom: 72px; }
}

/* ── Desktop ≥ 1181px ─────────────────── */
@media (min-width: 1181px) {
  .mobile-buttons, .mobile-search-button, .mobile-search-container, .mobile-search { display: none !important; }
  .motchill-search-section, .motchill-nav { display: block; }
  .motchill-search-section { flex: 1 1 520px; max-width: 560px; }
  .motchill-logo { min-width: 100px; order: 0; flex: 0 0 auto; justify-content: flex-start; }
  .motchill-user-actions { display: flex; min-width: 160px; }
  .motchill-top-bar { gap: 14px; flex-wrap: nowrap; }

  .homepage-layout { display: flex; gap: 30px; align-items: flex-start; }
  .homepage-main { flex: 0 0 70%; max-width: 70%; }
  .homepage-sidebar { flex: 0 0 30%; max-width: 30%; }
  .homepage-main .list-films { gap: 20px; }
  .homepage-main .list-films .item { flex: 0 0 calc(25% - 15px); max-width: calc(25% - 15px); }
}

/* ── Small desktop 1024–1180px ────────── */
@media (min-width: 1024px) and (max-width: 1180px) {
  .motchill-header .container { max-width: 100%; }
  .homepage-layout { display: block; }
  .homepage-main, .homepage-sidebar { width: 100%; max-width: 100%; flex: none; padding: 0 15px; }
  .homepage-sidebar { margin-top: 30px; padding-right: 0; }
  .homepage-main .list-films { gap: 20px; }
  .homepage-main .list-films .item { flex: 0 0 calc(25% - 15px); max-width: calc(25% - 15px); }
  .motchill-footer .footer-inner { max-width: 100%; }

  .motchill-slider-container { max-width: 1000px; }
  .motchill-slider-item { flex: 0 0 200px; width: 200px; max-width: 200px; }
  .motchill-slider-item img { height: 320px; max-height: 320px; }
  .motchill-slider-item .poster-container { height: 320px; }
  .simple-prev, .simple-next { width: 40px; height: 40px; font-size: 16px; }
}

/* ── Tablet 744–1023px ────────────────── */
@media (min-width: 744px) and (max-width: 1023px) {
  :root { --header-h: 90px; }
  .motchill-header .container { max-width: 100%; }
  .motchill-search-section { display: none; }
  .motchill-nav { display: none; }
  .mobile-buttons { display: flex; align-items: center; order: -2; }
  .mobile-search-button { display: flex; align-items: center; order: 3; }
  .motchill-logo { order: -1; flex: 1 1 auto; justify-content: center; }
  .motchill-user-actions { display: none; }

  .homepage-layout { display: block; }
  .homepage-main, .homepage-sidebar { width: 100%; max-width: 100%; flex: none; padding: 0 15px; }
  .homepage-sidebar { margin-top: 30px; padding-right: 0; }
  .homepage-main .list-films .item { flex: 0 0 calc(33.333% - 14px); max-width: calc(33.333% - 14px); }
  .wg-theater-section .list-films .item,
  .homepage-slider-full .wg-theater-section .list-films .item { flex: 0 0 calc(33.333% - 10px); max-width: calc(33.333% - 10px); }

  .motchill-slider { padding-top: 20px; }
  .motchill-slider-header { margin-top: 80px; }
  .homepage-slider-full { margin-top: 10px; margin-bottom: 30px; }

  .motchill-slider-container { max-width: 100%; }
  .motchill-slider-item { flex: 0 0 200px; width: 200px; max-width: 200px; }
  .motchill-slider-item img { height: 300px; max-height: 300px; }
  .motchill-slider-item .poster-container { height: 300px; }
  .motchill-slider-item:nth-child(odd) .poster-container { clip-path: polygon(0 0%, 100% 12%, 100% 100%, 0 100%); }
  .motchill-slider-item:nth-child(even) .poster-container { clip-path: polygon(0 12%, 100% 0%, 100% 100%, 0 100%); }
  .motchill-slider-item .ranking-number-new { font-size: 38px; width: 50px; }
  .motchill-slider-item .vietnamese-title { font-size: 12px; }
}

/* ── Large mobile 550–743px ───────────── */
@media (min-width: 550px) and (max-width: 743px) {
  :root { --header-h: 135px; }
  body { padding-top: var(--header-h); }

  .motchill-header .container { max-width: 100%; }
  .motchill-top-bar { flex-wrap: nowrap; gap: 10px; padding: 10px 0; }
  .motchill-search-section { display: none; }
  .motchill-nav { display: none; }
  .mobile-buttons { display: flex; align-items: center; order: -2; }
  .mobile-search-button { display: flex; align-items: center; order: 3; }
  .motchill-logo { order: -1; flex: 1 1 auto; justify-content: center; }
  .motchill-user-actions { display: none; }

  .container { padding: 0 15px; max-width: 100%; }
  .homepage-slider-full { margin-top: 10px; margin-bottom: 20px; padding-bottom: 20px; }
  .homepage-container { padding-top: 20px; }
  .homepage-layout { display: block; }
  .homepage-main, .homepage-sidebar { width: 100%; max-width: 100%; flex: none; padding: 0; }
  .homepage-sidebar { margin-top: 20px; padding-right: 0; }

  .homepage-main .list-films .item { flex: 0 0 calc(50% - 8px); max-width: calc(50% - 8px); }
  .wg-theater-section .list-films .item,
  .homepage-slider-full .wg-theater-section .list-films .item { flex: 0 0 calc(50% - 8px); max-width: calc(50% - 8px); }
  .list-films .item .img-film { aspect-ratio: 2 / 3; height: auto; }

  .motchill-slider { padding-top: 10px; max-height: none; margin: 8px 0 0 0; }
  .motchill-slider-header { margin-top: 0; padding-left: 0; padding-right: 0; border-bottom: none; }
  .motchill-slider-title { font-size: 22px; border-bottom: none; }
  .motchill-slider-container { padding: 0; }

  .motchill-slider-item { flex: 0 0 calc(50% - 8px); width: calc(50% - 8px); max-width: calc(50% - 8px); }
  .motchill-slider-item .poster-container { min-height: 170px; max-height: 248px; height: auto; }
  .motchill-slider-item img { height: auto; max-height: 248px; }
  .motchill-slider-item:nth-child(odd) .poster-container { clip-path: polygon(0 0%, 100% 8%, 100% 100%, 0 100%); }
  .motchill-slider-item:nth-child(even) .poster-container { clip-path: polygon(0 8%, 100% 0%, 100% 100%, 0 100%); }
  .motchill-slider-item .ranking-number-new { font-size: 32px; width: 45px; }
  .motchill-slider-item .vietnamese-title { font-size: 11px; max-width: min(42vw, 120px); }
  .motchill-slider-item .current-episode { font-size: 11px; }
  .motchill-slider-item .language-info { font-size: 10px; }
  .motchill-slider-item .motchill-info { min-height: 58px; padding: 6px 4px; }

  .motchill-footer .footer-inner { padding: 30px 15px 15px; }

  /* Sidebar widgets compact */
  .wg-tmdb-widget, .wg-most-viewed-widget, .trailer-compact-widget { padding: 16px; border-radius: 14px; }
  .wg-tmdb-title, .wg-most-viewed-title, .trailer-compact-title { font-size: 16px; }
  .wg-tmdb-movie-title, .wg-most-viewed-movie-title { font-size: 13px; }
  .trailer-thumb { flex: 0 0 80px; height: 115px; }
  .trailer-movie-title { font-size: 13px; }
  .trailer-action-btn { font-size: 10px; padding: 4px 10px; }
}

/* ── Small mobile ≤ 549px ─────────────── */
@media (max-width: 549px) {
  :root { --header-h: 135px; --gap: 10px; }
  body { padding-top: var(--header-h); }

  .motchill-header .container { max-width: 100%; }
  .motchill-top-bar { flex-wrap: nowrap; gap: 8px; padding: 8px 0; }
  .motchill-search-section { display: none; }
  .motchill-nav { display: none; }
  .mobile-buttons { display: flex; align-items: center; order: -2; }
  .mobile-search-button { display: flex; align-items: center; order: 3; }
  .motchill-logo { order: -1; flex: 1 1 auto; justify-content: center; }
  .motchill-user-actions { display: none; }

  .container { padding: 0 12px; max-width: 100%; }
  .homepage-slider-full { margin-top: 10px; margin-bottom: 15px; padding-bottom: 15px; }
  .homepage-container { padding-top: 15px; }
  .homepage-layout { display: block; }
  .homepage-main, .homepage-sidebar { width: 100%; max-width: 100%; flex: none; padding: 0; }
  .homepage-sidebar { margin-top: 20px; padding-right: 0; }

  .homepage-main .list-films ul,
  .list-films ul { gap: var(--gap); }
  .homepage-main .list-films .item,
  .list-films .item { flex: 0 0 calc(50% - calc(var(--gap) / 2)); max-width: calc(50% - calc(var(--gap) / 2)); }
  .wg-theater-section .list-films .item,
  .homepage-slider-full .wg-theater-section .list-films .item { flex: 0 0 calc(50% - calc(var(--gap) / 2)); max-width: calc(50% - calc(var(--gap) / 2)); }
  .list-films .item .img-film { aspect-ratio: 2 / 3; height: auto; }

  .motchill-slider { padding-top: 5px; max-height: none; margin: 8px 0 50px 0; }
  .motchill-slider-header { margin-top: 0; padding-left: 0; padding-right: 0; border-bottom: none; }
  .motchill-slider-title { font-size: 20px; border-bottom: none; }
  .motchill-slider-container { padding: 0; }

  .motchill-slider-item { flex: 0 0 calc(50% - 8px); width: calc(50% - 8px); max-width: calc(50% - 8px); }
  .motchill-slider-item .poster-container { min-height: 160px; max-height: 225px; height: auto; }
  .motchill-slider-item img { height: auto; max-height: 225px; }
  .motchill-slider-item:nth-child(odd) .poster-container { clip-path: polygon(0 0%, 100% 6%, 100% 100%, 0 100%); }
  .motchill-slider-item:nth-child(even) .poster-container { clip-path: polygon(0 6%, 100% 0%, 100% 100%, 0 100%); }
  .motchill-slider-item .ranking-number-new { font-size: 40px; width: 46px; min-width: 46px; }
  .motchill-slider-item .vietnamese-title { font-size: 12px; max-width: min(46vw, 115px); }
  .motchill-slider-item .current-episode { font-size: 11px; }
  .motchill-slider-item .language-info { font-size: 10px; }
  .motchill-slider-item .motchill-info { min-height: 66px; padding: 6px 4px; }
  .motchill-slider-item .movie-details { gap: 4px; }

  .homepage-section { padding: 12px; border-radius: 12px; }
  .section-header { padding-top: 12px; padding-bottom: 4px; margin-bottom: 16px; }
  .section-header .section-title { font-size: 17px; padding-bottom: 7px; }

  .motchill-footer .footer-inner { padding: 25px 12px 12px; }
  .motchill-footer .footer-links { gap: 12px; }
  .motchill-footer .footer-desc { font-size: 13px; }

  /* Sidebar widgets — small mobile */
  .wg-tmdb-widget, .wg-most-viewed-widget, .trailer-compact-widget { padding: 14px; border-radius: 12px; }
  .wg-tmdb-title, .wg-most-viewed-title, .trailer-compact-title { font-size: 15px; }
  .wg-tmdb-item, .wg-most-viewed-item { padding: 10px; gap: 10px; }
  .wg-tmdb-poster, .wg-most-viewed-poster { width: 48px; height: 65px; }
  .wg-tmdb-movie-title, .wg-most-viewed-movie-title { font-size: 13px; }
  .wg-tmdb-rank { width: 28px; height: 28px; font-size: 12px; }
  .wg-most-viewed-rank { width: 24px; height: 24px; font-size: 11px; }
  .trailer-thumb { flex: 0 0 75px; height: 105px; }
  .trailer-list-item { padding: 10px; gap: 10px; }
  .trailer-movie-title { font-size: 13px; }
  .trailer-badges .badge-small { font-size: 9px; padding: 2px 5px; }
  .trailer-action-btn { font-size: 10px; padding: 4px 10px; }
  .wg-theater-section .year-tab { padding: 6px 12px; font-size: 13px; }

  /* Widget items grid responsive */
  body .homepage-section.items-6 .list-films .item,
  body .homepage-section.items-6 .list-films ul li.item,
  body .homepage-section.items-5 .list-films .item,
  body .homepage-section.items-5 .list-films ul li.item,
  body .homepage-section.items-4 .list-films .item,
  body .homepage-section.items-4 .list-films ul li.item { flex: 0 0 calc((100% - var(--gap)) / 2); max-width: calc((100% - var(--gap)) / 2); }

  .mobile-search-dropdown { top: var(--header-h); }
}

/* Widget items grid — tablet only (not mobile) */
@media (min-width: 744px) and (max-width: 992px) {
  body .homepage-section.items-6 .list-films .item,
  body .homepage-section.items-6 .list-films ul li.item,
  body .homepage-section.items-5 .list-films .item,
  body .homepage-section.items-5 .list-films ul li.item,
  body .homepage-section.items-4 .list-films .item,
  body .homepage-section.items-4 .list-films ul li.item { flex: 0 0 calc((100% - 30px) / 3); max-width: calc((100% - 30px) / 3); }
}

/* Widget items grid — small desktop (993–1200px): 5 cột đúng theo wg; 6→5 cột (hẹp); 4 giữ 4 */
@media (max-width: 1200px) and (min-width: 993px) {
  body .homepage-section.items-6 .list-films .item,
  body .homepage-section.items-6 .list-films ul li.item { flex: 0 0 calc((100% - 60px) / 5); max-width: calc((100% - 60px) / 5); }
  body .homepage-section.items-5 .list-films .item,
  body .homepage-section.items-5 .list-films ul li.item { flex: 0 0 calc((100% - 60px) / 5); max-width: calc((100% - 60px) / 5); }
  body .homepage-section.items-4 .list-films .item,
  body .homepage-section.items-4 .list-films ul li.item { flex: 0 0 calc((100% - 45px) / 4); max-width: calc((100% - 45px) / 4); }
}

/* Legacy autocomplete — preserved from styles.css */
#suggestions, #msuggestions { position: relative; }
#suggestions ul.autocomplete-list, #msuggestions ul.autocomplete-list {
  background: rgba(15, 15, 20, 0.95); backdrop-filter: var(--glass-blur-heavy); -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius);
  list-style: none; padding: 5px 0 10px; position: absolute; top: 42px; width: 400px; z-index: 15;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
#suggestions ul.autocomplete-list li, #msuggestions ul.autocomplete-list li { border-bottom: 1px solid rgba(255, 255, 255, 0.06); display: block; height: 35px; line-height: 35px; margin: 0 8px; padding: 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ccc; }
#suggestions ul.autocomplete-list li a, #msuggestions ul.autocomplete-list li a { color: #ccc; }
#suggestions ul.autocomplete-list li a:hover, #msuggestions ul.autocomplete-list li a:hover { color: var(--accent); }
#suggestions ul.autocomplete-list li.hover, #msuggestions ul.autocomplete-list li.hover { background: rgba(136, 140, 153, 0.1); }

/* ═══════════════════════════════════════
   17. INNER PAGES — beat legacy !important (optimized + glass load before this file)
   ═══════════════════════════════════════ */
html body .motchill-header {
  background: rgba(10, 10, 15, 0.72) !important;
  backdrop-filter: blur(22px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(125%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(255, 255, 255, 0.04) !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
}
html body .motchill-header .container {
  width: 100% !important;
  max-width: var(--container) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}
html body .motchill-header .motchill-top-bar { border-bottom-color: rgba(255, 255, 255, 0.06) !important; }
html body .motchill-nav {
  background: rgba(10, 10, 15, 0.55) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: none !important;
}
html body .motchill-nav > ul > li > a { font-weight: 500 !important; }
html body .motchill-submenu {
  background: rgba(15, 18, 28, 0.96) !important;
  backdrop-filter: var(--glass-blur-heavy) !important;
  -webkit-backdrop-filter: var(--glass-blur-heavy) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
}
html body .motchill-user-action {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}
html body .mobile-sidebar {
  background: rgba(10, 10, 15, 0.95) !important;
  backdrop-filter: var(--glass-blur-heavy) !important;
  -webkit-backdrop-filter: var(--glass-blur-heavy) !important;
}
html body .back-to-top {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

/* ═══════════════════════════════════════
   18. HOMEPAGE WIDGET GRID vs mobile-final !important
   motchill-mobile-final: .list-films .item { 25% !important } @744+ và
   .homepage-main .list-films .item !important — đè mất items-4/5/6.
   Override chỉ trong .motchill-homepage (index), specificity + !important.
   Chiều cao poster lưới = (độ rộng ô) × 3/2; ô items-5 = calc((100% − 60px) / 5) với 60px = 4×gap 15px
   (biến --gap). Nếu .homepage-main .list-films dùng gap: 20px, lý tưởng là trừ 80px — có thể lệch nhẹ so khối slide 220px cố định.
   ═══════════════════════════════════════ */

@media (min-width: 744px) {
  body .motchill-homepage .homepage-section.items-4 .list-films .item,
  body .motchill-homepage .homepage-section.items-4 .list-films ul li.item {
    flex: 0 0 calc((100% - 45px) / 4) !important;
    max-width: calc((100% - 45px) / 4) !important;
    width: auto !important;
    float: none !important;
  }
  body .motchill-homepage .homepage-section.items-5 .list-films .item,
  body .motchill-homepage .homepage-section.items-5 .list-films ul li.item {
    flex: 0 0 calc((100% - 60px) / 5) !important;
    max-width: calc((100% - 60px) / 5) !important;
    width: auto !important;
    float: none !important;
  }
  body .motchill-homepage .homepage-section.items-6 .list-films .item,
  body .motchill-homepage .homepage-section.items-6 .list-films ul li.item {
    flex: 0 0 calc((100% - 75px) / 6) !important;
    max-width: calc((100% - 75px) / 6) !important;
    width: auto !important;
    float: none !important;
  }
}

@media (min-width: 744px) and (max-width: 992px) {
  body .motchill-homepage .homepage-main .list-films ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 15px !important;
  }
  body .motchill-homepage .homepage-main .list-films .item,
  body .motchill-homepage .homepage-main .list-films ul li.item {
    flex: 0 0 calc((100% - 30px) / 3) !important;
    max-width: calc((100% - 30px) / 3) !important;
    width: auto !important;
    float: none !important;
  }
  body .motchill-homepage .homepage-section.items-4 .list-films .item,
  body .motchill-homepage .homepage-section.items-4 .list-films ul li.item,
  body .motchill-homepage .homepage-section.items-5 .list-films .item,
  body .motchill-homepage .homepage-section.items-5 .list-films ul li.item,
  body .motchill-homepage .homepage-section.items-6 .list-films .item,
  body .motchill-homepage .homepage-section.items-6 .list-films ul li.item {
    flex: 0 0 calc((100% - 30px) / 3) !important;
    max-width: calc((100% - 30px) / 3) !important;
    width: auto !important;
    float: none !important;
  }
}

@media (max-width: 1200px) and (min-width: 993px) {
  body .motchill-homepage .homepage-section.items-6 .list-films .item,
  body .motchill-homepage .homepage-section.items-6 .list-films ul li.item {
    flex: 0 0 calc((100% - 60px) / 5) !important;
    max-width: calc((100% - 60px) / 5) !important;
    width: auto !important;
    float: none !important;
  }
  body .motchill-homepage .homepage-section.items-5 .list-films .item,
  body .motchill-homepage .homepage-section.items-5 .list-films ul li.item {
    flex: 0 0 calc((100% - 60px) / 5) !important;
    max-width: calc((100% - 60px) / 5) !important;
    width: auto !important;
    float: none !important;
  }
  body .motchill-homepage .homepage-section.items-4 .list-films .item,
  body .motchill-homepage .homepage-section.items-4 .list-films ul li.item {
    flex: 0 0 calc((100% - 45px) / 4) !important;
    max-width: calc((100% - 45px) / 4) !important;
    width: auto !important;
    float: none !important;
  }
}

@media (max-width: 743px) {
  body .motchill-homepage .homepage-section.items-4 .list-films .item,
  body .motchill-homepage .homepage-section.items-4 .list-films ul li.item,
  body .motchill-homepage .homepage-section.items-5 .list-films .item,
  body .motchill-homepage .homepage-section.items-5 .list-films ul li.item,
  body .motchill-homepage .homepage-section.items-6 .list-films .item,
  body .motchill-homepage .homepage-section.items-6 .list-films ul li.item {
    flex: 0 0 calc((100% - var(--gap-sm, 8px)) / 2) !important;
    max-width: calc((100% - var(--gap-sm, 8px)) / 2) !important;
    width: auto !important;
    float: none !important;
  }
}

/* ===== Listing + Filter (merged) ===== */
/*
 * Motchill Style Bundle
 * - Base/UI từ bundle style chính
 * - Pagination + filter desktop/tablet từ motchill-pagination-modern.css
 * - Mobile pagination/filter chuyển sang motchill-mobile-final.css
 */


/* =========================================================
 * Listing UI — pagination + filter (desktop/tablet)
 * ========================================================= */

.pagination {
  clear: both;
}

.ophim-pagination-modern {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin: 28px auto 36px;
  padding: 12px 16px;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.pagination-info {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.pagination-info strong {
  color: #fff;
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.pagination-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 2px;
  min-width: 0;
}

.pagination-btn,
.pagination-number,
.pagination-dots {
  box-sizing: border-box;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pagination-btn:hover:not(.disabled) {
  background: rgba(102, 126, 234, 0.25);
  border-color: rgba(102, 126, 234, 0.45);
  color: #fff;
}

.pagination-btn.disabled {
  opacity: 0.32;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-btn svg {
  display: block;
  width: 16px;
  height: 16px;
}

.pagination-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

a.pagination-number:hover {
  background: rgba(102, 126, 234, 0.22);
  border-color: rgba(102, 126, 234, 0.4);
  color: #fff;
}

.pagination-number.active {
  background: linear-gradient(135deg, #667eea 0%, #5a6fd6 100%);
  border-color: rgba(102, 126, 234, 0.6);
  color: #fff;
  font-weight: 600;
  cursor: default;
}

.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 36px;
  padding: 0 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

.pagination-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pagination-jump > span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

.pagination-input,
.pagination-jump-input {
  width: 64px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 14px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.pagination-input::-webkit-outer-spin-button,
.pagination-input::-webkit-inner-spin-button,
.pagination-jump-input::-webkit-outer-spin-button,
.pagination-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pagination-input:focus,
.pagination-jump-input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.55);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.pagination-go-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pagination-go-btn:hover {
  background: rgba(102, 126, 234, 0.35);
  border-color: rgba(102, 126, 234, 0.45);
}

@media (min-width: 900px) {
  .ophim-pagination-modern {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
  }

  .pagination-info {
    text-align: left;
  }

  .pagination-controls {
    flex: 1 1 auto;
    justify-content: center;
    max-width: none;
  }

  .pagination-jump {
    justify-content: flex-end;
  }
}

/* =========================================================
 * Filter form
 * ========================================================= */

.movie-filter-section {
  margin-bottom: 22px;
}

.movie-filter-section .filter-title {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: -0.02em;
}

.form-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 22px;
  padding: 16px 18px;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.form-filter .filter-item {
  flex: 1 1 150px;
  min-width: min(100%, 140px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.form-filter .filter-item label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
}

.form-filter select,
.form-filter .filter-select,
.form-filter .input.form-control {
  width: 100%;
  min-height: 44px;
  padding: 10px 36px 10px 14px;
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.95);
  background-color: rgba(0, 0, 0, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.55)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid rgba(102, 126, 234, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.form-filter select:hover,
.form-filter .filter-select:hover,
.form-filter .input.form-control:hover {
  border-color: rgba(102, 126, 234, 0.55);
  background-color: rgba(0, 0, 0, 0.45);
}

.form-filter select:focus,
.form-filter .filter-select:focus,
.form-filter .input.form-control:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.85);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.22);
}

.form-filter select option {
  background: #1a1a1a;
  color: #fff;
}

.form-filter .filter-submit-btn,
.form-filter input.filter-submit-btn,
.form-filter input.btn.btn-success.filter-submit-btn {
  flex: 0 0 auto;
  align-self: flex-end;
  min-height: 44px;
  padding: 0 22px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea 0%, #5b6ee0 50%, #764ba2 100%);
  box-shadow: 0 4px 18px rgba(102, 126, 234, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.form-filter .filter-submit-btn:hover,
.form-filter input.filter-submit-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 22px rgba(102, 126, 234, 0.45);
}

.form-filter .filter-submit-btn:active,
.form-filter input.filter-submit-btn:active {
  transform: translateY(1px);
}

.form-filter .filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  width: 100%;
}

.form-filter .filter-group {
  flex: 1 1 180px;
  min-width: min(100%, 150px);
  max-width: 100%;
}

.form-filter .filter-group label {
  display: block;
  margin: 0 0 6px 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
}

.form-filter .filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.form-filter .btn-filter {
  min-height: 44px;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea 0%, #5b6ee0 50%, #764ba2 100%);
  box-shadow: 0 4px 18px rgba(102, 126, 234, 0.35);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.form-filter .btn-filter:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 22px rgba(102, 126, 234, 0.45);
}

.form-filter .btn-clear {
  min-height: 44px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.form-filter .btn-clear:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.list-films.filter-loading {
  opacity: 0.55;
  pointer-events: none;
}

.form-filter.filter-error {
  border-color: rgba(244, 67, 54, 0.45);
}

.form-filter.filter-success {
  border-color: rgba(76, 175, 80, 0.45);
}

.form-filter .filter-clear-btn {
  min-height: 40px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.form-filter .filter-clear-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.filter-count,
.filter-results-count {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: rgba(221, 0, 63, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
}

.filter-toggle-mobile,
.filter-toggle-btn {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: rgba(221, 0, 63, 0.9);
  transition: background 0.2s ease, filter 0.2s ease;
}

.filter-toggle-mobile:hover,
.filter-toggle-btn:hover {
  background: #ff1744;
  filter: brightness(1.05);
}

.filter-toggle-mobile.active,
.filter-toggle-btn.active {
  background: #ff1744;
}

@media (min-width: 744px) {
  .filter-toggle-mobile,
  .filter-toggle-btn {
    display: none;
  }
}

.no-results {
  text-align: center;
  padding: 36px 20px;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
  grid-column: 1 / -1;
}

.filter-message {
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-sizing: border-box;
}

.filter-message-loading {
  background: rgba(25, 118, 210, 0.2);
  color: #90caf9;
  border: 1px solid rgba(144, 202, 249, 0.35);
}

.filter-message-success {
  background: rgba(46, 125, 50, 0.2);
  color: #a5d6a7;
  border: 1px solid rgba(165, 214, 167, 0.35);
}

.filter-message-error {
  background: rgba(198, 40, 40, 0.2);
  color: #ef9a9a;
  border: 1px solid rgba(239, 154, 154, 0.35);
}

/* ===== Search UI (merged) ===== */
/**
 * Motchill — Search UI (single source of truth)
 * Header desktop + mobile dropdown + kết quả live + ô lọc trang (lịch sử / yêu thích / 404)
 * Sửa giao diện ô tìm: chỉ chỉnh file này (+ token --mc-search-* nếu cần).
 * v1.0.0
 */
/* ─── Header — desktop ─── */
.motchill-search-section {
  flex: 1 1 450px;
  max-width: 500px;
  margin: 0 20px;
  position: relative;
}
.motchill-search-form {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1;
}
.motchill-search-input {
  width: 100%;
  padding: 12px 50px 12px 20px;
  background: var(--mc-search-bg);
  border: 1px solid var(--mc-search-border);
  border-radius: var(--mc-search-pill-radius);
  color: #fff;
  font-size: 14px;
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: all 0.3s var(--mc-search-ease);
}
.motchill-search-input::placeholder {
  color: var(--mc-search-placeholder);
}
.motchill-search-input:focus {
  background: var(--mc-search-bg-focus);
  border-color: var(--mc-search-border-strong);
  box-shadow: var(--mc-search-ring);
}
.motchill-search-input::-webkit-search-cancel-button,
.motchill-search-input::-ms-clear {
  display: none;
}
.motchill-search-form .filter-clear-btn,
.motchill-search-form .search-clear-btn,
.motchill-search-form .clear-filter-btn {
  display: none;
}

.motchill-search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s var(--mc-search-ease);
}
.motchill-search-btn:hover {
  transform: translateY(-50%) scale(1.02);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
.motchill-search-btn .fa-spinner {
  animation: spin 1s linear infinite;
}

/* ─── Desktop live results ─── */
.desktop-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10001;
  background: rgba(15, 15, 20, 0.92);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, max-height 0.22s ease;
}
.desktop-search-results.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  max-height: 400px;
  overflow-y: auto;
}

.desktop-search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s;
}
.desktop-search-result-item:hover {
  background: rgba(136, 140, 153, 0.1);
}
.desktop-search-result-item img {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 12px;
  flex-shrink: 0;
}
.desktop-search-result-item .info {
  flex: 1;
  min-width: 0;
}
.desktop-search-result-item .title {
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.desktop-search-result-item .original-title {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.desktop-search-result-item .meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
}
.desktop-search-result-item .year {
  background: rgba(136, 140, 153, 0.2);
  padding: 2px 6px;
  border-radius: 3px;
}
.desktop-search-result-item .quality {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.58);
}

.search-loading,
.mobile-search-loading {
  padding: 20px;
  text-align: center;
  color: #a3aab8;
  font-size: 14px;
}
.search-loading i,
.mobile-search-loading i {
  margin-right: 8px;
  animation: spin 1s linear infinite;
}
.search-error {
  padding: 20px;
  text-align: center;
  color: #b89090;
  font-size: 14px;
}
.search-no-results {
  padding: 20px;
  text-align: center;
  color: #aaa;
  font-size: 14px;
}

/* ─── Trang nội dung: lọc lịch sử / yêu thích (cùng ô với header, không nút trong) ─── */
.motchill-search-field-wrap {
  margin-bottom: 25px;
}
.motchill-search-input--standalone {
  width: 100%;
  max-width: 400px;
  padding: 12px 20px;
  background: var(--mc-search-bg);
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: var(--mc-search-pill-radius);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.motchill-search-input--standalone::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.motchill-search-input--standalone:focus {
  outline: none;
  border-color: var(--mc-search-accent);
  background: var(--mc-search-bg-focus);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* 404: hàng input + nút (không absolute) */
.motchill-search-form--404 {
  max-width: 500px;
  margin: 0 auto 40px;
}
.motchill-search-form--404 .motchill-search-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.motchill-search-form--404 .motchill-search-input {
  position: static;
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
}
.motchill-search-form--404 .motchill-search-btn--404-submit {
  position: static;
  transform: none;
  width: auto;
  min-width: 100px;
  height: auto;
  border-radius: 12px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--mc-search-accent), var(--mc-search-accent-2));
  border: none;
  font-size: 15px;
  font-weight: 600;
}
.motchill-search-form--404 .motchill-search-btn--404-submit:hover {
  transform: none;
  filter: brightness(1.06);
}

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