/* ==========================================================================
   s7movie — "Midnight Marquee" 2026 theme
   Loaded after the legacy theme-v2 CSS. New components use the .s7- prefix;
   legacy variables are remapped at the bottom so older pages match the palette.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root,
[data-theme="dark"] {
  --s7-bg: #07070b;
  --s7-bg-2: #0d0d14;
  --s7-surface: #13131c;
  --s7-surface-2: #1b1b27;
  --s7-surface-3: #252533;
  --s7-line: rgba(255, 255, 255, .07);
  --s7-line-strong: rgba(255, 255, 255, .14);
  --s7-text: #f3f1ec;
  --s7-text-2: #c4c2cc;
  --s7-muted: #8b899a;
  --s7-accent: #ff4d2e;
  --s7-accent-2: #ff8a3d;
  --s7-accent-ink: #fff;
  --s7-accent-soft: rgba(255, 77, 46, .14);
  --s7-gold: #ffc24b;
  --s7-glass: rgba(13, 13, 20, .72);
  --s7-glass-line: rgba(255, 255, 255, .08);
  --s7-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
  --s7-card-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
  --s7-hero-fade: #07070b;
  color-scheme: dark;
}

[data-theme="light"] {
  --s7-bg: #f5f3ef;
  --s7-bg-2: #efece6;
  --s7-surface: #ffffff;
  --s7-surface-2: #f1eee8;
  --s7-surface-3: #e6e2da;
  --s7-line: rgba(20, 18, 30, .08);
  --s7-line-strong: rgba(20, 18, 30, .16);
  --s7-text: #15141b;
  --s7-text-2: #3b3a45;
  --s7-muted: #6f6d7b;
  --s7-accent: #e5391a;
  --s7-accent-2: #f2762b;
  --s7-accent-ink: #fff;
  --s7-accent-soft: rgba(229, 57, 26, .1);
  --s7-gold: #c98a00;
  --s7-glass: rgba(245, 243, 239, .78);
  --s7-glass-line: rgba(20, 18, 30, .08);
  --s7-shadow: 0 20px 50px -24px rgba(40, 30, 20, .35);
  --s7-card-shadow: 0 16px 32px -18px rgba(40, 30, 20, .45);
  --s7-hero-fade: #07070b;
  color-scheme: light;
}

:root {
  --s7-font: "Inter", "Kantumruy Pro", "Battambang", system-ui, -apple-system, "Segoe UI", sans-serif;
  --s7-display: "Bricolage Grotesque", "Kantumruy Pro", "Inter", system-ui, sans-serif;
  --s7-radius: 16px;
  --s7-radius-sm: 10px;
  --s7-radius-lg: 24px;
  --s7-header-h: 68px;
  --s7-side-w: 248px;
  --s7-gutter: clamp(16px, 2.4vw, 36px);
  --s7-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body.s7 {
  margin: 0;
  padding: 0 !important;
  background: var(--s7-bg) !important;
  color: var(--s7-text);
  font-family: var(--s7-font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.s7 *, body.s7 *::before, body.s7 *::after { box-sizing: border-box; }
body.s7 a { color: inherit; text-decoration: none; }
body.s7 a:hover, body.s7 a:focus { text-decoration: none; }
body.s7 img { max-width: 100%; }
body.s7 ::selection { background: var(--s7-accent); color: #fff; }
body.s7 :focus-visible { outline: 2px solid var(--s7-accent); outline-offset: 2px; border-radius: 8px; }
body.s7 mark.mv__text_mark { background: var(--s7-accent-soft); color: var(--s7-accent); padding: 0 2px; border-radius: 4px; }

.s7-scroll-x { scrollbar-width: none; }
.s7-scroll-x::-webkit-scrollbar { display: none; }
body.s7 ::-webkit-scrollbar { width: 10px; height: 10px; }
body.s7 ::-webkit-scrollbar-thumb { background: var(--s7-surface-3); border-radius: 10px; border: 3px solid var(--s7-bg); }
body.s7 ::-webkit-scrollbar-track { background: transparent; }

/* Film grain overlay – subtle cinema texture */
.s7-grain {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 1;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="light"] .s7-grain { opacity: .025; }

/* ---------- Header ---------- */
.s7-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--s7-header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 var(--s7-gutter) 0 18px;
  background: linear-gradient(to bottom, var(--s7-bg) 0%, transparent 100%);
  transition: background .3s var(--s7-ease), border-color .3s;
  border-bottom: 1px solid transparent;
}
.s7-header.is-scrolled {
  background: var(--s7-glass);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--s7-glass-line);
}
.s7-header__brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; width: calc(var(--s7-side-w) - 18px); }
.s7-header__brand img { height: 34px; width: auto; display: block; }
.s7-burger {
  display: none;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--s7-line); background: var(--s7-surface);
  color: var(--s7-text); align-items: center; justify-content: center; cursor: pointer;
}

.s7-search { flex: 1 1 auto; min-width: 0; max-width: 640px; margin: 0 auto; }
.s7-search .movie__input_search_panel {
  display: flex; align-items: center;
  height: 46px; border-radius: 999px;
  background: var(--s7-surface);
  border: 1px solid var(--s7-line);
  padding: 4px 4px 4px 6px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.s7-search .movie__input_search_panel:focus-within {
  border-color: var(--s7-accent);
  box-shadow: 0 0 0 4px var(--s7-accent-soft);
}
.s7-search select {
  appearance: none; -webkit-appearance: none;
  border: 0; outline: 0; background: var(--s7-surface-2);
  color: var(--s7-text-2); font: 600 12px/1 var(--s7-font);
  height: 36px; padding: 0 28px 0 14px; border-radius: 999px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238b899a' stroke-width='1.6'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.s7-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--s7-text); font: 500 14px var(--s7-font); padding: 0 14px; height: 36px;
}
.s7-search input::placeholder { color: var(--s7-muted); }
.s7-search button {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--s7-accent); color: #fff; display: grid; place-items: center;
  transition: transform .2s var(--s7-ease);
}
.s7-search button:hover { transform: scale(1.06); }
.s7-search button svg { fill: currentColor; width: 15px; }

.s7-header__actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.s7-icon-btn {
  position: relative;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--s7-text-2) !important; background: transparent;
  border: 1px solid var(--s7-line);
  transition: background .2s, color .2s, border-color .2s;
  font-size: 15px;
}
.s7-icon-btn:hover { background: var(--s7-surface-2); color: var(--s7-text) !important; border-color: var(--s7-line-strong); }
.s7-btn-login {
  height: 42px; padding: 0 20px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--s7-text); color: var(--s7-bg) !important;
  font-weight: 700; font-size: 14px;
  transition: transform .2s var(--s7-ease), opacity .2s;
}
.s7-btn-login:hover { transform: translateY(-1px); opacity: .92; }
.s7-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(from 210deg, var(--s7-accent), var(--s7-gold), var(--s7-accent));
  color: #fff !important; font-weight: 800; text-transform: uppercase;
  border: 2px solid var(--s7-bg); box-shadow: 0 0 0 1px var(--s7-line-strong);
}

/* Profile dropdown (Bootstrap 3 toggling) */
.s7-header .dropdown-menu.s7-menu {
  margin-top: 12px; min-width: 240px; padding: 8px;
  background: var(--s7-surface); border: 1px solid var(--s7-line-strong);
  border-radius: var(--s7-radius); box-shadow: var(--s7-shadow);
}
.s7-menu__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--s7-line); margin-bottom: 6px; }
.s7-menu__head strong { display: block; color: var(--s7-text); font-size: 14px; }
.s7-menu__head small { color: var(--s7-muted); font-size: 12px; }
.s7-menu a {
  display: flex !important; align-items: center; gap: 12px;
  padding: 10px 12px !important; border-radius: 10px;
  color: var(--s7-text-2) !important; font-size: 14px; font-weight: 500;
}
.s7-menu a i { width: 18px; text-align: center; color: var(--s7-muted); }
.s7-menu a:hover { background: var(--s7-surface-2) !important; color: var(--s7-text) !important; }
.s7-menu a.is-logout { color: var(--s7-accent) !important; }
.s7-menu a.is-logout i { color: var(--s7-accent); }
.s7-menu hr { margin: 6px 0; border-color: var(--s7-line); }

/* ---------- Sidebar ---------- */
.s7-side {
  position: fixed; z-index: 900;
  top: var(--s7-header-h); bottom: 0; left: 0;
  width: var(--s7-side-w);
  padding: 8px 14px 24px;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
}
.s7-side__group { padding: 6px 0 10px; }
.s7-side__group + .s7-side__group { border-top: 1px solid var(--s7-line); padding-top: 14px; }
.s7-side__label {
  font: 700 10.5px/1 var(--s7-font); letter-spacing: .14em; text-transform: uppercase;
  color: var(--s7-muted); padding: 4px 12px 10px;
}
.s7-nav { list-style: none; margin: 0; padding: 0; }
.s7-nav a {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  height: 44px; padding: 0 12px; border-radius: 12px;
  color: var(--s7-text-2) !important; font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s7-nav a i { width: 20px; text-align: center; font-size: 16px; color: var(--s7-muted); transition: color .2s; flex: 0 0 auto; }
.s7-nav a span { overflow: hidden; text-overflow: ellipsis; }
.s7-nav a:hover { background: var(--s7-surface); color: var(--s7-text) !important; }
.s7-nav li.active > a { background: var(--s7-surface-2); color: var(--s7-text) !important; font-weight: 650; }
.s7-nav li.active > a i { color: var(--s7-accent); }
.s7-nav li.active > a::before {
  content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--s7-accent);
}
.s7-nav--genres a { height: 38px; font-size: 13.5px; }
.s7-nav--genres a::after { content: none; }
.s7-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--s7-line-strong); flex: 0 0 auto; margin: 0 7px; }
.s7-nav li.active .s7-dot { background: var(--s7-accent); box-shadow: 0 0 0 4px var(--s7-accent-soft); }
.s7-side__promo {
  display: block; margin-top: 8px; padding: 14px; border-radius: var(--s7-radius);
  background: radial-gradient(120% 120% at 0% 0%, var(--s7-accent-soft), transparent 60%), var(--s7-surface);
  border: 1px solid var(--s7-line);
}
.s7-side__promo b { display: block; font-family: var(--s7-display); font-size: 15px; color: var(--s7-text); }
.s7-side__promo small { color: var(--s7-muted); font-size: 12px; }

.s7-scrim {
  position: fixed; inset: 0; z-index: 890; background: rgba(0, 0, 0, .55);
  opacity: 0; pointer-events: none; transition: opacity .3s;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}

/* ---------- Main shell ---------- */
.s7-main {
  position: relative; z-index: 2;
  margin-left: var(--s7-side-w);
  padding: calc(var(--s7-header-h) + 8px) var(--s7-gutter) 0;
  min-height: 100vh;
  overflow-x: clip;
}
.s7-main > .main-grids { margin: 0; padding: 0; background: transparent; }

/* ---------- Section headers ---------- */
.s7-section { margin: 48px 0 0; }
.s7-section:first-child { margin-top: 12px; }
.s7-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.s7-section__title { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.s7-section__index { font: 600 12px/1 ui-monospace, "SFMono-Regular", Menlo, monospace; color: var(--s7-accent); letter-spacing: .08em; }
.s7-section__title h2 {
  margin: 0; font-family: var(--s7-display); font-weight: 750; font-size: clamp(20px, 2.1vw, 28px);
  letter-spacing: -.02em; color: var(--s7-text); line-height: 1.1;
}
.s7-section__sub { color: var(--s7-muted); font-size: 13.5px; margin: 6px 0 0; }
.s7-link-more {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  font-size: 13px; font-weight: 600; color: var(--s7-text-2) !important;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--s7-line);
  transition: all .2s;
}
.s7-link-more:hover { color: var(--s7-text) !important; border-color: var(--s7-line-strong); background: var(--s7-surface); }
.s7-link-more i { font-size: 11px; transition: transform .2s; }
.s7-link-more:hover i { transform: translateX(3px); }
.s7-rail-ctrl { display: flex; gap: 8px; }
.s7-rail-ctrl button {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--s7-line);
  background: transparent; color: var(--s7-text-2); cursor: pointer; transition: all .2s;
}
.s7-rail-ctrl button:hover { background: var(--s7-surface-2); color: var(--s7-text); }

/* ---------- Hero ---------- */
.s7-hero {
  position: relative; overflow: hidden;
  border-radius: var(--s7-radius-lg);
  height: clamp(420px, 62vh, 640px);
  background: #000; isolation: isolate;
  box-shadow: var(--s7-shadow);
}
.s7-hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1s var(--s7-ease), visibility 1s;
}
.s7-hero__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.s7-hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 25%;
  transform: scale(1.12);
  transition: transform 9s linear;
}
.s7-hero__slide.is-active .s7-hero__bg { transform: scale(1.0); }
.s7-hero__slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 7, 11, .92) 0%, rgba(7, 7, 11, .62) 38%, rgba(7, 7, 11, 0) 70%),
    linear-gradient(0deg, rgba(7, 7, 11, .95) 0%, rgba(7, 7, 11, 0) 50%);
}
.s7-hero__content {
  position: absolute; z-index: 2; left: clamp(22px, 4vw, 56px); bottom: clamp(28px, 5vw, 64px);
  max-width: min(620px, 52%); color: #fff;
}
.s7-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 11px/1 var(--s7-font); letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .78);
  padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.s7-eyebrow .s7-live { width: 7px; height: 7px; border-radius: 50%; background: var(--s7-accent); box-shadow: 0 0 0 0 rgba(255, 77, 46, .7); animation: s7-pulse 2s infinite; }
@keyframes s7-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 46, .6); } 70% { box-shadow: 0 0 0 10px rgba(255, 77, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 46, 0); } }
.s7-hero__title {
  margin: 18px 0 0; font-family: var(--s7-display); font-weight: 800;
  font-size: clamp(34px, 5.2vw, 72px); line-height: 1.04; letter-spacing: normal; /* Khmer titles: letter-spacing breaks cluster shaping */
  text-wrap: balance;
}
.s7-hero__title span { display: block; }
.s7-hero__title span + span {
  background: linear-gradient(92deg, var(--s7-accent-2), var(--s7-accent) 60%, #ff2e63);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.s7-hero__slide.is-active .s7-hero__title span,
.s7-hero__slide.is-active .s7-hero__actions,
.s7-hero__slide.is-active .s7-eyebrow { animation: s7-rise .9s var(--s7-ease) both; }
.s7-hero__slide.is-active .s7-hero__title span + span { animation-delay: .08s; }
.s7-hero__slide.is-active .s7-hero__actions { animation-delay: .16s; }
@keyframes s7-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.s7-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.s7-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 700 14.5px/1 var(--s7-font); letter-spacing: .01em;
  transition: transform .2s var(--s7-ease), box-shadow .2s, background .2s, opacity .2s;
  white-space: nowrap;
}
.s7-btn--primary { background: var(--s7-accent); color: #fff !important; box-shadow: 0 10px 30px -10px var(--s7-accent); }
.s7-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px var(--s7-accent); }
.s7-btn--glass {
  background: rgba(255, 255, 255, .12); color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.s7-btn--glass:hover { background: rgba(255, 255, 255, .2); }
.s7-btn--ghost { background: var(--s7-surface); color: var(--s7-text) !important; border: 1px solid var(--s7-line); }
.s7-btn--ghost:hover { background: var(--s7-surface-2); }
.s7-btn--sm { height: 38px; padding: 0 16px; font-size: 13px; }
.s7-btn i { font-size: .95em; }

.s7-hero__thumbs {
  position: absolute; z-index: 3; right: clamp(16px, 2.4vw, 32px); bottom: clamp(20px, 3vw, 36px);
  display: flex; gap: 10px;
}
.s7-hero__thumb {
  position: relative; width: 148px; height: 84px; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18); padding: 0; cursor: pointer; background: #111;
  opacity: .62; transition: opacity .3s, transform .3s var(--s7-ease), border-color .3s;
}
.s7-hero__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s7-hero__thumb span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px;
  font: 600 11px/1.2 var(--s7-font); color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s7-hero__thumb:hover { opacity: .9; transform: translateY(-3px); }
.s7-hero__thumb.is-active { opacity: 1; border-color: rgba(255, 255, 255, .7); }
.s7-hero__thumb i {
  position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--s7-accent);
}
.s7-hero__thumb.is-active i { animation: s7-progress var(--s7-hero-interval, 7000ms) linear forwards; }
.s7-hero.is-paused .s7-hero__thumb.is-active i { animation-play-state: paused; }
@keyframes s7-progress { to { width: 100%; } }
.s7-hero__count {
  position: absolute; z-index: 3; top: 22px; right: 24px;
  font: 600 12px/1 ui-monospace, Menlo, monospace; color: rgba(255, 255, 255, .7); letter-spacing: .1em;
}
.s7-hero__count b { color: #fff; font-size: 15px; }

/* ---------- Genre chips ---------- */
.s7-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin-top: 22px; scroll-snap-type: x proximity; }
.s7-chip {
  flex: 0 0 auto; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--s7-surface); border: 1px solid var(--s7-line);
  color: var(--s7-text-2) !important; font-size: 13.5px; font-weight: 600;
  transition: all .2s;
}
.s7-chip:hover { border-color: var(--s7-line-strong); color: var(--s7-text) !important; transform: translateY(-1px); }
.s7-chip.is-active { background: var(--s7-text); color: var(--s7-bg) !important; border-color: var(--s7-text); }
.s7-chip i { color: var(--s7-accent); font-size: 12px; }
.s7-chip.is-active i { color: var(--s7-accent); }

/* ---------- Movie card ---------- */
.s7-grid {
  display: grid; gap: 26px 18px;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
}
@media (min-width: 1500px) { .s7-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); } }

.s7-card { position: relative; min-width: 0; }
.s7-card__poster {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 2 / 3; border-radius: var(--s7-radius);
  background: linear-gradient(135deg, var(--s7-surface-2), var(--s7-surface));
  box-shadow: var(--s7-card-shadow);
  transform: translateZ(0);
  transition: transform .45s var(--s7-ease), box-shadow .45s;
}
.s7-card__poster img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--s7-ease), filter .4s;
}
.s7-card__poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, transparent 25%, transparent 55%, rgba(0, 0, 0, .75) 100%);
  opacity: .7; transition: opacity .4s;
}
.s7-card__play {
  position: absolute; z-index: 2; left: 50%; top: 50%;
  width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 16px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transform: scale(.7); transition: all .35s var(--s7-ease);
}
.s7-card__play i { margin-left: 3px; }
.s7-card:hover .s7-card__poster { transform: translateY(-6px); box-shadow: 0 28px 50px -22px rgba(0, 0, 0, .9), 0 0 0 1px var(--s7-line-strong); }
.s7-card:hover .s7-card__poster img { transform: scale(1.07); }
.s7-card:hover .s7-card__poster::after { opacity: 1; }
.s7-card:hover .s7-card__play { opacity: 1; transform: scale(1); }
.s7-badge {
  position: absolute; z-index: 2; top: 10px;
  height: 24px; padding: 0 9px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  font: 700 11px/1 var(--s7-font); letter-spacing: .02em;
}
.s7-badge--ep { left: 10px; background: var(--s7-gold); color: #1a1200; }
.s7-badge--time {
  right: 10px; color: #fff; background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
}
.s7-card__body { padding: 12px 2px 0; }
.s7-card__title, .s7-card .movie__title_posts { display: block; color: var(--s7-text) !important; }
.s7-card__title p, .s7-card .movie__title_posts p {
  margin: 0; font-weight: 650; font-size: 14.5px; line-height: 1.35; color: var(--s7-text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.s7-card:hover .movie__title_posts p { color: var(--s7-accent); }
.s7-card__meta {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 12.5px; color: var(--s7-muted); min-width: 0;
}
.s7-card__meta .s7-card__genre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.s7-card__meta .s7-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--s7-muted); flex: 0 0 auto; opacity: .7; }
.s7-card__meta .s7-views { flex: 0 0 auto; }

/* ---------- Rails (horizontal scrollers) ---------- */
.s7-rail {
  display: grid; grid-auto-flow: column; gap: 18px;
  grid-auto-columns: minmax(156px, 176px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px;
  padding: 6px 2px 14px; margin: -6px -2px 0;
  overscroll-behavior-x: contain;
}
.s7-rail > * { scroll-snap-align: start; }

/* Top picks – ranked rail */
.s7-rail--rank { grid-auto-columns: minmax(220px, 250px); gap: 8px; }
.s7-rank { display: flex; align-items: flex-end; }
.s7-rank__num {
  flex: 0 0 auto; width: 78px; margin-right: -16px; z-index: 0;
  font: 900 150px/0.78 var(--s7-display); letter-spacing: -.08em; text-align: right;
  color: var(--s7-bg); -webkit-text-stroke: 2px var(--s7-line-strong);
  user-select: none; transition: -webkit-text-stroke-color .3s;
}
.s7-rank:hover .s7-rank__num { -webkit-text-stroke-color: var(--s7-accent); }
.s7-rank .s7-card { flex: 1; z-index: 1; }

/* Collection cards */
.s7-rail--wide { grid-auto-columns: minmax(300px, 420px); }
.s7-collection {
  position: relative; display: block; overflow: hidden; border-radius: var(--s7-radius-lg);
  aspect-ratio: 16 / 9; background: var(--s7-surface); isolation: isolate;
  box-shadow: var(--s7-card-shadow);
}
.s7-collection__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--s7-ease); }
.s7-collection::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 7, 11, .92) 0%, rgba(7, 7, 11, .55) 55%, rgba(7, 7, 11, .15) 100%); }
.s7-collection:hover .s7-collection__bg { transform: scale(1.06); }
.s7-collection__inner { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 16px; padding: 18px; }
.s7-collection__poster {
  width: 86px; aspect-ratio: 2 / 3; border-radius: 10px; object-fit: cover; flex: 0 0 auto;
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .8); border: 1px solid rgba(255, 255, 255, .18);
  transition: transform .5s var(--s7-ease);
}
.s7-collection:hover .s7-collection__poster { transform: translateY(-4px) rotate(-2deg); }
.s7-collection__text { min-width: 0; color: #fff; }
.s7-collection__kicker { font: 700 10.5px/1 var(--s7-font); letter-spacing: .16em; text-transform: uppercase; color: var(--s7-gold); }
.s7-collection__title { margin: 6px 0 4px; font: 750 19px/1.25 var(--s7-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s7-collection__desc { margin: 0 0 12px; font-size: 12.5px; color: rgba(255, 255, 255, .72); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s7-collection__cta { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #fff; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }
.s7-collection:hover .s7-collection__cta { background: var(--s7-accent); border-color: var(--s7-accent); }
.s7-collection-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.s7-collection-grid .s7-collection { aspect-ratio: 16 / 8; }
.s7-collection-grid .s7-collection__poster { width: 104px; }
.s7-collection-grid .s7-collection__title { font-size: 22px; }

/* Landscape feature cards */
.s7-rail--land { grid-auto-columns: minmax(260px, 340px); }
.s7-land { position: relative; display: block; border-radius: var(--s7-radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--s7-surface); box-shadow: var(--s7-card-shadow); }
.s7-land img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--s7-ease); }
.s7-land::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .85)); }
.s7-land__title { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 14px; color: #fff; font: 700 15px/1.3 var(--s7-display); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s7-land__play { position: absolute; z-index: 1; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); color: #fff; font-size: 12px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; }
.s7-land:hover img { transform: scale(1.06); }
.s7-land:hover .s7-land__play { opacity: 1; }

/* ---------- Page header (list / explore) ---------- */
.s7-pagehead {
  position: relative; overflow: hidden;
  margin-top: 12px; padding: clamp(24px, 3.4vw, 40px);
  border-radius: var(--s7-radius-lg);
  background:
    radial-gradient(80% 140% at 100% 0%, var(--s7-accent-soft), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(255, 194, 75, .08), transparent 60%),
    var(--s7-surface);
  border: 1px solid var(--s7-line);
}
.s7-pagehead__kicker { font: 700 11px/1 var(--s7-font); letter-spacing: .16em; text-transform: uppercase; color: var(--s7-accent); }
.s7-pagehead h1 { margin: 10px 0 6px; font: 800 clamp(26px, 3.4vw, 44px)/1.15 var(--s7-display); color: var(--s7-text); }
.s7-pagehead h1 em { font-style: normal; color: var(--s7-accent); }
.s7-pagehead p { margin: 0; color: var(--s7-muted); font-size: 14px; }

.s7-cover {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 12px; border-radius: var(--s7-radius-lg);
  min-height: clamp(280px, 42vh, 440px);
  display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
  box-shadow: var(--s7-shadow);
}
.s7-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,7,11,.94), rgba(7,7,11,.55) 60%, rgba(7,7,11,.2)), linear-gradient(0deg, rgba(7,7,11,.8), transparent 60%); }
.s7-cover__inner { display: flex; align-items: flex-end; gap: clamp(16px, 3vw, 32px); padding: clamp(20px, 4vw, 44px); color: #fff; }
.s7-cover__poster { width: clamp(110px, 12vw, 168px); aspect-ratio: 2/3; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255,255,255,.2); box-shadow: 0 24px 50px -16px rgba(0,0,0,.9); flex: 0 0 auto; }
.s7-cover h1 { margin: 8px 0 8px; font: 800 clamp(26px, 4vw, 52px)/1.1 var(--s7-display); }
.s7-cover p { margin: 0; max-width: 680px; color: rgba(255,255,255,.78); font-size: 14.5px; }

/* ---------- Pagination (Bootstrap 4 markup) ---------- */
.movie__pagination { margin: 36px 0 0; display: flex; justify-content: center; }
.movie__pagination .pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.movie__pagination .pagination > li > a,
.movie__pagination .pagination > li > span,
.movie__pagination .page-link {
  float: none !important; display: grid !important; place-items: center;
  min-width: 42px; height: 42px; padding: 0 12px !important; margin: 0 !important;
  border-radius: 12px !important; border: 1px solid var(--s7-line) !important;
  background: var(--s7-surface) !important; color: var(--s7-text-2) !important;
  font-weight: 600; font-size: 14px; transition: all .2s;
}
.movie__pagination .page-link:hover { border-color: var(--s7-line-strong) !important; color: var(--s7-text) !important; }
.movie__pagination .active .page-link,
.movie__pagination .pagination > .active > span { background: var(--s7-accent) !important; border-color: var(--s7-accent) !important; color: #fff !important; }
.movie__pagination .disabled .page-link { opacity: .4; }

/* ---------- Detail page ---------- */
.s7-detail { position: relative; padding-top: 12px; }
.s7-ambient {
  position: absolute; z-index: -1; left: -10%; right: -10%; top: -120px; height: 720px;
  background-size: cover; background-position: center;
  filter: blur(90px) saturate(1.5); opacity: .32;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  pointer-events: none;
}
[data-theme="light"] .s7-ambient { opacity: .22; }
.s7-detail__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.s7-player {
  position: relative; overflow: hidden; border-radius: var(--s7-radius-lg);
  aspect-ratio: 16 / 9; background: #000;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 0 1px var(--s7-line);
}
.s7-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.s7-servers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.s7-servers__label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--s7-muted); margin-right: 6px; }
body.s7 .movie__button,
body.s7 #movie__btn_server .btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px !important;
  background: var(--s7-surface) !important; border: 1px solid var(--s7-line) !important;
  color: var(--s7-text-2) !important; font: 600 13px/1 var(--s7-font) !important;
  box-shadow: none !important; transition: all .2s; margin: 0 !important;
}
body.s7 #movie__btn_server .btn:hover,
body.s7 .movie__button:hover { color: var(--s7-text) !important; border-color: var(--s7-line-strong) !important; background: var(--s7-surface-2) !important; }
body.s7 #movie__btn_server .btn.is-active,
body.s7 #movie__btn_server .btn:focus { background: var(--s7-accent-soft) !important; color: var(--s7-accent) !important; border-color: var(--s7-accent) !important; }
body.s7 #movie__btn_server .btn i { font-size: 10px; }

.s7-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 24px; }
.s7-detail h1#movie__title {
  margin: 0; font: 800 clamp(24px, 2.8vw, 36px)/1.12 var(--s7-display);
  letter-spacing: normal; color: var(--s7-text); text-wrap: balance;
}
.s7-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; color: var(--s7-muted); font-size: 13.5px; }
.s7-meta span { display: inline-flex; align-items: center; gap: 7px; }
.s7-meta i { color: var(--s7-text-2); font-size: 12px; }
.s7-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.s7-tag {
  height: 30px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center;
  background: var(--s7-surface); border: 1px solid var(--s7-line);
  font-size: 12.5px; font-weight: 600; color: var(--s7-text-2) !important; transition: all .2s;
}
.s7-tag:hover { color: var(--s7-accent) !important; border-color: var(--s7-accent); }
.s7-tag--gold { color: var(--s7-gold) !important; border-color: rgba(255,194,75,.35); background: rgba(255,194,75,.08); }

.s7-alert {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border-radius: var(--s7-radius);
  background: rgba(255, 77, 46, .1); border: 1px solid rgba(255, 77, 46, .35); color: var(--s7-text);
  font-size: 14px; font-weight: 600;
}
.s7-alert i { color: var(--s7-accent); font-size: 18px; }

/* reaction bar — keeps legacy hook classes */
.s7-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.s7-pillgroup { display: inline-flex; align-items: stretch; border-radius: 999px; background: var(--s7-surface); border: 1px solid var(--s7-line); overflow: hidden; }
.s7-pillgroup > div { display: flex; }
.s7-pillgroup > div + div { border-left: 1px solid var(--s7-line); }
body.s7 .s7-act {
  display: inline-flex !important; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px; cursor: pointer;
  color: var(--s7-text-2); font-size: 13.5px; font-weight: 650;
  background: transparent; border: 0; border-radius: 0; transition: background .2s, color .2s;
  width: auto !important; margin: 0 !important;
}
body.s7 .s7-act:hover { background: var(--s7-surface-2); color: var(--s7-text); }
body.s7 .s7-act svg { width: 20px !important; height: 20px !important; fill: currentColor; }
body.s7 .s7-act svg path { fill: currentColor !important; }
.s7-act--solo { border-radius: 999px !important; background: var(--s7-surface) !important; border: 1px solid var(--s7-line) !important; }
body.s7 .movie__like_btn_active, body.s7 .movie__like_btn_active:hover { color: var(--s7-accent) !important; background: var(--s7-accent-soft) !important; }
body.s7 .movie__unlike_btn_active, body.s7 .movie__unlike_btn_active:hover { color: var(--s7-gold) !important; background: rgba(255,194,75,.1) !important; }

.s7-panel {
  margin-top: 24px; padding: 22px; border-radius: var(--s7-radius-lg);
  background: var(--s7-surface); border: 1px solid var(--s7-line);
}
.s7-panel h3 { margin: 0 0 14px; font: 750 17px/1.2 var(--s7-display); color: var(--s7-text); letter-spacing: -.01em; }
.s7-panel #myList { list-style: none; margin: 0; padding: 0; }
.s7-panel #myList li { display: block !important; }
.s7-prose { color: var(--s7-text-2); font-size: 14.5px; line-height: 1.75; }
.s7-prose p { margin: 0 0 1em; }
.s7-prose img { border-radius: 12px; height: auto; }
.s7-prose.is-clamped { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.s7-readmore { margin-top: 10px; background: none; border: 0; padding: 0; color: var(--s7-accent); font-weight: 700; font-size: 13px; cursor: pointer; }

.s7-info { display: grid; grid-template-columns: 132px 1fr; gap: 22px; align-items: start; }
.s7-info img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; box-shadow: var(--s7-card-shadow); }
.s7-info dl { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; font-size: 14px; }
.s7-info dt { color: var(--s7-muted); font-weight: 500; }
.s7-info dd { margin: 0; color: var(--s7-text); font-weight: 600; min-width: 0; }
.s7-info dd a { color: var(--s7-text) !important; border-bottom: 1px dashed var(--s7-line-strong); }
.s7-info dd a:hover { color: var(--s7-accent) !important; border-color: var(--s7-accent); }

.s7-banner { display: block; margin-top: 24px; border-radius: var(--s7-radius-lg); overflow: hidden; }
.s7-banner img { display: block; width: 100%; }

/* aside */
.s7-aside { position: sticky; top: calc(var(--s7-header-h) + 12px); display: flex; flex-direction: column; gap: 20px; }
.s7-aside .s7-panel { margin-top: 0; padding: 18px; }
.s7-aside__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.s7-aside__head h3 { margin: 0; }
.s7-aside__head small { color: var(--s7-muted); font-weight: 600; font-size: 12px; }
.s7-eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.s7-ep {
  height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--s7-surface-2); border: 1px solid var(--s7-line);
  color: var(--s7-text-2); font-weight: 700; font-size: 13px; cursor: pointer;
  transition: all .2s; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.s7-ep:hover { border-color: var(--s7-line-strong); color: var(--s7-text); transform: translateY(-1px); }
.s7-ep.is-active { background: var(--s7-accent); border-color: var(--s7-accent); color: #fff; box-shadow: 0 8px 20px -8px var(--s7-accent); }

.s7-related { display: flex; flex-direction: column; gap: 4px; }
.s7-mini { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 14px; transition: background .2s; }
.s7-mini:hover { background: var(--s7-surface-2); }
.s7-mini__img { position: relative; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: var(--s7-surface-2); }
.s7-mini__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s7-mini__body { min-width: 0; }
.s7-mini__title { margin: 0; font-weight: 650; font-size: 14px; line-height: 1.35; color: var(--s7-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s7-mini:hover .s7-mini__title { color: var(--s7-accent); }
.s7-mini__meta { margin: 4px 0 0; font-size: 12px; color: var(--s7-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.s7-share { margin-top: 18px; }

/* Trailer popup (sweetalert) */
.movie__trailer_iframe_popup { width: min(960px, 92vw) !important; background: #000 !important; border-radius: 18px !important; padding: 0 !important; overflow: hidden; }
.movie__trailer_iframe_popup iframe { display: block; aspect-ratio: 16/9; height: auto !important; }

/* ---------- Ads ---------- */
.s7-ad { margin: 40px 0 0; text-align: center; overflow: hidden; }
.s7-ad:empty { display: none; }

/* ---------- Footer ---------- */
.s7-footer { margin-top: 72px; padding: 44px 0 110px; border-top: 1px solid var(--s7-line); position: relative; }
.s7-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 32px; }
.s7-footer__brand img { height: 34px; width: auto; }
.s7-footer__brand p { margin: 14px 0 18px; color: var(--s7-muted); font-size: 13.5px; max-width: 320px; }
.s7-footer h4 { margin: 4px 0 14px; font: 700 12px/1 var(--s7-font); letter-spacing: .14em; text-transform: uppercase; color: var(--s7-muted); }
.s7-footer ul { list-style: none; margin: 0; padding: 0; }
.s7-footer li + li { margin-top: 10px; }
.s7-footer li a { color: var(--s7-text-2) !important; font-size: 14px; transition: color .2s; }
.s7-footer li a:hover { color: var(--s7-accent) !important; }
.s7-tg {
  display: flex !important; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--s7-radius);
  background: linear-gradient(135deg, rgba(55, 174, 226, .16), rgba(30, 150, 200, .04)); border: 1px solid rgba(55, 174, 226, .3);
  transition: transform .2s var(--s7-ease);
}
.s7-tg:hover { transform: translateY(-2px); }
.s7-tg svg { width: 40px; height: 40px; flex: 0 0 auto; }
.s7-tg b { display: block; color: var(--s7-text); font-size: 14px; }
.s7-tg small { color: var(--s7-muted); font-size: 12px; }
.s7-fb { border-radius: var(--s7-radius); overflow: hidden; }
.s7-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--s7-line); color: var(--s7-muted); font-size: 13px; }
.s7-footer__bottom a { color: var(--s7-text) !important; font-weight: 600; }
.s7-footer__wordmark {
  margin: 28px 0 0; font: 900 clamp(56px, 13vw, 200px)/.8 var(--s7-display); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px var(--s7-line-strong); user-select: none; white-space: nowrap; overflow: hidden;
}

/* Floating Telegram pin */
.s7-pin {
  position: fixed; z-index: 950; right: 22px; bottom: 22px;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--s7-surface); border: 1px solid var(--s7-line-strong); box-shadow: var(--s7-shadow);
  transition: transform .25s var(--s7-ease);
}
.s7-pin:hover { transform: translateY(-3px) scale(1.04); }
.s7-pin svg { width: 34px; height: 34px; }

/* ---------- Mobile bottom tab bar ---------- */
.s7-tabbar { display: none; }

/* ---------- Empty state ---------- */
.s7-empty { padding: 60px 20px; text-align: center; color: var(--s7-muted); border: 1px dashed var(--s7-line-strong); border-radius: var(--s7-radius-lg); }
.s7-empty i { font-size: 34px; color: var(--s7-text-2); margin-bottom: 12px; }
.s7-empty h3 { margin: 0 0 6px; font: 700 18px var(--s7-display); color: var(--s7-text); }

/* ---------- Responsive ---------- */
@media (max-width: 1399px) {
  .s7-detail__grid { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1199px) {
  :root { --s7-side-w: 84px; }
  .s7-header__brand { width: auto; }
  .s7-side { padding: 8px 10px 24px; }
  .s7-side__label, .s7-side__promo, .s7-side__group--genres { display: none; }
  .s7-nav a { justify-content: center; padding: 0; height: 52px; flex-direction: column; gap: 4px; font-size: 10.5px; }
  .s7-nav a i { font-size: 18px; }
  .s7-nav a span { max-width: 64px; }
  .s7-nav li.active > a::before { left: -10px; }
  .s7-detail__grid { grid-template-columns: 1fr; }
  .s7-aside { position: static; }
  .s7-hero__thumb { width: 120px; height: 70px; }
  .s7-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991px) {
  :root { --s7-side-w: 0px; --s7-header-h: 62px; }
  .s7-burger { display: inline-flex; }
  .s7-header { gap: 10px; padding: 0 14px; }
  .s7-header__brand img { height: 28px; }
  .s7-side {
    width: 290px; top: 0; padding: 18px 16px 100px; z-index: 1100;
    background: var(--s7-bg-2); border-right: 1px solid var(--s7-line);
    transform: translateX(-102%); transition: transform .35s var(--s7-ease);
  }
  .s7-side__label, .s7-side__promo, .s7-side__group--genres { display: block; }
  .s7-nav a { justify-content: flex-start; flex-direction: row; height: 46px; padding: 0 12px; gap: 14px; font-size: 14px; }
  .s7-nav a span { max-width: none; }
  .s7-nav li.active > a::before { left: -16px; }
  .s7-side__mobilehead { display: flex !important; }
  body.s7-drawer-open .s7-side { transform: none; }
  body.s7-drawer-open .s7-scrim { opacity: 1; pointer-events: auto; z-index: 1050; }
  body.s7-drawer-open { overflow: hidden; }
  .s7-main { padding-left: 14px; padding-right: 14px; }
  .s7-hero__thumbs { display: none; }
  .s7-hero__dots { display: flex !important; }
  .s7-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; z-index: 1000; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    height: 64px; padding: 6px; border-radius: 22px;
    background: var(--s7-glass); border: 1px solid var(--s7-glass-line);
    -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px);
    box-shadow: 0 20px 40px -12px rgba(0,0,0,.6);
  }
  .s7-tabbar a, .s7-tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border-radius: 16px; border: 0; background: transparent; color: var(--s7-muted) !important;
    font: 600 10.5px/1 var(--s7-font); cursor: pointer;
  }
  .s7-tabbar i { font-size: 17px; }
  .s7-tabbar .is-active { color: var(--s7-text) !important; background: var(--s7-surface-2); }
  .s7-tabbar .is-active i { color: var(--s7-accent); }
  .s7-pin { bottom: 92px; right: 16px; width: 48px; height: 48px; }
  .s7-pin svg { width: 30px; height: 30px; }
}
@media (max-width: 767px) {
  .s7-hero__content { max-width: none; }
  .s7-search select { display: none; }
  .s7-header__actions .s7-hide-sm { display: none; }
  .s7-btn-login { padding: 0 14px; height: 38px; font-size: 13px; }
  .s7-icon-btn, .s7-avatar { width: 38px; height: 38px; }
  .s7-hero { height: auto; aspect-ratio: 4 / 5; max-height: 78vh; border-radius: 20px; }
  .s7-hero__slide::after { background: linear-gradient(0deg, rgba(7,7,11,.98) 0%, rgba(7,7,11,.6) 45%, rgba(7,7,11,0) 75%); }
  .s7-hero__content { left: 20px; right: 20px; bottom: 44px; max-width: none; }
  .s7-hero__actions .s7-btn { flex: 1; }
  .s7-section { margin-top: 36px; }
  .s7-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
  .s7-card__poster { border-radius: 12px; }
  .s7-badge { top: 7px; height: 20px; padding: 0 6px; font-size: 10px; }
  .s7-badge--ep { left: 7px; } .s7-badge--time { right: 7px; display: none; }
  .s7-card__title p, .s7-card .movie__title_posts p { font-size: 13px; }
  .s7-card__meta { font-size: 11.5px; } .s7-card__meta .s7-views, .s7-card__meta .s7-sep { display: none; }
  .s7-card__play { display: none; }
  .s7-rail { grid-auto-columns: 40%; gap: 12px; }
  .s7-rail--rank { grid-auto-columns: 62%; }
  .s7-rank__num { font-size: 110px; width: 60px; margin-right: -18px; }
  .s7-rail--wide { grid-auto-columns: 86%; }
  .s7-rail--land { grid-auto-columns: 78%; }
  .s7-rail-ctrl { display: none; }
  .s7-collection-grid .s7-collection { aspect-ratio: 16 / 10; }
  .s7-info { grid-template-columns: 96px 1fr; gap: 16px; }
  .s7-info dl { grid-template-columns: 1fr; gap: 2px; }
  .s7-info dd { margin-bottom: 8px; }
  .s7-player { border-radius: 14px; margin: 0 -4px; }
  .s7-title-row { flex-direction: column; }
  .s7-footer__grid { grid-template-columns: 1fr; }
  .s7-cover__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .s7-header { gap: 8px; padding: 0 10px; }
  .s7-header__brand img { height: 22px; }
  .s7-icon-btn, .s7-avatar { width: 34px; height: 34px; }
  .s7-burger { width: 34px; height: 34px; }
  .s7-search input { padding: 0 6px 0 10px; font-size: 13px; }
  .s7-search button { width: 32px; height: 32px; }
  .s7-search .movie__input_search_panel { height: 40px; }
  .s7-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .s7-card__meta .s7-views, .s7-card__meta .s7-sep { display: inline-block; }
}
.s7-hero__dots { display: none; position: absolute; z-index: 3; left: 20px; bottom: 20px; gap: 6px; }
.s7-hero__dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255,255,255,.4); transition: width .3s, background .3s; }
.s7-hero__dots button.is-active { width: 26px; background: #fff; }
.s7-side__mobilehead { display: none; align-items: center; justify-content: space-between; padding: 0 4px 16px; }
.s7-side__mobilehead img { height: 28px; }

@media (prefers-reduced-motion: reduce) {
  body.s7 *, body.s7 *::before, body.s7 *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Legacy bridge — remap theme-v2 variables & shell so untouched pages
   (auth, history, saved, liked, notification, contact, pages) match.
   ========================================================================== */
[data-theme="dark"] {
  --nav-header-bg: var(--s7-bg); --nav-header-input-bg: var(--s7-surface-2); --nav-header-text-color: var(--s7-text);
  --sidebar-bg: var(--s7-bg); --main-bg: var(--s7-bg); --main-video-bg: var(--s7-surface);
  --main-video-text-color: var(--s7-text); --main-video-sub-text-color: var(--s7-muted); --main-title-color: var(--s7-text);
  --main-ntfc-bg: var(--s7-bg); --main-list-bg-hover: var(--s7-surface); --main-login-bg: var(--s7-surface);
  --main-login-input-bg: var(--s7-surface-2); --main-login-input-color: var(--s7-text); --main-login-btn-bg: var(--s7-accent);
  --main-publish-bg: var(--s7-surface); --msg-warning-bg: var(--s7-surface-2);
  --main-eps-bg: var(--s7-surface); --main-eps-border: var(--s7-line-strong); --main-eps-bg-hover: var(--s7-surface-2);
  --icon-title-bg: var(--s7-accent-soft); --icon-title-text: var(--s7-accent);
  --title-icon-bg-deep-purple: var(--s7-accent-soft); --title-icon-bg-purple: var(--s7-accent-soft);
  --title-icon-bg-blue: var(--s7-accent-soft); --title-icon-bg-pink: var(--s7-accent-soft); --title-icon-bg-teal: var(--s7-accent-soft);
  --pagin-bg: var(--s7-surface); --pagin-color: var(--s7-text);
}
[data-theme="light"] {
  --nav-header-bg: var(--s7-bg); --nav-header-input-bg: var(--s7-surface-2); --nav-header-text-color: var(--s7-text);
  --sidebar-bg: var(--s7-bg); --main-bg: var(--s7-bg); --main-video-bg: var(--s7-surface);
  --main-video-text-color: var(--s7-text); --main-video-sub-text-color: var(--s7-muted); --main-title-color: var(--s7-text);
  --main-ntfc-bg: var(--s7-bg); --main-list-bg-hover: var(--s7-surface); --main-login-bg: var(--s7-surface);
  --main-login-input-bg: var(--s7-surface-2); --main-login-input-color: var(--s7-text); --main-login-btn-bg: var(--s7-accent);
  --main-publish-bg: var(--s7-surface); --msg-warning-bg: var(--s7-surface-2);
  --main-eps-bg: var(--s7-surface); --main-eps-border: var(--s7-line-strong); --main-eps-bg-hover: var(--s7-surface-2);
  --icon-title-bg: var(--s7-accent-soft); --icon-title-text: var(--s7-accent);
  --title-icon-bg-deep-purple: var(--s7-accent-soft); --title-icon-bg-purple: var(--s7-accent-soft);
  --title-icon-bg-blue: var(--s7-accent-soft); --title-icon-bg-pink: var(--s7-accent-soft); --title-icon-bg-teal: var(--s7-accent-soft);
  --pagin-bg: var(--s7-surface); --pagin-color: var(--s7-text);
}
body.s7 .s7-main .container { width: 100%; max-width: 1100px; padding-left: 0; padding-right: 0; }
body.s7 .movie__home_title { display: flex; align-items: center; gap: 12px; margin: 16px 0 20px; }
body.s7 .movie__home_icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--s7-accent); }
body.s7 .movie__home_text span, body.s7 .movie__text_color { color: var(--s7-text); }
body.s7 .movie__home_text span { font: 750 24px/1.1 var(--s7-display); letter-spacing: -.02em; }
body.s7 .movie_his_item { background: var(--s7-surface); border: 1px solid var(--s7-line); border-radius: var(--s7-radius); padding: 12px; margin-bottom: 12px; }
body.s7 .movie_his_img img { border-radius: 10px; }
body.s7 .movie__login_panel { background: var(--s7-surface) !important; border: 1px solid var(--s7-line); border-radius: var(--s7-radius-lg) !important; padding: 32px !important; box-shadow: var(--s7-shadow); }
body.s7 .movie__input__field, body.s7 .form-control {
  background: var(--s7-surface-2) !important; border: 1px solid var(--s7-line) !important; color: var(--s7-text) !important;
  border-radius: 12px !important; box-shadow: none !important;
}
body.s7 .movie__input__field:focus, body.s7 .form-control:focus { border-color: var(--s7-accent) !important; box-shadow: 0 0 0 4px var(--s7-accent-soft) !important; }
body.s7 .s7-main .btn-primary { background: var(--s7-accent) !important; border-color: var(--s7-accent) !important; color: #fff !important; border-radius: 999px !important; }
body.s7 .alert { border-radius: var(--s7-radius); }
body.s7 .upload-grids { background: transparent; }

/* ==========================================================================
   Mobile search: icon in header → full-screen panel with recent searches
   ========================================================================== */
.s7-search-trigger { display: none !important; }
.s7-msearch { display: none; }

@media (max-width: 767px) {
  .s7-header .s7-search { display: none; }
  .s7-header__brand { margin-right: auto; }
  .s7-search-trigger { display: grid !important; }

  .s7-msearch {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; flex-direction: column;
    background: var(--s7-bg);
    padding: calc(10px + env(safe-area-inset-top)) 0 env(safe-area-inset-bottom);
    opacity: 0; transform: translateY(8px);
    transition: opacity .22s var(--s7-ease), transform .22s var(--s7-ease);
  }
  .s7-msearch[hidden] { display: none; }
  .s7-msearch.is-open { opacity: 1; transform: none; }
  body.s7-search-open { overflow: hidden; }

  .s7-msearch__bar { display: flex; align-items: center; gap: 6px; padding: 0 14px 0 6px; margin: 0; }
  .s7-msearch__back {
    width: 44px; height: 44px; flex: 0 0 auto; border: 0; background: transparent;
    color: var(--s7-text); font-size: 20px; display: grid; place-items: center; cursor: pointer; border-radius: 50%;
  }
  .s7-msearch__back:active { background: var(--s7-surface-2); }
  .s7-msearch__field {
    position: relative; flex: 1; min-width: 0;
    display: flex; align-items: center; height: 50px; padding: 0 6px 0 5px;
    border-radius: 999px; background: var(--s7-surface-2);
    border: 2px solid var(--s7-accent); box-shadow: 0 0 0 4px var(--s7-accent-soft);
  }
  body.s7 .s7-msearch__mode {
    flex: 0 0 auto; height: 36px; margin: 0; padding: 0 26px 0 14px; border: 0; outline: 0;
    border-radius: 999px; background-color: var(--s7-surface-3); color: var(--s7-text);
    font: 600 14px var(--s7-font); cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238b899a' stroke-width='1.6'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
  }
  body.s7 .s7-msearch__field input {
    flex: 1; min-width: 0; width: auto; height: 44px; padding: 0 36px 0 12px; margin: 0;
    border-radius: 0 !important; outline: 0; box-sizing: border-box;
    background: transparent; color: var(--s7-text);
    border: 0; box-shadow: none;
    font: 500 16px var(--s7-font); /* 16px stops iOS zooming on focus */
    -webkit-appearance: none; appearance: none;
  }
  .s7-msearch__field input::placeholder { color: var(--s7-muted); }
  .s7-msearch__field input::-webkit-search-cancel-button { display: none; }
  .s7-msearch__clear {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent;
    color: var(--s7-muted); display: none; place-items: center; cursor: pointer;
  }
  .s7-msearch.has-text .s7-msearch__clear { display: grid; }

  .s7-msearch__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 22px 6px; font: 700 11px/1 var(--s7-font); letter-spacing: .14em; text-transform: uppercase; color: var(--s7-muted);
  }
  .s7-msearch__clearall { border: 0; background: none; color: var(--s7-accent); font: 600 13px var(--s7-font); letter-spacing: 0; text-transform: none; padding: 6px 0; cursor: pointer; }
  .s7-msearch.no-history .s7-msearch__head { display: none; }

  .s7-msearch__list { list-style: none; margin: 0; padding: 0 0 24px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
  .s7-msearch__item { display: flex; align-items: center; }
  .s7-msearch__pick {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 20px;
    padding: 16px 0 16px 22px; border: 0; background: transparent; text-align: left; cursor: pointer;
    color: var(--s7-text); font: 600 17px/1.5 var(--s7-font);
  }
  .s7-msearch__pick i { font-size: 20px; color: var(--s7-text-2); width: 22px; text-align: center; flex: 0 0 auto; }
  .s7-msearch__pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .s7-msearch__pick mark { background: none; color: var(--s7-accent); padding: 0; }
  .s7-msearch__pick:active, .s7-msearch__remove:active { background: var(--s7-surface); }
  .s7-msearch__remove {
    width: 56px; height: 56px; flex: 0 0 auto; border: 0; background: transparent;
    color: var(--s7-muted); font-size: 18px; display: grid; place-items: center; cursor: pointer; margin-right: 6px; border-radius: 50%;
  }
  .s7-msearch__item.is-go .s7-msearch__pick i { color: var(--s7-accent); }

  .s7-msearch__empty { display: none; padding: 60px 40px; text-align: center; color: var(--s7-muted); }
  .s7-msearch__empty i { font-size: 34px; margin-bottom: 14px; opacity: .6; }
  .s7-msearch.no-history:not(.has-text) .s7-msearch__empty { display: block; }
}

/* ---------- Episodes: list layout ---------- */
.s7-eplist {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 460px; overflow-y: auto; margin: 0 -8px; padding: 0 4px 0 0;
  overscroll-behavior: contain; scrollbar-width: thin;
}
body.s7 .s7-eprow {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 32px; align-items: center; justify-items: stretch; gap: 14px;
  width: 100%; height: auto; padding: 8px; margin: 0;
  border: 1px solid transparent; border-radius: 14px; background: transparent;
  text-align: left; cursor: pointer; color: var(--s7-text-2);
  font-weight: 500; white-space: normal; overflow: visible; transform: none; box-shadow: none;
  transition: background .2s, border-color .2s;
}
body.s7 .s7-eprow:hover { background: var(--s7-surface-2); transform: none; }
.s7-eprow__thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--s7-surface-2); }
.s7-eprow__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: brightness(.7); transition: filter .2s; }
.s7-eprow:hover .s7-eprow__thumb img { filter: brightness(.85); }
.s7-eprow__num {
  position: absolute; left: 6px; bottom: 5px; color: #fff;
  font: 800 20px/1 var(--s7-display); text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.s7-eprow__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.s7-eprow__title { color: var(--s7-text); font-weight: 650; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s7-eprow__sub { color: var(--s7-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s7-eprow__icon {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--s7-line-strong); color: var(--s7-text-2); font-size: 10px;
  opacity: 0; transition: opacity .2s;
}
.s7-eprow__icon i { margin-left: 2px; }
.s7-eprow:hover .s7-eprow__icon { opacity: 1; }

/* now playing */
.s7-eprow__playing { position: absolute; right: 7px; bottom: 7px; display: none; align-items: flex-end; gap: 2px; height: 14px; }
.s7-eprow__playing i { width: 3px; background: var(--s7-accent); border-radius: 2px; animation: s7-eq 1s ease-in-out infinite; }
.s7-eprow__playing i:nth-child(2) { animation-delay: -.4s; }
.s7-eprow__playing i:nth-child(3) { animation-delay: -.7s; }
@keyframes s7-eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
body.s7 .s7-eprow.is-active { background: var(--s7-accent-soft); border-color: rgba(255, 77, 46, .35); box-shadow: none; }
.s7-eprow.is-active .s7-eprow__title { color: var(--s7-accent); }
.s7-eprow.is-active .s7-eprow__thumb img { filter: brightness(.55); }
.s7-eprow.is-active .s7-eprow__playing { display: flex; }
.s7-eprow.is-active .s7-eprow__icon { opacity: 1; background: var(--s7-accent); border-color: var(--s7-accent); color: #fff; }
@media (max-width: 767px) {
  .s7-eplist { max-height: 380px; }
  body.s7 .s7-eprow { grid-template-columns: 84px minmax(0, 1fr) 28px; gap: 12px; }
  .s7-eprow__icon { opacity: 1; width: 28px; height: 28px; }
}
