:root {
  --bg: #161922;
  --bg-rgb: 22 25 34;
  --bg2: #1d212c;
  --card: #232734;
  --line: #2f3547;
  --text: #eff1f7;
  --dim: #a6abbe;
  --accent: #e6396b;
  --accent2: #7b5cff;
  --grad: linear-gradient(135deg, #e6396b, #7b5cff);
  --radius: 14px;
  --header-h: 64px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-color: #454b60 var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; }
code { background: #0006; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.dim { color: var(--dim); }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, monospace; font-size: .85em; color: var(--dim); }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; gap: 26px;
  padding: 0 28px;
  background: rgb(var(--bg-rgb) / .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; letter-spacing: -.5px; }
.logo em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 7px 14px; border-radius: 9px; color: var(--dim); font-weight: 500; transition: .15s; }
.nav a:hover { color: var(--text); background: #ffffff10; }
.nav a.active { color: var(--text); background: #ffffff12; }

/* ---------- меню каталога ---------- */
.navmenu { position: relative; }
.navmenu-btn { padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line); background: #ffffff0c;
  color: var(--dim); font: inherit; font-size: 16px; cursor: pointer; transition: .15s; }
.navmenu-btn:hover { color: var(--text); background: #ffffff16; }
.navmenu-drop { position: absolute; left: 0; top: calc(100% + 10px); z-index: 150; display: none;
  grid-template-columns: 230px 230px; gap: 10px 34px; padding: 18px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 50px #000c; max-height: 78vh; overflow-y: auto; }
.navmenu-drop.open { display: grid; }
.nm-title { font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.nm-title-gap { margin-top: 20px; }
.nm-col a { display: flex; justify-content: space-between; gap: 14px; padding: 4.5px 0;
  font-size: 13.5px; color: var(--dim); }
.nm-col a:hover { color: var(--text); }
.nm-col a i { font-style: normal; color: #ffffff38; font-size: 12.5px; }
.nm-col a.nm-all { color: var(--text); font-weight: 600; }
.searchbox { position: relative; flex: 1; max-width: 420px; display: flex; align-items: center; gap: 9px; margin-left: auto;
  background: #ffffff0c; border: 1px solid var(--line); border-radius: 11px; padding: 8px 13px; color: var(--dim); }
.searchbox:focus-within { border-color: var(--accent); }
.searchbox input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: none; box-shadow: 0 18px 50px #000a; }
.suggest.open { display: block; }
.sug-item { display: flex; gap: 11px; padding: 9px 12px; align-items: center; }
.sug-item:hover { background: #ffffff0d; }
.sug-item img { width: 34px; height: 50px; object-fit: cover; border-radius: 6px; background: #0006; }
.sug-item .sug-t { font-size: 14px; font-weight: 600; }
.sug-item .sug-s { font-size: 12px; color: var(--dim); }
.sug-all { display: block; padding: 10px; text-align: center; font-size: 13px; color: var(--accent); border-top: 1px solid var(--line); }
.header-right { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 17px; border-radius: 11px;
  font: inherit; font-weight: 600; font-size: 14px; border: 0; cursor: pointer; transition: .15s; color: var(--text); }
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-ghost { background: #ffffff0c; border: 1px solid var(--line); }
.btn-ghost:hover { background: #ffffff16; }
.btn-glass { background: rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255,255,255,.22); }
.btn-glass.active { background: var(--accent); color: #fff; }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 13px; }
.btn.danger, .btn-ghost.danger:hover { color: #ff5d6c; border-color: #ff5d6c44; }

/* ---------- avatar / dropdown ---------- */
.usermenu { position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font: inherit; font-weight: 800; font-size: 16px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 264px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: none; box-shadow: 0 22px 60px #000c; }
.dropdown.open { display: block; animation: dropIn .16s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.drop-head { display: flex; align-items: center; gap: 12px; padding: 9px 10px 11px; }
.drop-avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex: 0 0 auto; }
.drop-name { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drop-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.drop-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.drop-stats a { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 2px; text-align: center; transition: border-color .15s, transform .15s; min-width: 0; }
.drop-stats a:hover { border-color: var(--accent); transform: translateY(-1px); }
.drop-stats b { display: block; font-size: 15px; color: var(--text); }
.drop-stats span { display: block; font-size: 10.5px; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-links { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 7px; }
.dropdown a, .drop-logout { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 9px; font: inherit; font-size: 14px; color: var(--text);
  background: none; border: 0; cursor: pointer; }
.dropdown a svg, .drop-logout svg { color: var(--dim); flex: 0 0 auto; transition: color .15s; }
.dropdown a:hover, .drop-logout:hover { background: #ffffff0d; }
.dropdown a:hover svg { color: var(--accent); }
.dropdown form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.drop-logout { color: #ff8a80; }
.drop-logout svg { color: #ff8a80aa; }
.drop-logout:hover svg { color: #ff8a80; }
.badge-admin { font-size: 10px; background: var(--grad); padding: 2px 7px; border-radius: 20px; vertical-align: middle; }

/* ---------- flash / banner ---------- */
.flash { position: fixed; top: calc(var(--header-h) + 14px); left: 50%; transform: translateX(-50%);
  z-index: 200; padding: 11px 20px; border-radius: 12px; font-weight: 600; font-size: 14px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 40px #000a; }
.flash-ok { border-color: #2ecc7155; color: #7bed9f; }
.flash-warn { border-color: #f1c40f55; color: #ffe08a; }
.demo-banner { padding: 9px 20px; text-align: center; font-size: 13px; background: #f1c40f18; color: #ffe08a; border-bottom: 1px solid #f1c40f30; }
.demo-banner a { text-decoration: underline; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 72vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity .8s ease; }
.hero-slide.cur { opacity: 1; pointer-events: auto; }
.hero-slide .hero-content { width: 100%; transform: translateY(16px); opacity: 0;
  transition: transform .75s ease .08s, opacity .7s ease .08s; }
.hero-slide.cur .hero-content { transform: none; opacity: 1; }
@keyframes heroZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero-slide.cur .hero-bg.art { animation: heroZoom 6.5s ease-out; }
.hero-dots { position: absolute; right: 34px; bottom: 30px; display: flex; gap: 8px; z-index: 5; }
.hero-dot { width: 8px; height: 8px; border-radius: 8px; border: none; padding: 0;
  background: #ffffff45; cursor: pointer; transition: .2s; }
.hero-dot.cur { width: 24px; background: #fff; }
.hero-dot:hover { background: #ffffffaa; }
.hero-bg { position: absolute; inset: -40px; background-size: cover; background-position: center 30%;
  filter: blur(10px) brightness(.55) saturate(1.15); transform: scale(1.04); }
.hero-bg.art { inset: 0; transform: none;
  filter: brightness(.72) saturate(1.12) contrast(1.03); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(var(--bg-rgb) / .33) 0%, rgb(var(--bg-rgb) / .19) 40%, var(--bg) 100%),
  linear-gradient(90deg, rgb(var(--bg-rgb) / .93) 0%, rgb(var(--bg-rgb) / .19) 60%, transparent 100%); }
.hero-content { position: relative; padding: 60px 48px; max-width: 640px; }
.hero-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  background: var(--grad); padding: 5px 12px; border-radius: 20px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(30px, 5vw, 56px); line-height: 1.05; letter-spacing: -1.5px; margin-bottom: 14px; }
.hero-meta { display: flex; gap: 14px; align-items: center; color: var(--dim); font-weight: 600; margin-bottom: 14px; }
.hero-desc { color: #d8dbe6; line-height: 1.6; margin-bottom: 26px; font-size: 15.5px; }
.hero-actions { display: flex; gap: 12px; }
.rate { font-weight: 800; padding: 3px 9px; border-radius: 8px; font-size: 13px; }
.rate.good { background: #2ecc7122; color: #7bed9f; }
.rate.mid { background: #f1c40f22; color: #ffe08a; }
.rate.bad { background: #e74c3c22; color: #ff8a80; }

/* ---------- layout ---------- */
.container { max-width: 1840px; margin: 0 auto; padding: 0 40px; }
.page { padding-top: 34px; padding-bottom: 40px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; letter-spacing: -.5px; }

/* ---------- rails ---------- */
.rail { margin: 34px 0; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.rail-head h2 { font-size: 20px; letter-spacing: -.4px; }
.rail-more { font-size: 13px; color: var(--accent); font-weight: 600; }
.rail-body { position: relative; }
.rail-scroll { display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column;
  grid-auto-columns: 158px; gap: 22px 14px; overflow-x: auto; padding: 4px 2px;
  scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail-scroll.rail-one { grid-template-rows: auto; }
.rail-scroll::-webkit-scrollbar { display: none; }
.rail-scroll .card, .rail-scroll .card-wrap { scroll-snap-align: start; }
.rail-scroll .card-wrap { display: block; }
.rail-arrow { position: absolute; top: 50%; transform: translateY(-60%); z-index: 6;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: rgb(var(--bg-rgb) / .72); backdrop-filter: blur(10px);
  color: var(--text); font-size: 26px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: .85; transition: opacity .2s, background .2s, transform .2s; }
.rail-body:hover .rail-arrow { opacity: 1; }
.rail-arrow:hover { background: var(--card); transform: translateY(-60%) scale(1.08); }
.rail-arrow.prev { left: -16px; }
.rail-arrow.next { right: -16px; }
.rail-arrow.off { opacity: 0 !important; pointer-events: none; }

/* ---------- card ---------- */
.card { display: block; transition: transform .18s; }
.card:hover { transform: translateY(-5px); }
.card-poster { position: relative; aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line); }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; }
.card:hover .card-poster img { transform: scale(1.06); }
.card-rate { position: absolute; top: 8px; right: 8px; font-size: 12px; font-weight: 800; padding: 3px 7px;
  border-radius: 7px; backdrop-filter: blur(6px); }
.card-rate.good { background: #2ecc71cc; color: #06290f; }
.card-rate.mid { background: #f1c40fcc; color: #3a2c00; }
.card-rate.bad { background: #e74c3ccc; color: #2e0600; }
.card-type { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; background: #000b; padding: 3px 8px; border-radius: 7px; color: #d8dbe6; }
.card-quality { position: absolute; bottom: 8px; left: 8px; font-size: 10px; font-weight: 700; background: #000b;
  padding: 3px 7px; border-radius: 7px; color: #d8dbe6; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-fav { position: absolute; right: 8px; bottom: 8px; z-index: 2; width: 32px; height: 32px;
  border: none; border-radius: 50%; background: #000a; color: #fff; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; opacity: .85; transition: .18s; }
.card-fav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.card-fav:hover { opacity: 1; transform: scale(1.12); background: #000d; }
.card-fav.on { color: var(--accent); }
.card-fav.on svg { fill: currentColor; }
.card-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: .2s; background: #0007; }
.card:hover .card-play { opacity: 1; }
.card-title { margin-top: 9px; font-size: 14px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12px; color: var(--dim); margin-top: 3px; }
.card-wrap { position: relative; }
.card-remove { position: absolute; top: 6px; right: 6px; z-index: 3; width: 26px; height: 26px; border-radius: 8px;
  border: 0; background: #000c; color: #fff; cursor: pointer; font-size: 12px; opacity: 0; transition: .15s; }
.card-wrap:hover .card-remove { opacity: 1; }
.card-remove:hover { background: var(--accent); }
.progress-line { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #0009; }
.progress-line i { display: block; height: 100%; background: var(--accent); }

/* ---------- grid / filters ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.fselect { position: relative; }
.fselect > select { display: none; }
.fsel-btn { display: flex; align-items: center; gap: 10px; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 15px; font: 600 14px inherit;
  cursor: pointer; transition: border-color .15s, box-shadow .15s; max-width: 260px; }
.fsel-btn:hover, .fselect.open .fsel-btn { border-color: var(--accent); box-shadow: 0 6px 18px #0005; }
.fsel-btn .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsel-btn .chev { margin-left: auto; color: var(--dim); font-size: 11px; transition: transform .2s; }
.fselect.open .fsel-btn .chev { transform: rotate(180deg); }
.fsel-list { position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; max-width: 86vw;
  max-height: 330px; overflow-y: auto; z-index: 60; display: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 20px 55px #000b; }
.fselect.open .fsel-list { display: block; animation: fselIn .15s ease; }
@keyframes fselIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.fsel-item { padding: 8px 12px; border-radius: 8px; font-size: 14px; cursor: pointer; white-space: nowrap; color: #d8dbe6; }
.fsel-item:hover { background: #ffffff0d; }
.fsel-item.sel { color: var(--accent); font-weight: 700; }
.fsel-list::-webkit-scrollbar { width: 8px; }
.fsel-list::-webkit-scrollbar-thumb { background: #3a4055; border-radius: 4px; }
.filters select, .filters input { background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 13px; font: inherit; font-size: 14px; }
.filters input { width: 100px; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }
.pg { min-width: 40px; height: 40px; padding: 0 13px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg2);
  color: #c9cede; font-weight: 600; font-size: 14px; transition: transform .15s, border-color .15s, color .15s, box-shadow .15s; }
.pg:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px #0007; }
.pg.cur { background: var(--grad); border-color: transparent; color: #fff; pointer-events: none;
  box-shadow: 0 8px 20px #e6396b33; }
.pg.dis { opacity: .3; pointer-events: none; }
.pg.nav { font-size: 21px; padding: 0 15px; }
.pg-dots { color: var(--dim); padding: 0 4px; letter-spacing: 2px; }
.pg-jump { display: flex; gap: 7px; margin-left: 14px; }
.pg-jump input { width: 86px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); padding: 0 10px; font: 600 13px inherit; text-align: center;
  transition: border-color .15s; }
.pg-jump input:focus { outline: none; border-color: var(--accent); }
.pg-jump input::-webkit-outer-spin-button, .pg-jump input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pg-jump input[type=number] { -moz-appearance: textfield; }
.pg-jump button { height: 40px; padding: 0 15px; border-radius: 12px; border: 1px solid var(--accent);
  background: transparent; color: var(--accent); font-size: 16px; font-weight: 700; cursor: pointer; transition: .15s; }
.pg-jump button:hover { background: var(--accent); color: #fff; }
.empty { padding: 70px 24px; text-align: center; color: var(--dim); background: var(--card);
  border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-ic { width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 20px;
  background: var(--bg2); border: 1px solid var(--line); color: var(--accent);
  display: flex; align-items: center; justify-content: center; }
.empty h3 { color: var(--text); font-size: 19px; margin-bottom: 8px; }
.empty p { max-width: 460px; margin: 0 auto 22px; font-size: 14px; line-height: 1.6; }
.empty .btn { display: inline-flex; }

/* ---------- title page ---------- */
.title-wrap { display: flex; gap: 36px; }
.title-poster { flex: 0 0 250px; }
.title-poster img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 24px 60px #000c; }
.title-info { min-width: 0; }
.title-info h1 { font-size: clamp(26px, 4vw, 42px); letter-spacing: -1px; margin-bottom: 6px; }
.title-orig { color: var(--dim); margin-bottom: 12px; }
.title-meta { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; color: var(--dim); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.genres a { font-size: 13px; padding: 5px 13px; border-radius: 20px; background: #ffffff0d; border: 1px solid var(--line); }
.genres a:hover { border-color: var(--accent); color: var(--accent); }
.title-desc { color: #d8dbe6; line-height: 1.7; max-width: 760px; margin-bottom: 26px; }
.title-facts { display: grid; gap: 6px; font-size: 14px; color: var(--dim); margin-bottom: 24px; max-width: 760px; }
.title-facts b { color: var(--text); font-weight: 600; }
.count { font-size: .55em; font-weight: 500; vertical-align: middle; margin-left: 6px; }
.watch-hint { margin: 12px 0 0; font-size: 14px; }
.title-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.dev-limit-note { margin: 6px 0 14px; line-height: 1.5; }
.auth-card .dev-row { margin-bottom: 10px; }

.my-rating { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 14px; }
.cm-block > .my-rating { margin-bottom: 20px; }
.stars { display: flex; }
.star { background: none; border: 0; color: #454b60; font-size: 21px; cursor: pointer; padding: 0 1px; transition: .1s; }
.star.on, .star.preview { color: #ffc94d; }
.my-rating-val { font-weight: 700; color: var(--text); }

.block { margin: 42px 0; }
.block h2 { font-size: 21px; margin-bottom: 16px; letter-spacing: -.4px; }
.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; }
.cast-item img, .cast-ph { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; background: var(--card); }
.cast-ph { display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--dim); font-weight: 800; }
.cast-name { font-size: 13px; font-weight: 600; margin-top: 7px; }
.cast-role { font-size: 12px; color: var(--dim); }

/* ---------- episodes ---------- */
.season-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { padding: 8px 17px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--dim); font: inherit; font-weight: 600; cursor: pointer; }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.episodes { display: grid; gap: 10px; }
.ep-row { display: flex; gap: 14px; align-items: center; padding: 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; transition: .15s; }
.ep-row:hover { border-color: var(--accent); }
.ep-row img { width: 130px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #0006; flex-shrink: 0; }
.ep-num { font-size: 20px; font-weight: 800; color: var(--dim); min-width: 36px; text-align: center; }
.ep-body { flex: 1; min-width: 0; }
.ep-name { font-weight: 600; margin-bottom: 3px; }
.ep-ov { font-size: 13px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-prog { height: 3px; background: #ffffff14; border-radius: 3px; margin-top: 7px; }
.ep-prog i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ep-play { flex-shrink: 0; }

/* ---------- watch ---------- */
.watch-page { padding-top: 24px; padding-bottom: 40px; }
.watch-head { margin-bottom: 16px; }
.backlink { color: var(--dim); font-size: 14px; }
.backlink:hover { color: var(--accent); }
.watch-head h1 { font-size: 22px; margin-top: 6px; }
.playerbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.player-wrap { position: relative; border-radius: var(--radius); overflow: hidden; background: #000;
  border: 1px solid var(--line); aspect-ratio: 16/9; max-width: 860px; margin: 0 auto; }
.player-wrap iframe { width: 100%; height: 100%; border: 0; }
.player-wrap iframe { position: absolute; inset: 0; }
.player-empty { display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.player-empty h3 { margin-bottom: 10px; }
.player-empty p { color: var(--dim); margin-bottom: 8px; line-height: 1.6; }
.player-empty a { color: var(--accent); }
.watch-page.theater .player-wrap { position: fixed; inset: 0; z-index: 400;
  border-radius: 0; border: 0; aspect-ratio: auto; max-width: none; margin: 0;
  width: 100vw; height: 100vh; }
.watch-page.theater .playerbar { position: fixed; top: 14px; right: 18px; z-index: 401; margin: 0; }
body.theater-on { overflow: hidden; }
body.theater-on .header { visibility: hidden; }
.watch-eps { margin-top: 26px; }
.watch-eps-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.watch-eps-head h2 { font-size: 19px; }
.season-jump select { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; font: inherit; }
.ep-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-btn { min-width: 44px; text-align: center; padding: 10px 0; border-radius: 10px; background: var(--card);
  border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.ep-btn:hover { border-color: var(--accent); }
.ep-btn.active { background: var(--grad); border-color: transparent; }

/* ---------- нативный плеер (свои стримы) ---------- */
.player-wrap video#npVideo { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.player-wrap:fullscreen { border-radius: 0; border: 0; aspect-ratio: auto; max-width: none; }
.player-wrap:fullscreen video#npVideo,
.watch-page.theater video#npVideo { object-fit: contain; }
.np-spin { position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); z-index: 5; }
.np-spin:only-child { display: flex; }
.np-spin-inner { display: flex; flex-direction: column; align-items: center; }
.np-spinner { width: 54px; height: 54px; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--accent);
  border-radius: 50%; animation: npspin .8s linear infinite; }
.np-load-t { margin-top: 16px; color: #fff; font-size: 17px; font-weight: 700; }
.np-load-s { margin-top: 5px; color: #a8adbb; font-size: 13px; }
@keyframes npspin { to { transform: rotate(360deg); } }
.np-top { position: absolute; top: 0; left: 0; right: 0; padding: 20px 26px 34px; z-index: 6;
  background: linear-gradient(180deg, rgba(0,0,0,.72), transparent); opacity: 0; transition: opacity .25s; pointer-events: none; }
.np-top.show { opacity: 1; }
.np-toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 15;
  background: rgba(20,20,26,.92); border: 1px solid var(--line); color: #fff;
  padding: 9px 18px; border-radius: 10px; font-size: 14px; opacity: 0;
  pointer-events: none; transition: opacity .3s; white-space: nowrap; }
.np-toast.on { opacity: 1; }
.np-title { font-size: 19px; font-weight: 700; color: #fff; }
.np-sub { font-size: 14px; color: #ccc; margin-top: 3px; }
.np-ui { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 20px 14px; z-index: 6;
  background: linear-gradient(0deg, rgba(0,0,0,.85), transparent); opacity: 0; transition: opacity .25s; }
.np-ui.show { opacity: 1; }
.np-seek { padding: 10px 0; cursor: pointer; }
.np-seek-bar { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); }
.np-buf { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: rgba(255,255,255,.4); width: 0; }
.np-pos { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--accent); width: 0; }
.np-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.np-btn { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); color: #fff;
  border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.np-btn:hover { background: rgba(255,255,255,.28); }
.np-btn:disabled { opacity: .35; cursor: default; }
.np-btn:focus-visible { outline: 2px solid var(--accent); }
.np-time { color: #ddd; font-size: 13px; margin-left: 6px; white-space: nowrap; }
.np-spacer { flex: 1; }
.np-menu { position: absolute; right: 12px; top: 10px; bottom: 82px; min-width: 220px;
  max-width: calc(100% - 28px); overflow-y: auto; background: rgba(18,18,22,.97);
  border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: none; z-index: 20;
  scrollbar-width: thin; }
.np-menu::-webkit-scrollbar { width: 6px; }
.np-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }
.player-wrap:fullscreen .np-menu { top: 12px; bottom: 92px; }
.np-menu.open { display: block; }
.np-menu-t { padding: 8px 12px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.np-menu-i { display: block; width: 100%; text-align: left; background: none; border: 0; color: #eee;
  padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.np-menu-i:hover { background: rgba(255,255,255,.1); }
.np-menu-i.on { color: var(--accent); font-weight: 700; }
@media (max-width: 640px) {
  .np-ui { padding: 20px 10px 10px; }
  .np-btn { padding: 7px 10px; font-size: 13px; }
  .np-time { font-size: 12px; }
}
.watch-desc { margin-top: 24px; color: var(--dim); line-height: 1.7; max-width: 800px; }
.next-ep { position: absolute; right: 18px; bottom: 70px; z-index: 20; }

/* ---------- auth ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 56px 20px; }
.auth-shell { display: grid; grid-template-columns: 1.05fr 1fr; max-width: 940px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px #0006; }
.auth-side { padding: 46px 42px; display: grid; gap: 22px; align-content: center;
  background: linear-gradient(160deg, #e6396b16, #7b5cff14 60%, transparent), var(--bg2); }
.auth-side h2 { font-size: 25px; line-height: 1.35; }
.auth-feats { display: grid; gap: 14px; margin-top: 4px; }
.auth-feat { display: flex; gap: 12px; align-items: center; color: var(--dim); font-size: 14px; line-height: 1.4; }
.auth-feat svg { color: var(--accent); flex: 0 0 auto; }
.auth-card { padding: 40px 38px; display: grid; gap: 15px; align-content: center; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--dim); }
.auth-card input { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; color: var(--text); font: inherit; font-size: 14px; transition: border-color .15s; }
.auth-card input:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px #e6396b22; }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { width: 100%; padding-right: 44px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--dim);
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; }
.pass-eye:hover, .pass-eye.on { color: var(--accent); }
.caps-warn { font-size: 12.5px; color: #ffe08a; background: #f1c40f14; border: 1px solid #f1c40f30;
  padding: 7px 12px; border-radius: 9px; }
.check { display: flex !important; flex-direction: row; align-items: center; gap: 9px !important;
  font-size: 13.5px !important; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.field-hint { font-size: 12px; font-weight: 600; min-height: 15px; }
.field-hint.ok { color: #7bed9f; }
.field-hint.bad { color: #ff8a80; }
.pw-meter { display: flex; align-items: center; gap: 10px; }
.pw-bar { flex: 1; height: 5px; border-radius: 4px; background: #ffffff10; overflow: hidden; }
.pw-bar i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .25s, background .25s; background: #ff5d6c; }
.pw-text { font-size: 12px; color: var(--dim); min-width: 70px; text-align: right; }
@media (max-width: 780px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
.auth-err { background: #e74c3c1a; border: 1px solid #e74c3c44; color: #ff8a80;
  padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }
.auth-ok { background: #2ecc711a; border: 1px solid #2ecc7144; color: #7bed9f;
  padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }
.auth-alt { text-align: center; font-size: 14px; color: var(--dim); }
.auth-alt a { color: var(--accent); font-weight: 600; }

/* ---------- profile / plans ---------- */
.prof-main { display: flex !important; align-items: center; gap: 20px; flex-wrap: wrap; }
.prof-ava { width: 64px; height: 64px; font-size: 26px; border-radius: 18px; }
.prof-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prof-who { flex: 1 1 auto; display: grid; gap: 5px; }
.chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700; background: #ffffff10; color: var(--dim); }
.chip-ok { background: #2ecc7122; color: #7bed9f; border: 1px solid #2ecc7133; }
.prof-sub { margin-left: auto; display: grid; gap: 7px; justify-items: end; }
.prof-sub-info { font-size: 13px; color: var(--dim); }
.subbar { width: 220px; height: 6px; border-radius: 4px; background: #ffffff12; overflow: hidden; }
.subbar i { display: block; height: 100%; border-radius: 4px; background: var(--grad); }
.prof-sub-link { font-size: 13px; color: var(--accent); font-weight: 600; }
.prof-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.pstat { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 8px; text-align: center; transition: border-color .15s, transform .15s; }
.pstat:hover { border-color: var(--accent); transform: translateY(-2px); }
.pstat b { display: block; font-size: 21px; }
.pstat span { font-size: 12px; color: var(--dim); }
.prof-h { font-size: 20px; margin: 30px 0 14px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.plan-disc { color: #7bed9f; font-weight: 700; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 16px 18px; text-align: center; display: flex; flex-direction: column; gap: 6px;
  transition: transform .15s, border-color .15s, box-shadow .15s; }
.plan form:last-child, .plan > a:last-child { margin-top: auto; }
.plan:hover { transform: translateY(-3px); }
.plan.best { border-color: var(--accent); box-shadow: 0 10px 34px #e6396b22; }
.plan-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 10.5px; font-weight: 700; padding: 4px 12px;
  border-radius: 20px; white-space: nowrap; }
.plan-top { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 22px; }
.plan-name { font-size: 13.5px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .6px; }
.plan-old { font-size: 13.5px; color: var(--dim); opacity: .65; text-decoration: line-through;
  text-decoration-thickness: 1.5px; min-height: 18px; }
.plan-disc { display: inline-flex; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 800;
  background: #2ecc7122; border: 1px solid #2ecc7140; color: #7bed9f; text-decoration: none; }
.plan-price { font-size: 27px; font-weight: 800; }
.plan-price i { font-style: normal; font-size: 17px; color: var(--dim); }
.plan-per { font-size: 12px; color: var(--dim); margin-bottom: 8px; }
.plan-rub { font-size: 11.5px; color: var(--dim); }
.plan-btn { width: 100%; justify-content: center; }
.plan-btn[disabled] { opacity: .4; }

/* ---------- подписка (гейт) ---------- */
.sub-lock { position: relative; min-height: calc(100vh - var(--header-h)); display: flex;
  align-items: center; justify-content: center; padding: 50px 20px; overflow: hidden; }
.sub-lock-bg { position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(26px) brightness(.32); transform: scale(1.15); }
.sub-lock-card { position: relative; max-width: 1060px; width: 100%; text-align: center;
  background: #1d212cd9; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 24px; padding: 48px 44px;
  box-shadow: 0 30px 90px #0009; }
.sub-lock-card .empty-ic { margin: 0 auto 4px; }
.sub-lock-card h1 { font-size: 30px; margin: 14px 0 10px; }
.sub-lock-text { max-width: 560px; margin: 0 auto 28px; color: var(--dim); line-height: 1.65; }
.sub-lock-note { font-size: 12.5px; color: var(--dim); margin: 14px 0 28px; }
.sub-lock-card .plans { margin: 30px 0 0; }

.dev-row { display: flex; align-items: center; gap: 13px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.dev-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--dim); flex: 0 0 auto; }
.dev-info { flex: 1 1 auto; display: grid; gap: 2px; }
.dev-info b { font-size: 14.5px; }
.dev-info span { font-size: 12px; }
.dev-kick { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: transparent;
  color: var(--dim); cursor: pointer; font-size: 13px; transition: .15s; }
.dev-kick:hover { border-color: #ff5d6c; color: #ff5d6c; }
.dev-note { font-size: 12px; margin-top: 4px; }

/* ---------- нижняя панель (мобильная) ---------- */
.tabbar { display: none; }
@media (max-width: 900px) {
  body { padding-bottom: 64px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 290;
    background: rgb(var(--bg-rgb) / .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding: 6px 10px calc(7px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 12px; border-radius: 12px; color: var(--dim); font-size: 10.5px; font-weight: 600;
    transition: color .15s, background .15s; }
  .tabbar a.active { color: var(--accent); }
  .tabbar a:active { background: #ffffff10; }
}

/* ---------- admin ---------- */
.adm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: grid; gap: 4px; }
.stat-ic { width: 38px; height: 38px; border-radius: 10px; background: #e6396b14; border: 1px solid #e6396b30;
  color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.stat-v { font-size: 24px; font-weight: 800; }
.stat-l { font-size: 12.5px; color: var(--dim); }
.adm-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.adm-sub { font-size: 13px; font-weight: 600; }
.chart { display: flex; align-items: flex-end; gap: 5px; height: 110px; }
.chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.chart-col i { display: block; width: 100%; min-height: 3px; border-radius: 4px 4px 0 0;
  background: var(--grad); transition: height .3s; }
.chart-green .chart-col i { background: linear-gradient(180deg, #2ecc71, #1a8f52); }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 7px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 10px; margin-top: 9px; font-size: 12.5px; }
.hbar-name { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 8px; border-radius: 5px; background: #ffffff10; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #e6396b, #ff7a9d); }
.hbar-v { text-align: right; font-weight: 700; }
.adm-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.adm-plan { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  display: grid; gap: 10px; align-content: start; }
.adm-plan-name { font-weight: 700; }
.adm-plan label { display: grid; gap: 5px; font-size: 12px; color: var(--dim); font-weight: 600; }
.adm-plan input { background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 11px; color: var(--text); font: inherit; }
.adm-plan input:focus { border-color: var(--accent); outline: 0; }
.adm-plan-note { font-size: 11.5px; color: var(--dim); }
.ta-r { text-align: right !important; }
.usr-acts { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.usr-acts button { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--dim); font-size: 12px; font-weight: 700; cursor: pointer; transition: .15s; }
.usr-acts button:hover { border-color: var(--accent); color: var(--accent); }
.usr-grant { display: flex; gap: 5px; align-items: center; }
.usr-grant input { width: 58px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 8px; color: var(--text); font-size: 12px; }
.usr-del:hover { border-color: #ff5d6c !important; color: #ff5d6c !important; }
@media (max-width: 1200px) {
  .adm-grid { grid-template-columns: 1fr; }
  .adm-stats { grid-template-columns: repeat(2, 1fr); }
  .adm-plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) { .adm-plans { grid-template-columns: 1fr; } }

/* ---------- пин-коды ---------- */
.pin-create { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.pin-create label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--dim); }
.pin-create input { background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; color: var(--text); font: inherit; }
.pin-create input[type=number] { width: 90px; }
.pin-create input:focus { border-color: var(--accent); outline: 0; }
.pin-help { font-size: 10.5px; font-weight: 400; }
.pin-fresh { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; padding: 12px;
  background: #2ecc7110; border: 1px dashed #2ecc7155; border-radius: 12px; }
.pin-code { font-family: Consolas, monospace; font-size: 13.5px; font-weight: 700; letter-spacing: 1px;
  background: var(--bg2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; user-select: all; }
.pin-off { opacity: .45; }
.pay-hist { margin-top: 14px; }
.pay-hist summary { cursor: pointer; font-size: 13px; }
.chip-off { background: #ffffff12; color: var(--dim); }
.pin-form { display: flex; gap: 10px; margin-top: 12px; }
.pin-form input { flex: 1; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; color: var(--text); font: inherit; font-family: Consolas, monospace;
  letter-spacing: 2px; text-transform: uppercase; }
.pin-form input:focus { border-color: var(--accent); outline: 0; }
.pin-note { font-size: 12px; margin-top: 10px; }

/* ---------- panels / tables / history ---------- */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 18px; display: grid; gap: 13px; align-content: start; }
.panel h3 { font-size: 17px; }
.profile-row { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-row:last-child { border-bottom: 0; }
.profile-row span { color: var(--dim); }
.panel label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--dim); }
.panel input, .panel select { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 13px; color: var(--text); font: inherit; font-size: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--dim); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.row-off { opacity: .45; }
.row-actions { display: flex; gap: 6px; }
.hist-list { display: grid; gap: 9px; }
.hist-row { display: flex; align-items: center; gap: 15px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.hist-row img { width: 44px; height: 66px; object-fit: cover; border-radius: 8px; background: #0006; }
.hist-info { flex: 1; min-width: 0; }
.hist-title { font-weight: 600; display: block; }
.hist-title:hover { color: var(--accent); }
.hist-right { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.error-page { text-align: center; padding: 90px 20px; }
.error-code { font-size: 90px; font-weight: 800; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page p { color: var(--dim); margin: 14px 0 26px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 40px 40px 0; background: var(--bg2); }
.footer-in { max-width: 1840px; margin: 0 auto; display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; }
.fcol { display: grid; gap: 10px; align-content: start; justify-items: start; }
.fcol h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text); margin-bottom: 4px; }
.fcol a { color: var(--dim); font-size: 14px; transition: color .15s, transform .15s; }
.fcol a:hover { color: var(--accent); transform: translateX(3px); }
.fbrand p { color: var(--dim); font-size: 14px; line-height: 1.6; max-width: 300px; margin-top: 12px; }
.footer-bot { max-width: 1840px; margin: 34px auto 0; padding: 18px 0 20px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; color: var(--dim); font-size: 13px; }

@media (max-width: 900px) {
  .header { gap: 12px; padding: 8px 14px; height: auto; min-height: var(--header-h); flex-wrap: wrap; }
  .logo { font-size: 18px; }
  .nav { display: none; }
  .navmenu-drop { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 8px);
    grid-template-columns: 1fr; max-height: 70vh; overflow-y: auto; }
  .searchbox { order: 9; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .header-right { margin-left: auto; }
  .header-right .btn { display: none; }
  .title-wrap { flex-direction: column; }
  .title-poster { flex-basis: 170px; width: 170px; }
  .title-info { padding-top: 0; }
  .profile-grid { grid-template-columns: 1fr; }
  .hero { min-height: 58vh; }
  .hero-content { padding: 30px 22px; }
  .hero-actions { flex-wrap: wrap; }
  .container { padding: 0 14px; }
  .page { padding-top: 20px; }
  .page-head h1 { font-size: 22px; }
  .rail-arrow { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px 10px; }
  .footer { display: none; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .prof-stats { grid-template-columns: repeat(2, 1fr); }
  .prof-main { flex-wrap: wrap; gap: 14px; }
  .prof-sub { justify-items: start; margin-left: 0; }
  .auth-wrap { padding: 26px 14px; }
  .auth-card { padding: 28px 22px; }
  .sub-lock { padding: 30px 12px; }
  .sub-lock-card { padding: 30px 18px; }
  .hist-row { gap: 10px; padding: 10px 12px; }
  .hist-right .dim { display: none; }
  .panel { padding: 16px 14px; overflow-x: auto; }
  .watch-head h1 { font-size: 18px; }
  .watch-page { padding-top: 14px; }
  .filters { gap: 8px; }
  .flash { left: 12px; right: 12px; top: auto; bottom: 76px; transform: none; }
}
@media (max-width: 560px) {
  .plans { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
  .prof-stats { grid-template-columns: repeat(2, 1fr); }
  .sub-lock-card h1 { font-size: 22px; }
  .adm-stats { grid-template-columns: repeat(2, 1fr); }
  .tabbar a { padding: 6px 8px; font-size: 10px; }
}

/* ---------- оверлей загрузки страниц ---------- */
#pageLoader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  opacity: 1; visibility: visible;
  transition: opacity .5s cubic-bezier(.4,0,.2,1), visibility 0s linear .5s;
  animation: plSafety 8s ease forwards; /* страховка: спрячется сам, если JS не сработал */
}
#pageLoader.pl-hide { opacity: 0; visibility: hidden; animation: none; }
@keyframes plSafety {
  0%, 72% { opacity: 1; visibility: visible; }
  99% { opacity: 0; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
.pl-inner { display: flex; flex-direction: column; align-items: center; gap: 20px;
  transform: translateY(10px) scale(.96); opacity: 0;
  transition: transform .55s cubic-bezier(.2,.9,.3,1.15), opacity .4s ease; }
#pageLoader:not(.pl-hide) .pl-inner { transform: none; opacity: 1; transition-delay: .08s; }
.pl-logo { position: relative; width: 86px; height: 86px; display: grid; place-items: center; }
.pl-logo svg { position: relative; z-index: 2; border-radius: 20px;
  filter: drop-shadow(0 10px 34px rgba(230,57,107,.45));
  animation: plPulse 1.6s ease-in-out infinite; }
@keyframes plPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 10px 34px rgba(230,57,107,.45)); }
  50% { transform: scale(1.07); filter: drop-shadow(0 10px 46px rgba(123,92,255,.55)); }
}
.pl-ring { position: absolute; inset: 0; border-radius: 24px;
  border: 2px solid rgba(230,57,107,.55);
  animation: plRing 2.1s cubic-bezier(.2,.6,.35,1) infinite; }
.pl-ring.r2 { border-color: rgba(123,92,255,.5); animation-delay: .7s; }
.pl-ring.r3 { border-color: rgba(230,57,107,.3); animation-delay: 1.4s; }
@keyframes plRing {
  0% { transform: scale(.72); opacity: .9; }
  100% { transform: scale(1.75); opacity: 0; }
}
.pl-name { font-weight: 800; font-size: 26px; letter-spacing: -.5px; }
.pl-name em { font-style: normal; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.pl-bar { width: 210px; height: 4px; border-radius: 4px; overflow: hidden; background: #ffffff14; }
.pl-bar i { display: block; height: 100%; width: 42%; border-radius: 4px; background: var(--grad);
  animation: plSlide 1.15s cubic-bezier(.45,.05,.55,.95) infinite; }
@keyframes plSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}
@media (prefers-reduced-motion: reduce) {
  .pl-logo svg, .pl-ring, .pl-bar i { animation: none; }
}



/* ---------- приложение в футере ---------- */
.fapp-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 12px;
  margin-top: 14px; padding: 11px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(230,57,107,.2), rgba(123,92,255,.2));
  border: 1px solid rgba(230,57,107,.35);
  color: var(--text);
  text-decoration: none;
  transition: .2s;
}
.fapp-btn:hover {
  border-color: rgba(230,57,107,.7);
  background: linear-gradient(135deg, rgba(230,57,107,.32), rgba(123,92,255,.32));
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(230,57,107,.25);
}
.fapp-btn svg { flex: none; color: #fff; }
.fapp-btn span { display: flex; flex-direction: column; gap: 2px; }
.fapp-btn b { font-size: 13.5px; }
.fapp-btn i { font-style: normal; font-size: 11.5px; color: var(--dim); }

/* ---------- комментарии ---------- */
.cm-count { font-size: 15px; font-weight: 700; color: var(--dim); background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 11px; vertical-align: 3px; }
.cm-form { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px;
  padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.cm-form textarea { flex: 1; resize: none; min-height: 48px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.cm-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(230,57,107,.16); }
.cm-form .cm-send { flex: none; align-self: center; }
.cm-login { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 16px;
  border-radius: 16px; background: var(--card); border: 1px dashed var(--line);
  color: var(--dim); margin-bottom: 20px; font-size: 14.5px; }
.cm-login svg { flex: none; opacity: .6; }
.cm-login a { color: var(--accent); font-weight: 600; }
.cm-empty { color: var(--dim); padding: 18px; text-align: center; border: 1px dashed var(--line);
  border-radius: 16px; background: #ffffff05; }
.cm { display: flex; gap: 12px; padding: 15px 16px; margin-top: 12px;
  border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  transition: border-color .15s; }
.cm:hover { border-color: #ffffff22; }
.cm-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 17px; color: #fff;
  background: linear-gradient(135deg, #e6396b, #7b5cff);
  box-shadow: 0 4px 14px rgba(230,57,107,.22); }
.cm-body { flex: 1; min-width: 0; }
.cm-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cm-head b { font-size: 14px; }
.cm-admin { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 9px; color: #fff; background: var(--grad); }
.cm-date { font-size: 12px; color: var(--dim); }
.cm-del { margin-left: auto; }
.cm-del button { border: 1px solid transparent; background: none; color: var(--dim); cursor: pointer;
  font-size: 12.5px; padding: 3px 8px; border-radius: 8px; transition: .15s; }
.cm-del button:hover { color: #ff5d6c; border-color: #ff5d6c55; background: #ff5d6c14; }
.cm-text { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: #dde0e6;
  white-space: pre-wrap; word-break: break-word; }

/* разделители между блоками на странице тайтла */
.tpage > section + section { border-top: 1px solid var(--line); padding-top: 34px; }

@media (max-width: 900px) {
  .cm-form { flex-wrap: wrap; }
  .cm-form .cm-send { align-self: flex-end; margin-left: auto; }
}

/* ---------- админка: навигация-табы ---------- */
.adm-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.adm-tab { padding: 9px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  font-size: 13.5px; font-weight: 700; color: var(--dim); text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px; transition: border-color .15s, color .15s; }
.adm-tab:hover { border-color: var(--accent); color: var(--accent); }
.adm-tab.cur { background: var(--grad); color: #fff; border-color: transparent; }
.adm-badge { background: #0003; padding: 1px 8px; border-radius: 10px; font-size: 11px; }
.adm-tab:not(.cur) .adm-badge { background: #ffffff12; color: var(--dim); }

/* ---------- админка: пользователи ---------- */
.usr-filter-row { display: flex; gap: 10px; margin: 14px 0 6px; flex-wrap: wrap; }
.usr-filter { flex: 1; min-width: 220px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; color: var(--fg); font-size: 14px; }
.usr-filter:focus { border-color: var(--accent); outline: 0; }
.usr-role-sel { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; color: var(--fg); font-size: 13.5px; }
.usr-cell { display: flex; align-items: center; gap: 10px; }
.usr-ava { width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }
.usr-name { font-weight: 600; font-size: 14px; }
.usr-id { font-size: 11.5px; color: var(--dim); }
.chip-partner { background: #7b5cff22; color: #b7a6ff; border: 1px solid #7b5cff33; }
.chip-sub-off { background: #ff5d6c1a; color: #ff8f9a; border: 1px solid #ff5d6c33; }
.usr-table td { padding: 9px 10px; }
.usr-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.usr-sort:hover { color: var(--fg); }
.usr-sort i { font-style: normal; font-size: 9px; color: var(--accent); }
.usr-count { align-self: center; font-size: 13px; white-space: nowrap; }
.usr-dev { cursor: help; }
.usr-acts button { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.usr-grant { gap: 0; }
.usr-grant input { flex: 0 0 62px; width: 62px; padding: 0 6px; text-align: center;
  border-radius: 8px 0 0 8px; }
.usr-grant button { border-radius: 0 8px 8px 0 !important; border-left: none !important;
  white-space: nowrap; }
.usr-rolesel { padding: 5px 8px; font-size: 12px; border-radius: 8px;
  background: var(--bg2); border: 1px solid var(--line); color: var(--fg); cursor: pointer; }
.usr-rolesel:hover { border-color: var(--accent); }
.usr-ic { width: 28px; height: 28px; padding: 0 !important;
  display: inline-flex !important; align-items: center; justify-content: center; }
.usr-ok { color: #7bed9f; }
.usr-ok:hover { border-color: #2ecc71 !important; color: #7bed9f !important; }
.usr-table tbody tr { transition: background .12s; }
.usr-table tbody tr:hover { background: #ffffff08; }

/* ---------- Telegram ---------- */
.btn-tg { display:flex; align-items:center; justify-content:center; gap:9px;
  width:100%; margin-top:10px; padding:13px 18px; border-radius:12px;
  background:#2AABEE; color:#fff !important; font-weight:700; font-size:15px;
  text-decoration:none; transition:.15s; }
.btn-tg:hover { background:#229ED9; transform:translateY(-1px); }
.tg-card { text-align:center; }
.tg-sub { color:var(--dim); font-size:14px; margin:8px 0 18px; }
.tg-qr-wrap { margin:0 auto 18px; padding:14px; width:max-content;
  background:#fff; border-radius:16px; }
.tg-qr { display:block; width:220px; height:220px; }
.tg-status { margin-top:16px; font-size:13.5px; color:var(--dim); }
.tg-status.err { color:#ff7a7a; }

.btn-sm { padding:6px 14px; font-size:13px; width:auto; margin-top:0; border-radius:8px; display:inline-flex; }

/* ---------- adm: changelog ---------- */
.adm-ver { display:flex; gap:24px; flex-wrap:wrap; align-items:flex-start;
  padding:14px; border-radius:12px; background:var(--bg2); border:1px solid var(--line); margin-bottom:6px; }
.adm-ver-cur { min-width:180px; }
.adm-pub { flex:1; min-width:300px; }
.adm-pub input, .adm-ver input { padding:8px 10px; font-size:13px; border-radius:8px;
  background:var(--bg); border:1px solid var(--line); color:var(--fg); }
.adm-pub input:focus { border-color:var(--accent); outline:none; }

/* ---------- adm: log ---------- */
.log-grid { display:grid; grid-template-columns:290px 1fr; gap:14px; margin-bottom:14px; }
.log-cur { text-align:left; }
.log-cur-l { font-size:11.5px; color:var(--dim); text-transform:uppercase; letter-spacing:.6px; }
.log-cur-v { font-size:30px; font-weight:800; margin-top:8px; }
.log-cur-c { display:inline-block; margin-top:6px; padding:3px 10px; border-radius:8px;
  background:#e6396b22; color:#ff8fae; font-size:12px; font-weight:700; }
.log-cur-n { font-size:12.5px; margin-top:10px; line-height:1.45; }
.log-pub { display:flex; flex-direction:column; }
.log-pub-t { font-weight:700; font-size:15px; margin-bottom:12px; }
.log-pub-row { display:flex; gap:12px; }
.log-fld { flex:1; }
.log-fld label { display:block; font-size:11.5px; color:var(--dim); margin-bottom:5px; }
.log-fld input, .log-in { width:100%; padding:10px 12px; font-size:13.5px; border-radius:10px;
  background:var(--bg); border:1px solid var(--line); color:var(--fg); transition:.15s; }
.log-fld input:focus, .log-in:focus { border-color:#e6396b; outline:none;
  box-shadow:0 0 0 3px #e6396b22; }
.log-add { display:flex; gap:10px; margin:4px 0 16px; }
.log-add .log-ver { width:110px; flex:none; }
.log-add .btn { padding:10px 18px; font-size:13px; white-space:nowrap; }
.log-table td { vertical-align:middle; }
@media (max-width:900px) { .log-grid { grid-template-columns:1fr; } }
