/* gluk.tech — единая дизайн-система */

:root {
  --bg: #070b18;
  --bg-2: #0a1022;
  --bg-3: #0e1730;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --line: rgba(160, 190, 255, 0.14);
  --line-soft: rgba(160, 190, 255, 0.08);
  --text: #eaf0ff;
  --muted: #93a2c4;
  --dim: #6b7a9c;
  --accent: #6c8cff;
  --accent-2: #9cc0ff;
  --accent-3: #b9d2ff;
  --ok: #62d0a0;
  --warn: #e8b06a;
  --err: #ef7a72;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;
  --r-xl: 30px;
  --shadow: 0 24px 60px rgba(3, 7, 20, 0.6);
  --shadow-soft: 0 10px 30px rgba(3, 7, 20, 0.45);
  --glow: 0 0 40px rgba(108, 140, 255, 0.35);
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 0.18s var(--ease);
  --slow: 0.45s var(--ease);
  --font: 'Inter', 'SF Pro Display', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 12% -8%, rgba(108, 140, 255, 0.16), transparent 60%),
    radial-gradient(900px 600px at 92% 0%, rgba(156, 192, 255, 0.1), transparent 55%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 46%, #05080f 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.1px;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(150, 180, 255, 0.18); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: rgba(150, 180, 255, 0.32); }

::selection { background: rgba(108, 140, 255, 0.4); }

/* ──────── шапка ──────── */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 clamp(14px, 3vw, 42px);
  z-index: 60;
  background: linear-gradient(180deg, rgba(7, 11, 24, 0.86), rgba(7, 11, 24, 0.35));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: background var(--slow), border-color var(--slow);
}
.header.scrolled {
  background: rgba(7, 11, 24, 0.82);
  border-bottom-color: var(--line-soft);
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 0 12px rgba(108, 140, 255, 0.65)); transition: transform var(--slow); }
.brand:hover img { transform: rotate(90deg) scale(1.08); }
.brand span { font-weight: 700; font-size: 19px; letter-spacing: -0.2px; }
.brand span b { color: var(--accent-2); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color var(--fast), background var(--fast);
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: #fff; background: var(--surface-2); }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 2px;
  width: 16px; height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--accent);
  box-shadow: var(--glow);
}

.header .spacer { flex: 1; }

.search-trigger {
  display: flex; align-items: center; gap: 10px;
  min-width: 220px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--dim);
  cursor: pointer;
  transition: all var(--fast);
}
.search-trigger:hover { border-color: rgba(160, 190, 255, 0.3); color: var(--text); background: var(--surface-2); }
.search-trigger kbd {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--dim);
}

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  color: #08101f;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.16);
  transition: transform var(--fast), box-shadow var(--fast);
  overflow: hidden;
}
.avatar:hover { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(108, 140, 255, 0.18); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* выпадающее меню профиля */
.menu {
  position: absolute;
  top: calc(var(--header-h) - 6px);
  right: clamp(14px, 3vw, 42px);
  width: 260px;
  padding: 10px;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: rgba(12, 18, 36, 0.92);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  transform-origin: top right;
  animation: pop 0.22s var(--ease);
  z-index: 70;
}
.menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px; }
.menu .who b { display: block; font-size: 15px; }
.menu .who span { font-size: 12.5px; color: var(--dim); }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0; border-radius: var(--r-s);
  background: transparent;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .danger { color: var(--err); }

@keyframes pop {
  from { opacity: 0; transform: scale(0.94) translateY(-6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ──────── кнопки ──────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  transition: transform var(--fast), background var(--fast), box-shadow var(--fast), border-color var(--fast);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.13); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #8aa6ff 100%);
  color: #050a18;
  box-shadow: 0 10px 30px rgba(108, 140, 255, 0.35);
}
.btn.primary:hover { box-shadow: 0 14px 38px rgba(108, 140, 255, 0.5); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { border-color: rgba(160, 190, 255, 0.34); background: var(--surface); }
.btn.danger { background: rgba(239, 122, 114, 0.16); color: #ffb4ae; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.icon { padding: 10px; border-radius: 50%; }

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--fast);
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: rgba(160, 190, 255, 0.3); }
.chip.active { background: var(--accent); border-color: transparent; color: #08101f; font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-2);
  color: var(--accent-2);
  border: 1px solid var(--line-soft);
}
.badge.rate { color: #ffd479; }
.badge.live { color: var(--ok); }
.badge.live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 8px var(--ok);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.field {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: rgba(6, 10, 22, 0.6);
  color: var(--text);
  outline: none;
  transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(108, 140, 255, 0.16); background: rgba(6, 10, 22, 0.85); }
.field::placeholder { color: var(--dim); }

/* ──────── страница ──────── */
.page { padding-top: var(--header-h); min-height: 100vh; }
.wrap { width: min(1560px, 100%); margin: 0 auto; padding: 0 clamp(14px, 3vw, 42px); }
.section { margin: 44px 0; }
.section h2 { font-size: clamp(19px, 2vw, 24px); margin: 0 0 16px; letter-spacing: -0.3px; }
.section h2 small { font-size: 13px; color: var(--dim); font-weight: 500; margin-left: 10px; }

/* ──────── герой ──────── */
.hero {
  position: relative;
  height: clamp(420px, 62vh, 660px);
  margin-top: calc(var(--header-h) * -1);
  overflow: hidden;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide .backdrop {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 18%;
  transform: scale(1.06);
  animation: kenburns 18s ease-out infinite alternate;
}
@keyframes kenburns { from { transform: scale(1.04) translateY(0); } to { transform: scale(1.14) translateY(-14px); } }
.hero-slide::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 9, 20, 0.96) 8%, rgba(6, 9, 20, 0.6) 48%, rgba(6, 9, 20, 0.15) 78%),
    linear-gradient(0deg, var(--bg) 2%, rgba(7, 11, 24, 0.2) 46%);
}
.hero-body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 54px;
  max-width: 640px;
}
.hero-body .kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hero-body h1 {
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.02;
  margin: 0 0 14px;
  letter-spacing: -1.4px;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
}
.hero-body p {
  color: #c4cfe6;
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0 0 22px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-dots { position: absolute; right: clamp(14px, 3vw, 42px); bottom: 34px; z-index: 3; display: flex; gap: 8px; }
.hero-dots i {
  width: 26px; height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer; transition: all var(--fast);
}
.hero-dots i.on { background: var(--accent-2); width: 44px; box-shadow: var(--glow); }

/* ──────── полки и карточки ──────── */
.shelf { margin: 38px 0; position: relative; }
.shelf-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.shelf-head h3 { font-size: clamp(17px, 1.7vw, 21px); margin: 0; letter-spacing: -0.3px; }
.shelf-head .why { font-size: 12.5px; color: var(--dim); }
.shelf-scroll {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 6px 2px 18px;
  scrollbar-width: none;
}
.shelf-scroll::-webkit-scrollbar { display: none; }
.shelf-arrow {
  position: absolute; top: 50%; transform: translateY(-30%);
  width: 44px; height: 76px;
  display: grid; place-items: center;
  border: 0; border-radius: 14px;
  background: rgba(9, 14, 30, 0.8);
  backdrop-filter: blur(10px);
  color: #fff; cursor: pointer;
  opacity: 0; transition: opacity var(--fast), background var(--fast);
  z-index: 4;
}
.shelf:hover .shelf-arrow { opacity: 1; }
.shelf-arrow:hover { background: var(--accent); color: #06101f; }
.shelf-arrow.left { left: -10px; }
.shelf-arrow.right { right: -10px; }

.card {
  flex: 0 0 auto;
  width: clamp(140px, 15vw, 186px);
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform var(--slow);
}
.card:hover, .card:focus-visible { transform: translateY(-8px) scale(1.035); outline: none; }
.card .poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-m);
  overflow: hidden;
  background: linear-gradient(160deg, #142042, #0b1226 100%);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line-soft);
}
.card .poster img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--slow), filter var(--slow); }
.card:hover .poster img { transform: scale(1.07); filter: brightness(1.06); }
.card .poster::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(5, 9, 20, 0.85) 0%, transparent 44%);
  opacity: 0; transition: opacity var(--slow);
}
.card:hover .poster::after { opacity: 1; }
.card .play-fab {
  position: absolute; left: 50%; top: 50%;
  width: 52px; height: 52px;
  transform: translate(-50%, -46%) scale(0.7);
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(108, 140, 255, 0.92);
  color: #06101f;
  opacity: 0;
  transition: all var(--slow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.card:hover .play-fab { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card .marks { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.card .progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px; background: rgba(255, 255, 255, 0.16);
}
.card .progress i { display: block; height: 100%; background: var(--accent); box-shadow: var(--glow); }
.card .meta { padding: 11px 3px 0; }
.card .meta b {
  display: block; font-size: 14px; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card .meta span { font-size: 12px; color: var(--dim); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 15vw, 180px), 1fr));
  gap: 22px 16px;
}
.grid .card { width: auto; }

.skeleton {
  position: relative; overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--r-m);
}
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-card { aspect-ratio: 2 / 3; }

/* ──────── поиск ──────── */
.search-overlay {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(4, 7, 16, 0.72);
  backdrop-filter: blur(16px);
  display: flex; justify-content: center;
  padding: clamp(60px, 12vh, 130px) 16px 40px;
  animation: fade 0.2s var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.search-panel { width: min(900px, 100%); animation: rise 0.28s var(--ease); }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.search-panel .bar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  background: rgba(11, 17, 34, 0.94);
  box-shadow: var(--shadow);
}
.search-panel .bar input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 19px;
}
.search-results { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow: auto; padding-right: 6px; }
.result {
  display: flex; gap: 14px; align-items: center;
  padding: 10px;
  border-radius: var(--r-m);
  border: 1px solid transparent;
  background: rgba(11, 17, 34, 0.72);
  cursor: pointer;
  transition: all var(--fast);
}
.result:hover, .result.sel { border-color: var(--line); background: rgba(20, 30, 58, 0.9); transform: translateX(4px); }
.result img { width: 52px; height: 78px; border-radius: 8px; object-fit: cover; background: #121c38; }
.result .info b { display: block; font-size: 15px; }
.result .info span { font-size: 12.5px; color: var(--dim); }

/* ──────── страница тайтла ──────── */
.title-hero { position: relative; padding-top: calc(var(--header-h) + 34px); }
.title-bg {
  position: absolute; inset: 0 0 auto 0; height: 560px;
  background-size: cover; background-position: center 20%;
  opacity: 0.5;
  mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
}
.title-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
.title-poster {
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: #101a34;
  aspect-ratio: 2 / 3;
}
.title-poster img { width: 100%; height: 100%; object-fit: cover; }
.title-info h1 { font-size: clamp(26px, 3.4vw, 44px); margin: 0 0 10px; letter-spacing: -1px; }
.title-info .sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.title-info .desc { color: #c8d2e8; line-height: 1.62; font-size: 15px; max-width: 780px; }
.title-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 18px; }

.trailer {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-l);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #060b17;
  box-shadow: var(--shadow);
}
.trailer iframe { width: 100%; height: 100%; border: 0; }
.trailer .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font-size: 14px; }

.season-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.season-bar::-webkit-scrollbar { display: none; }
.episodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.episode {
  display: flex; gap: 12px;
  padding: 10px;
  border-radius: var(--r-m);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--fast);
}
.episode:hover { border-color: var(--accent); background: var(--surface-2); transform: translateY(-2px); }
.episode img { width: 116px; aspect-ratio: 16 / 9; border-radius: 9px; object-fit: cover; background: #101a34; }
.episode b { font-size: 13.5px; display: block; margin-bottom: 3px; }
.episode span { font-size: 12px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.episode.current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.18); }

.cast { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.cast::-webkit-scrollbar { display: none; }
.person { width: 108px; flex: 0 0 auto; text-align: center; }
.person img { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; background: #101a34; margin-bottom: 8px; }
.person b { font-size: 12.5px; display: block; }
.person span { font-size: 11.5px; color: var(--dim); }

/* ──────── плеер ──────── */
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #04070f;
  border-radius: var(--r-l);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  user-select: none;
}
.player.fs { border-radius: 0; border: 0; aspect-ratio: auto; height: 100%; }
.player video, .player iframe { width: 100%; height: 100%; display: block; background: #000; border: 0; }
.player .stage { position: absolute; inset: 0; }

.player .watermark {
  position: absolute; right: 16px; bottom: 74px;
  width: 116px; opacity: 0.5;
  pointer-events: none;
  transition: opacity var(--fast), bottom var(--fast);
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
  z-index: 5;
}
.player.idle .watermark { bottom: 22px; opacity: 0.34; }

.player .center-play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(108, 140, 255, 0.9);
  color: #05101f; cursor: pointer;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  transition: transform var(--fast), opacity var(--fast);
  z-index: 6;
}
.player .center-play:hover { transform: translate(-50%, -50%) scale(1.08); }
.player.playing .center-play { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.6); }

.player .buffering {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent-2);
  animation: spin-center 0.9s linear infinite;
  display: none; z-index: 7;
}
.player.buffering .buffering { display: block; }
/* у центрального спиннера своё имя: общий spin терял сдвиг и кружок уезжал вправо-вниз */
@keyframes spin-center {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 44px 16px 14px;
  background: linear-gradient(0deg, rgba(4, 7, 15, 0.92) 12%, transparent 100%);
  opacity: 1; transform: translateY(0);
  transition: opacity var(--slow), transform var(--slow);
  z-index: 8;
}
.player.idle .controls { opacity: 0; transform: translateY(12px); pointer-events: none; }
.player.idle { cursor: none; }

.timeline {
  position: relative;
  height: 18px;
  display: flex; align-items: center;
  cursor: pointer;
  margin-bottom: 6px;
}
.timeline .track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); overflow: hidden; transition: height var(--fast); }
.timeline:hover .track { height: 7px; }
.timeline .buffer { position: absolute; inset: 0 auto 0 0; background: rgba(255, 255, 255, 0.22); }
.timeline .fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }
.timeline .knob {
  position: absolute; top: 50%; width: 14px; height: 14px;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 12px rgba(108, 140, 255, 0.9);
  transition: transform var(--fast);
}
.timeline:hover .knob { transform: translate(-50%, -50%) scale(1); }
.timeline .hover-time {
  position: absolute; bottom: 22px;
  padding: 4px 8px; border-radius: 7px;
  background: rgba(6, 10, 22, 0.94);
  border: 1px solid var(--line);
  font-size: 12px; font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  opacity: 0; pointer-events: none; transition: opacity var(--fast);
}
.timeline:hover .hover-time { opacity: 1; }

.ctrl-row { display: flex; align-items: center; gap: 6px; }
.ctrl {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 12px;
  background: transparent; color: #fff;
  cursor: pointer;
  transition: background var(--fast), transform var(--fast);
}
.ctrl:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-1px); }
.ctrl:active { transform: scale(0.92); }
.ctrl.wide { width: auto; padding: 0 12px; gap: 7px; font-size: 13px; font-weight: 600; }
.time { font-size: 13px; color: #d3ddf3; font-variant-numeric: tabular-nums; margin: 0 8px; white-space: nowrap; }
.ctrl-row .spacer { flex: 1; }

.volume { display: flex; align-items: center; gap: 6px; }
.volume input {
  width: 0; opacity: 0;
  transition: width var(--slow), opacity var(--slow);
  accent-color: var(--accent-2);
}
.volume:hover input, .volume input:focus { width: 90px; opacity: 1; }

.player .sync-pill {
  position: absolute; left: 16px; top: 16px;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(6, 10, 22, 0.78);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 12.5px; color: var(--muted);
  z-index: 6;
  transition: opacity var(--fast);
}
.player .sync-pill b { color: var(--ok); font-weight: 600; }
.player .sync-pill.drift b { color: var(--warn); }

.toast-mini {
  position: absolute; left: 50%; top: 22px;
  transform: translateX(-50%);
  padding: 9px 16px; border-radius: 999px;
  background: rgba(6, 10, 22, 0.9);
  border: 1px solid var(--line);
  font-size: 13px; z-index: 9;
  animation: dropIn 0.3s var(--ease);
}
@keyframes dropIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* реакции поверх видео */
.reactions { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 7; }
.reaction {
  position: absolute; bottom: 90px;
  font-size: 40px;
  animation: floatUp 3.4s var(--ease) forwards;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.reaction small { display: block; font-size: 11px; text-align: center; color: #fff; opacity: 0.85; }
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.4); opacity: 0; }
  14% { transform: translateY(-24px) scale(1.15); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(-360px) scale(0.9) rotate(8deg); opacity: 0; }
}

/* ──────── комната ──────── */
.room-layout {
  display: grid;
  grid-template-columns: 1fr 348px;
  gap: 20px;
  align-items: start;
  padding: 22px 0 40px;
}
.room-side {
  display: flex; flex-direction: column;
  height: calc(100vh - var(--header-h) - 62px);
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  background: rgba(9, 14, 30, 0.66);
  backdrop-filter: blur(16px);
  overflow: hidden;
}
.room-tabs { display: flex; padding: 8px; gap: 6px; border-bottom: 1px solid var(--line-soft); }
.room-tabs button {
  flex: 1; padding: 9px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--fast);
}
.room-tabs button.active { background: var(--surface-2); color: #fff; }
.room-pane { flex: 1; overflow: auto; padding: 14px; display: none; }
.room-pane.active { display: block; }

.msg { display: flex; gap: 10px; margin-bottom: 13px; animation: rise 0.24s var(--ease); }
.msg .dot { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #061020; }
.msg .body b { font-size: 13px; margin-right: 6px; }
.msg .body span { font-size: 11px; color: var(--dim); }
.msg .body p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; word-break: break-word; }
.msg.system { justify-content: center; }
.msg.system p { font-size: 12.5px; color: var(--dim); text-align: center; font-style: italic; }

.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-soft); }
.chat-input .field { padding: 11px 14px; border-radius: 999px; }

.member {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 12px;
  transition: background var(--fast);
}
.member:hover { background: var(--surface); }
.member .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #061020; position: relative; }
.member .dot::after {
  content: ''; position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--ok); border: 2px solid #0b1122;
}
.member.away .dot::after { background: var(--warn); }
.member .who b { font-size: 13.5px; display: block; }
.member .who span { font-size: 11.5px; color: var(--dim); }
.member .tools { margin-left: auto; display: flex; gap: 4px; opacity: 0; transition: opacity var(--fast); }
.member:hover .tools { opacity: 1; }

.vote-card { padding: 14px; border-radius: var(--r-m); border: 1px solid var(--accent); background: rgba(108, 140, 255, 0.1); margin-bottom: 14px; }
.vote-card h4 { margin: 0 0 10px; font-size: 15px; }
.vote-option {
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; margin-bottom: 7px;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(6, 10, 22, 0.5);
  cursor: pointer; font-size: 13.5px;
  transition: border-color var(--fast);
}
.vote-option:hover { border-color: var(--accent); }
.vote-option i { position: absolute; inset: 0 auto 0 0; background: rgba(108, 140, 255, 0.22); transition: width var(--slow); z-index: 0; }
.vote-option span, .vote-option b { position: relative; z-index: 1; }

.perm-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.perm-row select { padding: 6px 10px; border-radius: 9px; background: rgba(6, 10, 22, 0.8); border: 1px solid var(--line); }

.room-code {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 12px;
  border: 1px dashed var(--line);
  font-family: 'SF Mono', 'JetBrains Mono', Consolas, monospace;
  font-size: 20px; font-weight: 700; letter-spacing: 3px;
  color: var(--accent-2);
  cursor: pointer;
}
.room-code:hover { background: var(--surface); }

/* ──────── модалки и тосты ──────── */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 7, 16, 0.7);
  backdrop-filter: blur(12px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fade 0.2s var(--ease);
}
.modal {
  width: min(520px, 100%);
  padding: 26px;
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  background: rgba(12, 18, 36, 0.96);
  box-shadow: var(--shadow);
  animation: rise 0.26s var(--ease);
}
.modal h3 { margin: 0 0 6px; font-size: 21px; }
.modal p.hint { margin: 0 0 18px; color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.modal .row { display: flex; gap: 10px; margin-top: 18px; }
.modal .row .btn { flex: 1; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 11px;
  min-width: 240px; max-width: 380px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12, 18, 36, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  font-size: 13.5px;
  animation: slideIn 0.3s var(--ease);
}
.toast.out { animation: slideOut 0.28s var(--ease) forwards; }
.toast .ic { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.toast.ok .ic { background: var(--ok); }
.toast.error .ic { background: var(--err); }
.toast.warn .ic { background: var(--warn); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes slideOut { to { opacity: 0; transform: translateX(40px) scale(0.96); } }

/* ──────── авторизация ──────── */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.auth-card {
  width: min(430px, 100%);
  padding: 34px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: rgba(11, 17, 34, 0.82);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  animation: rise 0.4s var(--ease);
}
.auth-card .logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-card .logo img { width: 62px; filter: drop-shadow(0 0 26px rgba(108, 140, 255, 0.6)); animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.auth-card .logo b { font-size: 23px; letter-spacing: -0.4px; }
.auth-card .logo span { font-size: 13px; color: var(--dim); }
.auth-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(6, 10, 22, 0.6); margin-bottom: 20px; }
.auth-tabs button {
  flex: 1; padding: 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all var(--fast);
}
.auth-tabs button.active { background: var(--accent); color: #06101f; }
.auth-card label { display: block; font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; }
.auth-card .btn { width: 100%; margin-top: 22px; }
.auth-error { margin-top: 14px; padding: 11px 14px; border-radius: 10px; background: rgba(239, 122, 114, 0.14); color: #ffb4ae; font-size: 13px; }

/* ──────── аккаунт / админка ──────── */
.panel {
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  background: rgba(10, 16, 32, 0.62);
  backdrop-filter: blur(14px);
  padding: 22px;
}
.panel h3 { margin: 0 0 16px; font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat {
  padding: 18px;
  border-radius: var(--r-m);
  border: 1px solid var(--line-soft);
  background: linear-gradient(150deg, rgba(108, 140, 255, 0.12), rgba(255, 255, 255, 0.03));
}
.stat b { display: block; font-size: 28px; letter-spacing: -0.8px; }
.stat span { font-size: 12.5px; color: var(--dim); }

table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 10px 12px;
  color: var(--dim); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.6px;
  border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px; border-bottom: 1px solid var(--line-soft); }
table.data tr:hover td { background: rgba(255, 255, 255, 0.03); }

.device {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: var(--r-m);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  margin-bottom: 10px;
  transition: border-color var(--fast);
}
.device:hover { border-color: var(--line); }
.device .ic { font-size: 24px; }
.device b { font-size: 14px; display: block; }
.device span { font-size: 12px; color: var(--dim); }
.device .tools { margin-left: auto; display: flex; gap: 8px; }

/* ──────── пульт ──────── */
.remote { max-width: 460px; margin: 0 auto; padding: 20px 0 60px; }
.remote-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.remote-pad button {
  aspect-ratio: 1;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 22px;
  cursor: pointer;
  transition: all var(--fast);
  display: grid; place-items: center;
}
.remote-pad button:hover { background: var(--surface-2); border-color: var(--accent); transform: translateY(-2px); }
.remote-pad button:active { transform: scale(0.95); }
.remote-pad button.wide { grid-column: span 3; aspect-ratio: auto; padding: 16px; font-size: 16px; font-weight: 600; }

/* ──────── пусто / ошибки ──────── */
.empty-state { text-align: center; padding: 70px 20px; color: var(--dim); }
.empty-state img { width: 74px; margin: 0 auto 18px; opacity: 0.5; }
.empty-state b { display: block; font-size: 17px; color: var(--text); margin-bottom: 8px; }
.empty-state p { max-width: 460px; margin: 0 auto; font-size: 14px; line-height: 1.6; }

/* ──────── адаптация ──────── */
@media (max-width: 1100px) {
  .room-layout { grid-template-columns: 1fr; }
  .room-side { height: 460px; }
  .title-grid { grid-template-columns: minmax(170px, 220px) 1fr; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .nav { display: none; }
  .search-trigger { min-width: 0; padding: 9px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .hero { height: 78vh; }
  .hero-body { padding-bottom: 34px; max-width: 100%; }
  .title-grid { grid-template-columns: 1fr; }
  .title-poster { width: 168px; }
  .card { width: 138px; }
  .episodes { grid-template-columns: 1fr; }
  .controls { padding: 34px 10px 10px; }
  .ctrl { width: 38px; height: 38px; }
  .time { font-size: 12px; margin: 0 4px; }
  .volume { display: none; }
  .player .watermark { width: 84px; right: 10px; bottom: 66px; }
  .toasts { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
  /* нижняя навигация на телефоне */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0;
    display: flex; z-index: 60;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(7, 11, 24, 0.9);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line-soft);
  }
  .tabbar a {
    flex: 1; text-align: center; padding: 8px 0;
    font-size: 11px; color: var(--dim);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
  }
  .tabbar a.active { color: var(--accent-2); }
  .tabbar svg { width: 21px; height: 21px; }
  .page { padding-bottom: 74px; }
}

.tabbar { display: none; }
@media (max-width: 720px) { .tabbar { display: flex; } }

/* телевизор: крупнее и с чётким фокусом */
@media (min-width: 1800px) {
  :root { --header-h: 84px; }
  body { font-size: 18px; }
  .card { width: 232px; }
  .btn { padding: 15px 28px; font-size: 16.5px; }
}

@media (hover: none) and (pointer: coarse) and (min-width: 1200px) {
  body { font-size: 19px; }
  .card { width: 250px; }
}

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 8px;
}

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

/* ══════════════════════════════════════════════════════════════
   СЛОЙ 2 — сводка реальных классов из JS
   Ниже перекрываются расхождения разметки: чат, участники,
   реакции, пустые экраны, профиль, друзья, статус плеера.
   ══════════════════════════════════════════════════════════════ */

/* ── логотип крупнее ── */
.brand img { width: 42px; height: 42px; }
.brand span { font-size: 22px; }
@media (max-width: 720px) {
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 19px; }
}

/* ── каркас комнаты ── */
.room-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.room-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line-soft);
  backdrop-filter: blur(14px); flex-wrap: wrap;
}
.room-title b { display: block; font-size: 16px; line-height: 1.25; }
.room-title span { font-size: 12.5px; color: var(--dim); }
.room-bar .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── чат ── */
.chat-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; padding-right: 4px; }
.chat-form { display: flex; gap: 8px; padding: 12px 0 0; border-top: 1px solid var(--line-soft); margin-top: 10px; }
.chat-form .btn.icon { flex: 0 0 auto; width: 42px; padding: 0; display: grid; place-items: center; }
input.chat-input {
  flex: 1; min-width: 0; display: block;
  padding: 11px 15px; border-radius: 999px; font: inherit; color: var(--text);
  background: rgba(6, 10, 22, 0.7); border: 1px solid var(--line);
  transition: border-color var(--fast), box-shadow var(--fast);
}
input.chat-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(108, 140, 255, 0.16); }

.msg { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.msg .ava {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #061020;
}
.msg .who { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.msg .who .badge { font-size: 10px; padding: 1px 6px; font-style: normal; }
.msg .who time { font-size: 11px; color: var(--dim); font-weight: 400; }
.msg p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; word-break: break-word; }
.msg.mine .who { color: var(--accent-2); }

/* ── участники ── */
.members { display: flex; flex-direction: column; gap: 4px; }
.member { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-s); }
.member .ava {
  width: 34px; height: 34px; border-radius: 50%; position: relative;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #061020; flex: 0 0 auto;
}
.member .ava .dot {
  position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ok); border: 2px solid var(--bg);
}
.member.away .ava .dot { background: var(--warn); }
.member .who { min-width: 0; }
.member .who b { display: flex; align-items: center; gap: 5px; font-size: 13.5px; }
.member .who span { display: block; font-size: 11.5px; color: var(--dim); }
.member .crown { width: 13px; height: 13px; color: #ffd479; display: inline-flex; }
.member .crown svg { width: 100%; height: 100%; }
.member > .row { margin-left: auto; display: flex; gap: 4px; flex: 0 0 auto; }

/* ── реакции ── */
.reaction-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.reaction-btn {
  width: 44px; height: 44px; border-radius: 50%; font-size: 20px; line-height: 1;
  background: var(--surface); border: 1px solid var(--line-soft); cursor: pointer;
  transition: transform var(--fast), background var(--fast), border-color var(--fast);
}
.reaction-btn:hover { transform: translateY(-3px) scale(1.12); border-color: var(--accent); background: var(--surface-2); }
.reaction-btn:active { transform: scale(0.92); }

/* ── пустые экраны ── */
.empty-state.big { padding: 90px 20px; }
.empty-state h2 { font-size: 24px; color: var(--text); margin: 0 0 10px; }
.empty-icon {
  width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 22px;
  display: grid; place-items: center; color: var(--accent-2);
  background: rgba(108, 140, 255, 0.12); border: 1px solid rgba(108, 140, 255, 0.25);
}
.empty-icon svg { width: 30px; height: 30px; }
.row.center { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.field.big-code {
  font-size: 26px; letter-spacing: 8px; text-align: center; font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: none;
}

/* ── профиль ── */
.account-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.account-grid .panel { margin: 0; }
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.ava.xl {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  font-size: 34px; font-weight: 700; color: #061020; object-fit: cover;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}
.swatches { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.swatch {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform var(--fast), border-color var(--fast);
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: #fff; transform: scale(1.15); }
.panel .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel .row.top { justify-content: space-between; align-items: flex-start; }
.panel .row.wrap { flex-wrap: wrap; }
.list-rows { display: flex; flex-direction: column; gap: 8px; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border-radius: var(--r-s); background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line-soft);
}
.list-row b { font-size: 14px; }
.list-row span { font-size: 12px; color: var(--dim); }
.list-row .tools { margin-left: auto; display: flex; gap: 6px; }

/* ── друзья ── */
.friends { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.friend {
  display: flex; gap: 12px; align-items: center; padding: 13px;
  border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line-soft);
  transition: border-color var(--fast), transform var(--fast);
}
.friend:hover { border-color: var(--line); transform: translateY(-2px); }
.friend.offline { opacity: 0.55; }
.friend .ava {
  width: 46px; height: 46px; border-radius: 50%; position: relative; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 700; color: #061020; object-fit: cover;
}
.friend .ava .dot {
  position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--dim); border: 2.5px solid var(--bg);
}
.friend.online .ava .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.friend .info { min-width: 0; flex: 1; }
.friend .info b { display: block; font-size: 14.5px; }
.friend .info .now { font-size: 12.5px; color: var(--accent-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend .info .at { font-size: 11.5px; color: var(--dim); }
.friend .bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); margin-top: 6px; overflow: hidden; }
.friend .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.friend .tools { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; }

/* ── статус и перемотка в плеере ── */
.player-status {
  position: absolute; right: 14px; bottom: 74px; z-index: 6;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(7, 11, 24, 0.82); border: 1px solid var(--line);
  backdrop-filter: blur(12px); color: var(--text);
  opacity: 0; transform: translateY(8px); transition: opacity var(--fast), transform var(--fast);
  pointer-events: none; max-width: 60%;
}
.player-status.show { opacity: 1; transform: translateY(0); }
.player-status .spin {
  width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.22); border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}
.player-status.ok { color: var(--ok); border-color: rgba(98, 208, 160, 0.4); }
.player-status.warn { color: var(--warn); border-color: rgba(232, 176, 106, 0.4); }
.player-status.err { color: var(--err); border-color: rgba(239, 122, 114, 0.4); }
@keyframes spin { to { transform: rotate(360deg); } }

.seek-hint {
  position: absolute; top: 50%; z-index: 7; transform: translateY(-50%) scale(0.9);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 22px; border-radius: 50%; min-width: 104px;
  background: rgba(7, 11, 24, 0.62); backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none;
}
.seek-hint.left { left: 8%; }
.seek-hint.right { right: 8%; }
.seek-hint svg { width: 26px; height: 26px; }
.seek-hint.show { animation: seekPulse 0.62s var(--ease); }
@keyframes seekPulse {
  0% { opacity: 0; transform: translateY(-50%) scale(0.75); }
  28% { opacity: 1; transform: translateY(-50%) scale(1.06); }
  100% { opacity: 0; transform: translateY(-50%) scale(1.14); }
}

/* ── меню качества и настроек ── */
.pop-menu {
  position: absolute; right: 14px; bottom: 74px; z-index: 9; min-width: 210px;
  padding: 8px; border-radius: var(--r-m);
  background: rgba(9, 14, 28, 0.96); border: 1px solid var(--line);
  backdrop-filter: blur(18px); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: rise 0.18s var(--ease);
}
.pop-menu h5 { margin: 4px 8px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--dim); }
.pop-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; justify-content: space-between;
  padding: 9px 10px; border-radius: 9px; background: none; border: none;
  color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left;
}
.pop-menu button:hover { background: var(--surface-2); }
.pop-menu button.active { color: var(--accent-2); }
.pop-menu button.active::after { content: '✓'; font-weight: 700; }
.pop-menu .sep { height: 1px; margin: 6px 4px; background: var(--line-soft); }

/* ── адаптация ── */
@media (max-width: 1100px) {
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .room-bar { padding: 10px 12px; gap: 10px; }
  .room-title b { font-size: 14.5px; }
  .reaction-btn { width: 40px; height: 40px; font-size: 18px; }
  .friends { grid-template-columns: 1fr; }
  .player-status { right: 10px; bottom: 66px; font-size: 11.5px; padding: 6px 11px; }
  .pop-menu { right: 10px; left: 10px; bottom: 66px; min-width: 0; }
  .empty-state.big { padding: 60px 16px; }
  .empty-state h2 { font-size: 20px; }
  .ava.xl { width: 78px; height: 78px; font-size: 28px; }
}
@media (pointer: coarse) and (min-width: 1200px) {
  .reaction-btn { width: 54px; height: 54px; font-size: 24px; }
  .pop-menu button { padding: 13px 12px; font-size: 16px; }
  .player-status { font-size: 15px; bottom: 96px; }
}

/* ═════ СЛОЙ 3 — точечные правки после теста ═════ */

/* Логотип в шапке — по-настоящему крупный */
.header .brand img,
.brand img { width: 52px; height: 52px; }
.header .brand span,
.brand span { font-size: 25px; }
.header { padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 720px) {
  .header .brand img, .brand img { width: 38px; height: 38px; }
  .header .brand span, .brand span { font-size: 20px; }
}

/* Скелетоны: блик должен идти ровно слева направо, а не по диагонали */
.skeleton {
  position: relative; overflow: hidden;
  background-color: rgba(255, 255, 255, 0.05);
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0) 100%);
  background-repeat: no-repeat;
  background-size: 60% 100%;
  background-position: -60% 0;
  animation: sweep 1.25s linear infinite;
  border-radius: var(--r-m);
}
.skeleton::after { content: none; animation: none; }
@keyframes sweep {
  from { background-position: -60% 0; }
  to { background-position: 160% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}

/* Пульт: кнопки и выбор экрана */
.remote { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.remote-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.remote-key {
  display: grid; place-items: center; gap: 4px;
  min-height: 76px; padding: 14px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line-soft);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform var(--fast), background var(--fast), border-color var(--fast);
}
.remote-key:hover { background: var(--surface-2); border-color: var(--accent); }
.remote-key:active { transform: scale(0.95); }
.remote-key.big { background: rgba(108, 140, 255, 0.16); border-color: rgba(108, 140, 255, 0.4); }
.remote-key i { display: inline-flex; }
.remote-key svg { width: 28px; height: 28px; }
.remote-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line-soft);
}
.remote-row > span { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.remote-row svg { width: 18px; height: 18px; }
.remote-row input.volume { flex: 1; min-width: 140px; }
.devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.device.pick { text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.device.pick.current { border-color: var(--accent); background: rgba(108, 140, 255, 0.12); }
.device .ic { font-size: 22px; width: 30px; text-align: center; }
.device .now { font-size: 12.5px; color: var(--accent-2); }

/* Комната: состояние подключения */
.conn-state {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--dim);
}
.conn-state .spin {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}
.conn-state.ok { color: var(--ok); }
.conn-state.err { color: var(--err); }

@media (max-width: 720px) {
  .remote-pad { gap: 10px; }
  .remote-key { min-height: 66px; font-size: 13px; }
  .devices { grid-template-columns: 1fr; }
}

/* ═════ СЛОЙ 4 — новая палитра, переходы, лайки, превью таймлайна ═════ */

/* Оформление: глубокий сине-фиолетовый фон и холодный неон под звезду логотипа */
:root {
  --bg: #06070f;
  --bg-2: #0b0d1c;
  --surface: rgba(20, 24, 46, 0.72);
  --surface-2: rgba(30, 35, 62, 0.85);
  --accent: #7b6cff;
  --accent-2: #58c8ff;
  --accent-3: #b06cff;
  --text: #eef1ff;
  --muted: #9aa4cc;
  --dim: #6d769b;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.06);
  --ok: #5fd6a4;
  --warn: #f0b467;
  --err: #f2786f;
}
body {
  background:
    radial-gradient(1100px 620px at 78% -12%, rgba(123, 108, 255, 0.20), transparent 60%),
    radial-gradient(900px 540px at 8% 4%, rgba(88, 200, 255, 0.13), transparent 62%),
    var(--bg);
}
.brand img { filter: drop-shadow(0 0 14px rgba(88, 200, 255, 0.6)); }

/* ── плавные переходы между страницами ── */
@view-transition { navigation: auto; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.wrap.page, .title-hero, .section, .shelf, .friends, .account-grid, .room-main {
  animation: rise 0.42s cubic-bezier(0.22, 0.68, 0.36, 1) both;
}
.shelf:nth-of-type(2) { animation-delay: 0.05s; }
.shelf:nth-of-type(3) { animation-delay: 0.1s; }
.shelf:nth-of-type(4) { animation-delay: 0.15s; }
.section:nth-of-type(2) { animation-delay: 0.06s; }
.section:nth-of-type(3) { animation-delay: 0.12s; }
.card { transition: transform 0.28s cubic-bezier(0.22, 0.68, 0.36, 1), filter 0.28s; }
.card:hover { transform: translateY(-6px) scale(1.02); }
.modal-back, .search-overlay { animation: fade-in 0.2s ease both; }
.toast { animation: rise 0.26s ease both; }
@media (prefers-reduced-motion: reduce) {
  .wrap.page, .title-hero, .section, .shelf, .friends, .account-grid, .room-main,
  .modal-back, .search-overlay, .toast { animation: none; }
}

/* ── лайк и избранное ── */
.btn.mark { transition: color var(--fast), border-color var(--fast), background var(--fast); }
.btn.mark svg { width: 17px; height: 17px; }
.btn.mark.on { color: var(--accent-2); border-color: rgba(88, 200, 255, 0.45); background: rgba(88, 200, 255, 0.12); }
.btn.mark.on svg { fill: currentColor; }

/* ── блок «Кратко» вместо отсутствующего трейлера ── */
.title-facts {
  padding: 18px 20px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
}
.title-facts h4 { margin: 0 0 12px; font-size: 14px; color: var(--muted); font-weight: 600; }
.title-facts dl {
  margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px;
}
.title-facts dt { color: var(--dim); font-size: 13px; }
.title-facts dd { margin: 0; font-size: 13.5px; color: var(--text); }

/* ── продолжить с места остановки ── */
.resume-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 16px; border-radius: var(--r-m);
  background: rgba(123, 108, 255, 0.14); border: 1px solid rgba(123, 108, 255, 0.34);
  animation: rise 0.3s ease both;
}
.resume-bar span { flex: 1; min-width: 180px; font-size: 14px; }

/* ── превью кадра на таймлайне ── */
.tl-preview {
  position: absolute; bottom: 22px; left: 0;
  transform: translateX(-50%) translateY(6px) scale(0.96);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 5px; border-radius: 12px;
  background: rgba(6, 7, 15, 0.92); border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  opacity: 0; pointer-events: none;
  transition: opacity var(--fast), transform var(--fast);
  z-index: 9;
}
.tl-preview.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.tl-preview canvas {
  width: 176px; height: 99px; border-radius: 8px; display: block;
  background: rgba(255, 255, 255, 0.05);
}
.tl-preview:not(.ready) canvas { display: none; }
.tl-preview b { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text); }

/* ── часы просмотра в профиле ── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.stat {
  padding: 14px; border-radius: var(--r-m); text-align: center;
  background: var(--surface); border: 1px solid var(--line-soft);
}
.stat b { display: block; font-size: 22px; letter-spacing: -0.5px; }
.stat span { font-size: 12px; color: var(--dim); }

/* ═════ СЛОЙ 5 — темы, свечение обложки, шортсы, нижняя панель ═════ */

/* ── тёмная (базовая): больше чёрного и градиентов ── */
html[data-theme='dark'] {
  --bg: #03040a;
  --bg-2: #070912;
  --bg-3: #0b0e1c;
  --surface: rgba(16, 19, 34, 0.74);
  --surface-2: rgba(26, 30, 52, 0.86);
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
}

/* ── AMOLED: чистый чёрный, чтобы пиксели гасли ── */
html[data-theme='amoled'] {
  --bg: #000000;
  --bg-2: #000000;
  --bg-3: #050505;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.055);
  --text: #f2f5ff;
}
html[data-theme='amoled'] body { background: #000; }
html[data-theme='amoled'] body::before,
html[data-theme='amoled'] body::after { opacity: 0.35; }
html[data-theme='amoled'] .header { background: rgba(0, 0, 0, 0.72); }
html[data-theme='amoled'] .card .poster { background: #050505; }
html[data-theme='amoled'] .hero-slide::after {
  background:
    linear-gradient(90deg, #000 6%, rgba(0, 0, 0, 0.68) 46%, rgba(0, 0, 0, 0.12) 80%),
    linear-gradient(0deg, #000 3%, rgba(0, 0, 0, 0.18) 52%);
}

/* ── светлая ── */
html[data-theme='light'] {
  --bg: #f4f6fc;
  --bg-2: #eaeefa;
  --bg-3: #e2e8f8;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-2: rgba(255, 255, 255, 0.96);
  --line: rgba(20, 30, 60, 0.12);
  --line-soft: rgba(20, 30, 60, 0.08);
  --text: #131829;
  --muted: #5a6485;
  --dim: #7d87a6;
  --accent: #5b4bff;
  --accent-2: #0a86d8;
}
html[data-theme='light'] body { background: linear-gradient(180deg, #f7f9ff, #e9eefb 60%, #eef2fd); color: var(--text); }
html[data-theme='light'] .header { background: rgba(255, 255, 255, 0.76); }
html[data-theme='light'] .card .title { color: var(--text); }
html[data-theme='light'] .hero-slide::after {
  background:
    linear-gradient(90deg, rgba(244, 246, 252, 0.97) 6%, rgba(244, 246, 252, 0.6) 48%, rgba(244, 246, 252, 0.05) 80%),
    linear-gradient(0deg, var(--bg) 2%, rgba(244, 246, 252, 0.1) 50%);
}
html[data-theme='light'] .hero-body h1,
html[data-theme='light'] .short-info h2 { text-shadow: none; }
html[data-theme='light'] .player { color: #fff; }

/* ── анимации можно выключить в настройках ── */
html[data-motion='off'] *,
html[data-motion='off'] *::before,
html[data-motion='off'] *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.06s !important;
}

/* ── свечение под цвет обложки (Netflix-эффект) ── */
body.tinted .title-hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 90%;
  background: radial-gradient(60% 70% at 30% 0%, var(--tint-soft, transparent), transparent 72%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: fade-in 0.9s var(--ease) both;
}
body.tinted .title-poster img { box-shadow: 0 30px 90px -30px var(--tint-soft, rgba(0, 0, 0, 0.6)); }
body.tinted .title-actions .btn.primary {
  background: linear-gradient(135deg, var(--tint, var(--accent)), var(--accent-2));
  border-color: transparent;
}
body.tinted .section h2 { text-shadow: 0 0 40px var(--tint-faint, transparent); }
body.tinted .player { box-shadow: 0 40px 120px -40px var(--tint-soft, rgba(0, 0, 0, 0.7)); }
html[data-glow='off'] body.tinted .title-hero::before { display: none; }

/* ── окно настроек ── */
.settings h4 { margin: 4px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); }
.settings .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.settings .chip.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.switch-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; margin-bottom: 10px;
  border: 1px solid var(--line-soft); border-radius: var(--r-m);
  background: var(--surface); cursor: pointer;
}
.switch-row:hover { border-color: var(--line); }
.switch-row input { width: 20px; height: 20px; accent-color: var(--accent-2); }
.switch-row b { display: block; font-size: 14.5px; }
.switch-row span { display: block; font-size: 12.5px; color: var(--dim); margin-top: 2px; }

/* ── лайк и избранное: красный и жёлтый ── */
.btn.mark.like.on {
  color: #ff5a6e;
  border-color: rgba(255, 90, 110, 0.5);
  background: linear-gradient(135deg, rgba(255, 90, 110, 0.2), rgba(255, 90, 110, 0.08));
  box-shadow: 0 8px 30px -12px rgba(255, 90, 110, 0.8);
}
.btn.mark.fav.on {
  color: #ffc247;
  border-color: rgba(255, 194, 71, 0.5);
  background: linear-gradient(135deg, rgba(255, 194, 71, 0.2), rgba(255, 194, 71, 0.08));
  box-shadow: 0 8px 30px -12px rgba(255, 194, 71, 0.8);
}
.btn.mark.on svg { fill: currentColor; animation: pop-mark 0.4s var(--ease); }
@keyframes pop-mark { 0% { transform: scale(0.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* карточки в профиле — мягче и понятнее */
.marks-group { margin-bottom: 22px; }
.marks-group > h4 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; font-size: 14px; letter-spacing: -0.2px;
}
.marks-group > h4 .dot { width: 8px; height: 8px; border-radius: 50%; }
.marks-group.fav > h4 .dot { background: #ffc247; box-shadow: 0 0 14px #ffc247; }
.marks-group.like > h4 .dot { background: #ff5a6e; box-shadow: 0 0 14px #ff5a6e; }
.marks-group > h4 span.count {
  margin-left: auto; font-size: 12px; color: var(--dim);
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-soft);
}

/* ── мини-превью на таймлайне: прямоугольник виден всегда ── */
.player .tl-preview {
  width: 176px; height: 99px;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: #000;
  background-image: var(--shot, none);
  background-size: cover; background-position: center;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.9);
}
.player .tl-preview:not(.ready) canvas { display: none; }
.player .tl-preview:not(.ready)::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.55));
}
.player .tl-preview .time {
  position: absolute; left: 0; right: 0; bottom: 4px;
  text-align: center; font-size: 12px; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px #000; z-index: 2;
}

/* ── плеер: никакой синей рамки при перемотке стрелками ── */
.player, .player * { outline: none; }
.player:focus, .player:focus-visible, .player video:focus { outline: none; box-shadow: none; }
.player .ctrl:focus-visible, .player .timeline:focus-visible {
  outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 8px;
}

/* ── герой на главной — шире и выше ── */
.hero { height: clamp(560px, 82vh, 940px); }
.hero-body { max-width: min(760px, 62vw); padding-bottom: clamp(60px, 8vh, 110px); }
.hero-body h1 { font-size: clamp(38px, 5.6vw, 76px); }
.hero-body p { font-size: 16.5px; -webkit-line-clamp: 4; }
.hero-slide .backdrop { background-position: center 20%; }
@media (max-width: 720px) {
  .hero { height: clamp(430px, 66vh, 620px); }
  .hero-body { max-width: 100%; }
}

/* ── нижняя панель и лист быстрых кнопок ── */
.tabbar .more { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.tabbar .more.on { color: var(--accent-2); }
.quick-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 14px 14px calc(78px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(6, 8, 18, 0.6), var(--bg) 40%);
  backdrop-filter: blur(22px);
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  transform: translateY(115%);
  transition: transform 0.34s var(--ease);
  display: none;
}
.quick-sheet.open { transform: translateY(0); }
.quick-sheet .grab { width: 44px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-grid .quick {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line-soft);
  color: var(--text); font-size: 11.5px; text-decoration: none; cursor: pointer;
}
.quick-grid .quick:active { transform: scale(0.96); }
.quick-grid .quick svg { width: 20px; height: 20px; }
@media (max-width: 720px) { .quick-sheet { display: block; } }

/* ── лента шортсов ── */
.shorts-page { overflow: hidden; }
.shorts-feed {
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  background: #000;
}
.shorts-feed::-webkit-scrollbar { display: none; }
.short {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  overflow: hidden;
  display: block;
}
.short-cover { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(26px) saturate(1.2); transform: scale(1.15); opacity: 0.6; }
.short-video {
  position: absolute; top: 50%; left: 50%;
  width: 178vh; height: 100dvh; max-width: none;
  transform: translate(-50%, -50%);
  border: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.short.live .short-video { opacity: 1; }
.short-shade {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 4%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.short-info {
  position: absolute; left: 0; right: 84px; bottom: calc(96px + env(safe-area-inset-bottom));
  padding: 0 18px; z-index: 3;
}
.short-info h2 { margin: 8px 0 6px; font-size: 26px; letter-spacing: -0.6px; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.8); }
.short-info p { margin: 0 0 14px; color: #c9d2e8; font-size: 13.5px; line-height: 1.5; }
.short-side {
  position: absolute; right: 14px; bottom: calc(120px + env(safe-area-inset-bottom));
  z-index: 3; display: flex; flex-direction: column; gap: 14px;
}
.short-side .round {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10, 12, 22, 0.6); border: 1px solid var(--line);
  color: #fff; cursor: pointer; backdrop-filter: blur(10px);
  transition: transform var(--fast), color var(--fast);
}
.short-side .round:active { transform: scale(0.92); }
.short-side .round.like.on { color: var(--like); border-color: rgba(255, 90, 110, 0.6); }
.short-side .round.fav.on { color: var(--fav); border-color: rgba(255, 194, 71, 0.6); }
.short-side .round.on svg { fill: currentColor; animation: pop-mark 0.4s var(--ease); }
.short-loading { height: 100dvh; display: grid; place-content: center; gap: 12px; justify-items: center; color: var(--muted); }
@media (min-width: 900px) {
  .short-video { width: 100vw; height: 56.25vw; }
  .short-info { right: 120px; padding-left: 8vw; }
}

/* ═════ СЛОЙ 6 — готовые значки, админка, профиль, общий чат, видео-баннер, шортсы ═════ */

/* ── значки Lucide: единый размер и толщина линий ── */
.ic { display: inline-grid; place-items: center; line-height: 0; }
.ic svg, svg.lucide {
  width: var(--isz, 20px); height: var(--isz, 20px);
  stroke-width: 1.9;
}
.btn svg, .btn .ic { flex: none; }
.btn.icon-btn, .btn.icon { display: inline-grid; place-items: center; }

/* ── шапка: логотип крупнее ── */
.header .brand img { height: 44px; width: auto; }
.header .brand span { font-size: 20px; letter-spacing: -0.4px; }
@media (max-width: 720px) {
  .header .brand img { height: 34px; }
  .header .brand span { font-size: 17px; }
}

/* ── страницы: заголовок больше не прячется под шапкой (фото 3) ── */
.wrap.page { padding-top: calc(var(--header-h) + 30px); padding-bottom: 90px; }
.page-head { margin: 0 0 22px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.8px; }
.page-head .hint { margin: 0; }
.panel h3 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.panel h3 small { font-size: 12px; font-weight: 500; color: var(--dim); }
.panel h4 { display: flex; align-items: center; gap: 8px; }
.panel label { display: block; margin: 14px 0 6px; font-size: 12.5px; color: var(--muted); }
textarea.field { resize: vertical; min-height: 74px; font: inherit; }
.row.gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── общие блоки: сегменты, сетка карточек, строки ── */
.seg {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 6px; margin-bottom: 20px;
  border: 1px solid var(--line-soft); border-radius: 999px;
  background: rgba(10, 14, 30, 0.5); backdrop-filter: blur(14px);
}
.seg::-webkit-scrollbar { display: none; }
.seg-btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 16px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
.seg-btn:hover { color: var(--text); background: var(--surface-2); }
.seg-btn.active { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #060913; font-weight: 600; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 12px; }
.mini-grid .card { width: 100%; }
.mini-grid .card .poster { width: 100%; }
.card-x {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(6, 9, 20, 0.72); color: #fff; cursor: pointer;
  opacity: 0; transition: opacity var(--fast), transform var(--fast);
}
.card:hover .card-x { opacity: 1; }
.card-x:hover { transform: scale(1.08); background: rgba(242, 120, 111, 0.9); }

.row-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.row-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 14px;
  border: 1px solid var(--line-soft); background: rgba(10, 14, 30, 0.45);
  color: inherit; text-decoration: none;
  transition: border-color var(--fast), background var(--fast), transform var(--fast);
}
.row-item:hover { border-color: var(--line); background: var(--surface-2); transform: translateX(2px); }
.row-item img { width: 46px; height: 66px; border-radius: 8px; object-fit: cover; flex: none; }
.row-blank, .row-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); font-size: 20px; flex: none; }
.row-code { font: 600 15px/1 ui-monospace, monospace; letter-spacing: 1.5px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--accent-2); flex: none; }
.row-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.row-body b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; }
.row-body small { font-size: 12px; color: var(--dim); }
.row-body small.now { color: var(--accent-2); }
.row-pct { font-size: 13px; color: var(--accent-2); font-weight: 600; flex: none; }
.row-actions { display: flex; gap: 8px; margin-left: auto; flex: none; }
.row-item.live { border-color: rgba(95, 214, 164, 0.4); }
.row-item.current { background: rgba(108, 140, 255, 0.1); }
.badge.gold { color: #ffd479; border-color: rgba(255, 212, 121, 0.4); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips.flat { margin: 0; }
.chip.on { background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent; color: #08101f; font-weight: 600; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16); }

/* ── аккаунт: шапка с фоном и градиентом ── */
.wrap.page.account { padding-top: var(--header-h); }
.acc-hero {
  position: relative; margin: 18px 0 22px;
  border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(1200px 260px at 12% 0%, var(--acc-a, rgba(108, 140, 255, 0.5)), transparent 70%),
    linear-gradient(180deg, var(--acc-b, #0a0e1c), rgba(5, 7, 16, 0.96));
  box-shadow: var(--shadow-soft);
}
.acc-banner {
  height: clamp(140px, 22vw, 230px);
  background-size: cover; background-position: center;
  background-image: linear-gradient(120deg, var(--acc-a, rgba(108, 140, 255, 0.45)), transparent 60%);
}
.acc-banner.has-image::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: clamp(140px, 22vw, 230px);
  background: linear-gradient(180deg, rgba(4, 6, 14, 0.1), rgba(4, 6, 14, 0.92));
}
.acc-hero-body {
  position: relative; z-index: 2;
  display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  padding: 0 clamp(16px, 3vw, 30px) 22px;
  margin-top: -46px;
}
.acc-ava-btn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; }
.ava.xl.ring { width: 108px; height: 108px; font-size: 34px; border: 4px solid rgba(255, 255, 255, 0.14); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); }
.ava.xl.ring img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.acc-ava-edit {
  position: absolute; right: -2px; bottom: -2px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: #060913;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}
.acc-hero-text { flex: 1; min-width: 220px; }
.acc-hero-text h1 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.8px; }
.acc-hero-text p { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.acc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; max-width: 560px; }
.acc-tile {
  padding: 10px 12px; border-radius: 14px;
  border: 1px solid var(--line-soft); background: rgba(6, 10, 22, 0.5);
  backdrop-filter: blur(10px);
}
.acc-tile b { display: block; font-size: 19px; letter-spacing: -0.4px; }
.acc-tile span { font-size: 11.5px; color: var(--dim); }
.acc-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acc-tabs { position: sticky; top: calc(var(--header-h) + 6px); z-index: 5; }
.acc-pane { display: flex; flex-direction: column; gap: 18px; }
.acc-pane .panel { margin: 0; }
@media (max-width: 720px) {
  .acc-hero-body { margin-top: -34px; gap: 14px; }
  .ava.xl.ring { width: 84px; height: 84px; font-size: 26px; }
  .acc-hero-actions .btn span { display: none; }
}

/* ── кнопка «Список» на тайтле ── */
.list-wrap { position: relative; display: inline-flex; }
.list-btn.on { color: var(--accent-2); border-color: rgba(88, 200, 255, 0.45); }
.list-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30;
  min-width: 210px; display: none;
}
.list-wrap.open .list-menu { display: block; animation: rise 0.18s var(--ease) both; }
.pop-menu .pop-item { display: flex; width: 100%; align-items: center; gap: 10px; }
.pop-menu .pop-item.active { color: var(--accent-2); }
.pop-menu .pop-item.danger { color: var(--err); }

/* ── админка ── */
.admin .adm-tabs { margin-bottom: 18px; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.adm-tiles.small { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.adm-tile {
  padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(18, 24, 48, 0.8), rgba(8, 11, 24, 0.7));
}
.adm-tile-value { display: block; font-size: 25px; font-weight: 700; letter-spacing: -0.8px; }
.adm-tile-label { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.adm-tile-hint { display: block; margin-top: 4px; font-size: 11px; color: var(--dim); }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.adm-chart { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding-top: 10px; }
.adm-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.adm-bar span {
  width: 100%; min-height: 3px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  transition: height var(--slow);
}
.adm-bar em { font-style: normal; font-size: 10px; color: var(--dim); }
.adm-rows { display: flex; flex-direction: column; gap: 10px; }
.adm-row { display: grid; grid-template-columns: 150px 1fr 60px; gap: 10px; align-items: center; }
.adm-row-name { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-row-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.adm-row-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.adm-row-value { font-size: 12.5px; color: var(--text); text-align: right; }
.adm-list { display: flex; flex-direction: column; gap: 8px; }
.adm-list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.adm-list.tight { gap: 4px; }
.adm-item {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 9px 11px; border-radius: 12px; color: inherit; text-decoration: none;
  border: 1px solid var(--line-soft); background: rgba(9, 13, 28, 0.5);
}
.adm-item.as-btn { cursor: pointer; font: inherit; width: 100%; }
.adm-item.as-btn:hover { border-color: var(--line); background: var(--surface-2); }
.adm-item img { width: 34px; height: 48px; border-radius: 7px; object-fit: cover; }
.adm-item-blank { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; color: var(--dim); }
.adm-item-blank.live { background: rgba(95, 214, 164, 0.18); color: var(--ok); }
.adm-item-blank.code { font: 600 12px/1 ui-monospace, monospace; letter-spacing: 1px; color: var(--accent-2); }
.adm-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.adm-item-body b { font-size: 13.5px; font-weight: 600; }
.adm-item-body small { font-size: 11.5px; color: var(--dim); }
.adm-feed { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.adm-feed-row { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 10px; background: rgba(9, 13, 28, 0.45); font-size: 12.5px; }
.adm-feed-time { color: var(--dim); font-size: 11px; flex: none; }
.adm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; font-size: 12.5px; color: var(--muted); }
.adm-person { display: flex; align-items: center; gap: 8px; }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line-soft); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 12px; text-align: left; white-space: nowrap; }
.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--dim); background: rgba(9, 13, 28, 0.6); }
.table tbody tr { border-top: 1px solid var(--line-soft); }
.table tbody tr:hover { background: var(--surface-2); }
.btn.tiny { padding: 5px 10px; font-size: 12px; border-radius: 9px; }
.tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line); color: var(--muted); }
.tag.red { color: var(--err); border-color: rgba(242, 120, 111, 0.45); }
.tag.green { color: var(--ok); border-color: rgba(95, 214, 164, 0.45); }
.skeleton-panel { height: 180px; border-radius: 18px; background: var(--surface-2); animation: sweep 1.4s linear infinite; }
.error-panel { padding: 20px; border-radius: 16px; border: 1px solid rgba(242, 120, 111, 0.4); background: rgba(242, 120, 111, 0.08); }
.gap { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── главная: в баннере играет трейлер ── */
.hero-video {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 56.25vw; min-height: 100%; min-width: 177.78vh;
  transform: translate(-50%, -50%) scale(1.06);
  border: 0; pointer-events: none;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.hero-slide.playing .hero-video { opacity: 1; }
.hero-slide.playing .backdrop { opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-fade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 5, 14, 0.92) 4%, rgba(3, 5, 14, 0.55) 45%, rgba(3, 5, 14, 0.05) 78%),
    linear-gradient(0deg, var(--bg) 2%, rgba(3, 5, 14, 0.12) 52%);
}
.hero-sound {
  position: absolute; right: clamp(14px, 3vw, 42px); bottom: clamp(28px, 5vh, 60px); z-index: 4;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(6, 9, 20, 0.5);
  color: #fff; backdrop-filter: blur(10px);
}
.hero-sound:hover { background: rgba(6, 9, 20, 0.78); }
.hero-body .hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
@media (max-width: 720px) {
  .hero { height: clamp(460px, 72vh, 640px); }
  .hero-sound { width: 38px; height: 38px; bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ── шортсы: жесты и компактные кнопки ── */
.short-stage { position: absolute; inset: 0; z-index: 2; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.short-side { gap: 10px; bottom: calc(108px + env(safe-area-inset-bottom)); }
.short-side .round { width: 42px; height: 42px; }
.short-side .round svg, .short-side .round .ic { --isz: 19px; }
.short-hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
  z-index: 4; padding: 10px 16px; border-radius: 999px;
  background: rgba(6, 9, 20, 0.72); border: 1px solid var(--line);
  color: #fff; font-size: 13px; backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.short-hint.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.short-burst {
  position: absolute; z-index: 5; width: 92px; height: 92px; margin: -46px 0 0 -46px;
  pointer-events: none; color: #ff5a6e;
  animation: burst 0.7s var(--ease) forwards;
}
.short-burst svg, .short-burst .ic { --isz: 92px; }
@keyframes burst {
  0% { transform: scale(0.4); opacity: 0; }
  35% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1.5) translateY(-20px); opacity: 0; }
}
.short.fast .short-video { filter: saturate(1.05); }
.short.fast::after {
  content: '2×'; position: absolute; top: calc(18px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%); z-index: 5;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(6, 9, 20, 0.75); border: 1px solid var(--line); color: #fff;
}
.short.paused .short-stage::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 74px; height: 74px;
  transform: translate(-50%, -50%);
  background: rgba(6, 9, 20, 0.6); border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(34% 26%, 46% 26%, 46% 74%, 34% 74%, 34% 26%, 54% 26%, 66% 26%, 66% 74%, 54% 74%);
}

/* ── плеер: браузерный апскейл ── */
.player video.upscaled {
  image-rendering: auto;
  filter: contrast(calc(1 + var(--sharp, 0) * 0.06)) saturate(calc(1 + var(--sharp, 0) * 0.05));
  transform: translateZ(0);
}
.player[data-upscale='qhd'] video.upscaled,
.player[data-upscale='uhd'] video.upscaled { filter: contrast(1.08) saturate(1.06) brightness(1.01); }

/* ── капча ── */
.captcha { margin: 16px 0 4px; min-height: 66px; display: flex; justify-content: center; }

/* ── общий чат: плавающий док ── */
.gchat-dock {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.gchat-fab {
  position: relative; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #060913; box-shadow: 0 16px 40px rgba(6, 10, 30, 0.6);
  transition: transform var(--fast), filter var(--fast);
}
.gchat-fab:hover { transform: translateY(-2px); filter: brightness(1.06); }
.gchat-fab.active { background: var(--surface-2); color: var(--text); }
.gchat-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px;
  background: #ff5a6e; color: #fff; font-size: 11px; font-weight: 700; font-style: normal;
}
.gchat {
  width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 560px);
  display: none; flex-direction: column; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--line);
  background: rgba(8, 11, 24, 0.86); backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}
.gchat.open { display: flex; animation: rise 0.22s var(--ease) both; }
.gchat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.gchat-head b { font-size: 14.5px; }
.gchat-online { font-style: normal; font-size: 11.5px; color: var(--ok); }
.gchat-x { margin-left: auto; border: 0; background: none; color: var(--dim); cursor: pointer; display: grid; place-items: center; }
.gchat-x:hover { color: var(--text); }
.gchat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.gchat-row { position: relative; display: flex; gap: 10px; }
.gchat-row .ava.sm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #06101f; flex: none; overflow: hidden; }
.gchat-row .ava.sm img { width: 100%; height: 100%; object-fit: cover; }
.gchat-body { min-width: 0; }
.gchat-who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gchat-who b { font-size: 12.5px; }
.gchat-who time { font-size: 10.5px; color: var(--dim); }
.gchat-body p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.gchat-row.mine .gchat-body p { color: var(--accent-2); }
.gchat-del { position: absolute; top: 0; right: 0; opacity: 0; border: 0; background: none; color: var(--dim); cursor: pointer; }
.gchat-row:hover .gchat-del { opacity: 1; }
.gchat-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.gchat-input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: rgba(4, 7, 16, 0.6);
  color: var(--text); font: inherit; font-size: 13.5px;
}
.gchat-input:focus { outline: none; border-color: var(--accent); }
@media (max-width: 720px) {
  .gchat-dock { right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); }
  .gchat-fab { width: 48px; height: 48px; }
}
html[data-theme='light'] .gchat { background: rgba(255, 255, 255, 0.92); }
html[data-theme='light'] .row-item { background: rgba(255, 255, 255, 0.7); }
html[data-theme='amoled'] .gchat { background: rgba(0, 0, 0, 0.92); }
html[data-theme='amoled'] .acc-hero { background: radial-gradient(1000px 240px at 12% 0%, var(--acc-a, rgba(108, 140, 255, 0.4)), #000 70%); }

/* ═════ СЛОЙ 7 — корпус: левый рельс, шапка-пилюли, виджет TAB, свет под обложку ═════ */

:root {
  --rail-w: 78px;
  --rail-open: 236px;
  --tab-max: 720px;
}

/* ── левый рельс ── */
.rail {
  position: fixed;
  left: 0;
  top: var(--header-h);
  bottom: 0;
  width: var(--rail-w);
  z-index: 55;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 12px 22px;
  background: linear-gradient(180deg, rgba(8, 12, 26, 0.72), rgba(6, 9, 20, 0.9));
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(18px) saturate(1.2);
  transition: width var(--slow), background var(--slow);
  overflow: hidden;
}
.rail:hover, .rail.pinned { width: var(--rail-open); }
.rail-body, .rail-foot { display: flex; flex-direction: column; gap: 6px; }
.rail-item {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 50px;
  padding: 0 15px;
  border: 0;
  border-radius: 15px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}
.rail-item i { flex: 0 0 auto; display: inline-grid; place-items: center; --isz: 21px; }
.rail-item span {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--fast), transform var(--fast);
}
.rail:hover .rail-item span, .rail.pinned .rail-item span { opacity: 1; transform: none; }
.rail-item:hover { background: var(--surface); color: var(--text); }
.rail-item:active { transform: scale(0.97); }
.rail-item.active {
  color: #fff;
  background: linear-gradient(120deg, rgba(123, 108, 255, 0.28), rgba(88, 200, 255, 0.16));
  box-shadow: inset 0 0 0 1px rgba(150, 170, 255, 0.24);
}
.rail-item.active i { color: var(--accent-2); }
.rail-pin {
  align-self: flex-start;
  width: 34px; height: 34px;
  margin-left: 8px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--dim);
  cursor: pointer;
  transition: transform var(--fast), color var(--fast), border-color var(--fast);
}
.rail-pin.on { color: var(--accent-2); border-color: var(--tint-line, rgba(120, 150, 255, 0.4)); transform: rotate(180deg); }

/* сдвигаем контент под рельс */
body.has-rail .header { padding-left: calc(var(--rail-w) + 16px); }
body.has-rail .wrap { padding-left: calc(var(--rail-w) + clamp(14px, 2vw, 34px)); }
body.has-rail .hero-body { padding-left: calc(var(--rail-w) + clamp(18px, 3vw, 54px)); }
body.has-rail.rail-pinned .wrap { padding-left: calc(var(--rail-open) + clamp(14px, 2vw, 30px)); }
body.has-rail.rail-pinned .hero-body { padding-left: calc(var(--rail-open) + clamp(18px, 3vw, 42px)); }
@media (max-width: 1180px) {
  .rail { display: none; }
  body.has-rail .header, body.has-rail .wrap, body.has-rail .hero-body { padding-left: clamp(14px, 3vw, 42px); }
}

/* ── шапка: навигация пилюлями ── */
.header { gap: 16px; }
.nav.pills {
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}
.nav.pills a { padding: 8px 15px; font-size: 14px; font-weight: 500; }
.nav.pills a.active {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 22px rgba(90, 110, 255, 0.32);
}
.nav.pills a.active::after { display: none; }
.head-ic {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--fast), border-color var(--fast), transform var(--fast);
}
.head-ic:hover { color: var(--text); transform: translateY(-1px); }
.head-right { display: flex; align-items: center; gap: 10px; }

/* если TAB внизу открыт — верхний поиск прячется */
body[data-tab='open'] .search-trigger.top { display: none; }
body[data-tab='hidden'] .search-trigger.top { display: flex; animation: rise 0.3s var(--ease) both; }

/* ── TAB: нижний виджет ── */
.tab-dock {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 70;
  width: min(var(--tab-max), calc(100vw - 40px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--slow), opacity var(--slow);
}
.tab-dock.hidden {
  transform: translateX(-50%) translateY(160%);
  opacity: 0;
  pointer-events: none;
}
.tab-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(10, 14, 30, 0.72);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 26px 60px rgba(2, 5, 16, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color var(--fast), box-shadow var(--slow), transform var(--fast);
}
.tab-dock.focused .tab-shell {
  border-color: var(--tint-line, rgba(130, 150, 255, 0.44));
  box-shadow: 0 30px 70px rgba(2, 5, 16, 0.7), 0 0 0 4px rgba(120, 140, 255, 0.12);
  transform: translateY(-2px);
}
.tab-side { display: flex; align-items: center; gap: 6px; }
.tab-slot {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--fast);
}
.tab-slot:hover { color: #fff; background: rgba(255, 255, 255, 0.11); border-color: var(--line); transform: translateY(-2px); }
.tab-slot:active { transform: scale(0.94); }
.tab-ic { display: grid; place-items: center; color: var(--dim); padding-left: 4px; --isz: 19px; }
.tab-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
}
.tab-input::placeholder { color: var(--dim); }
.tab-kbd {
  font-size: 11px;
  color: var(--dim);
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}
.tab-dock.focused .tab-kbd { opacity: 0; }
.tab-hide {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--dim);
  cursor: pointer;
  transform: rotate(90deg);
  transition: color var(--fast), background var(--fast);
}
.tab-hide:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

/* подсказки поиска над строкой */
.tab-results {
  display: none;
  flex-direction: column;
  gap: 4px;
  max-height: min(52vh, 440px);
  overflow: auto;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(9, 13, 28, 0.9);
  backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: var(--shadow);
  animation: rise 0.24s var(--ease) both;
}
.tab-results.open { display: flex; }
.tab-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: background var(--fast);
}
.tab-result img, .tab-result-blank {
  width: 42px;
  height: 62px;
  object-fit: cover;
  border-radius: 9px;
  background: var(--surface-2);
  flex: 0 0 auto;
}
.tab-result b { display: block; font-size: 14.5px; }
.tab-result span { font-size: 12px; color: var(--dim); }
.tab-result.sel, .tab-result:hover { background: rgba(255, 255, 255, 0.07); }

/* спрятанный TAB: маленькая ручка внизу */
.tab-handle {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 69;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 14, 30, 0.78);
  backdrop-filter: blur(18px);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  transition: all var(--slow);
}
.tab-handle.show { display: flex; transform: translateX(-50%); opacity: 1; }
.tab-handle:hover { color: var(--text); border-color: var(--tint-line, rgba(130, 150, 255, 0.4)); }

/* выбор действия для кнопки */
.tab-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.tab-pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: all var(--fast);
}
.tab-pick-item:hover { color: var(--text); border-color: rgba(150, 170, 255, 0.35); transform: translateY(-2px); }
.tab-pick-item.on { color: #fff; background: linear-gradient(120deg, rgba(123, 108, 255, 0.3), rgba(88, 200, 255, 0.18)); }

/* чтобы виджет не накрывал чат и контент */
body[data-tab='open'] .gchat-dock { bottom: 104px; }
body[data-tab='open'] .page, body[data-tab='open'] .wrap.page { padding-bottom: 120px; }

/* ── свет под обложку ── */
body.tinted { background: linear-gradient(180deg, var(--tint-deep, var(--bg)) 0%, var(--bg) 58%); }
body.tinted::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 560px at 8% -10%, var(--tint-soft), transparent 62%),
    radial-gradient(880px 520px at 94% -4%, var(--tint-faint), transparent 66%),
    radial-gradient(760px 420px at 50% 108%, var(--tint-faint), transparent 70%);
  opacity: 0;
  animation: fade-in 0.9s var(--ease) forwards;
}
html[data-glow='off'] body.tinted::before { display: none; }
html[data-glow='off'] body.tinted { background: var(--bg); }
body.tinted .header.scrolled { background: linear-gradient(180deg, var(--tint-deep-2, rgba(7, 11, 24, 0.9)), rgba(7, 11, 24, 0.82)); }
body.tinted .rail { background: linear-gradient(180deg, var(--tint-deep-2, rgba(8, 12, 26, 0.75)), rgba(6, 9, 20, 0.92)); }
body.tinted .tab-shell { border-color: var(--tint-line, var(--line)); }
body.tinted .title-hero .btn.primary { box-shadow: 0 14px 34px var(--tint-faint); }

/* ── карточки каталога ── */
.card-save {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: rgba(8, 12, 26, 0.62);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-6px);
  transition: all var(--fast);
  --isz: 17px;
  z-index: 3;
}
.card:hover .card-save, .card:focus-within .card-save, .card-save.on { opacity: 1; transform: none; }
.card-save:hover { background: rgba(20, 26, 50, 0.9); transform: translateY(-2px); }
.card-save.on { color: #ffc247; border-color: rgba(255, 194, 71, 0.5); }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.card-tags i {
  font-style: normal;
  font-size: 10.5px;
  color: var(--dim);
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.card .marks .badge.rate { background: rgba(8, 12, 26, 0.72); color: #ffc247; border-color: rgba(255, 194, 71, 0.34); }

/* ── герой на главной: мягкие углы как на референсе ── */
@media (min-width: 1181px) {
  .hero { border-radius: 0 0 34px 34px; }
}

/* ── телефон ── */
@media (max-width: 720px) {
  .tab-dock { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 20px); }
  .tab-shell { padding: 6px 8px; border-radius: 19px; }
  .tab-slot { width: 36px; height: 36px; border-radius: 12px; }
  .tab-kbd { display: none; }
  .tab-input { font-size: 16px; }
  .tab-handle { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  body[data-tab='open'] .gchat-dock { bottom: 132px; }
  .tab-side:last-of-type .tab-slot:last-child { display: none; }
}

/* ── светлая тема и AMOLED ── */
html[data-theme='light'] .rail { background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 246, 252, 0.96)); }
html[data-theme='light'] .tab-shell,
html[data-theme='light'] .tab-results,
html[data-theme='light'] .tab-handle { background: rgba(255, 255, 255, 0.92); }
html[data-theme='light'] .tab-slot { background: rgba(10, 20, 60, 0.05); }
html[data-theme='light'] .nav.pills { background: rgba(10, 20, 60, 0.04); }
html[data-theme='light'] .card-save { background: rgba(255, 255, 255, 0.82); color: #131829; border-color: rgba(20, 30, 70, 0.14); }
html[data-theme='amoled'] .rail { background: linear-gradient(180deg, rgba(0, 0, 0, 0.94), #000); }
html[data-theme='amoled'] .tab-shell,
html[data-theme='amoled'] .tab-results,
html[data-theme='amoled'] .tab-handle { background: rgba(0, 0, 0, 0.88); }
html[data-theme='amoled'] body.tinted { background: #000; }
html[data-motion='off'] .tab-dock, html[data-motion='off'] .rail { transition: none; }

/* ═════ СЛОЙ 8 — живой фон, отсек просмотра с сериями, события и таймкоды в комнате ═════ */

:root {
  --like: #ff5a6e;
  --fav: #ffc247;
}

/* ── живой фон ── */
.ambient-gl {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -2; pointer-events: none;
  opacity: 0; transition: opacity 0.7s var(--ease);
}
.ambient-gl.on { opacity: 1; }
/* когда играет шейдер — статичные пятна приглушаем, чтобы цвет не удваивался */
body.ambient-live.tinted::before { opacity: 0.3; }
body.ambient-live { background: transparent; }
html[data-motion='off'] .ambient-gl { display: none; }
@media (prefers-reduced-motion: reduce) { .ambient-gl { display: none; } }

/* ── отсек просмотра: плеер и серии рядом ── */
.watch-bay { scroll-margin-top: calc(var(--header-h) + 12px); }
.bay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.watch-bay.eps-open .bay.has-eps { grid-template-columns: minmax(0, 1fr) 358px; }
.bay-main { min-width: 0; display: grid; gap: 10px; }
.watch-player { min-width: 0; }

.watch-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.watch-bar .row { display: flex; gap: 8px; flex-wrap: wrap; }
.watch-now { display: grid; min-width: 0; gap: 2px; }
.watch-now b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-now span { color: var(--muted); font-size: 12.5px; }

.eps-dock {
  display: none; flex-direction: column; min-height: 0;
  max-height: min(74vh, 760px);
  border-radius: var(--r-l); border: 1px solid var(--line);
  background: var(--surface); backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft); overflow: hidden;
}
.watch-bay.eps-open .eps-dock { display: flex; animation: fade-in 0.24s var(--ease) both; }
.eps-head { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line-soft); }
.eps-count { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.eps-x {
  width: 30px; height: 30px; display: grid; place-items: center; --isz: 16px;
  border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; transition: color var(--fast), background var(--fast);
}
.eps-x:hover { color: var(--text); background: var(--surface-2); }

.season-wrap { position: relative; }
.eps-season {
  display: inline-flex; align-items: center; gap: 6px; --isz: 15px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
.eps-season i { transform: rotate(90deg); transition: transform var(--fast); }
.season-wrap.open .eps-season i { transform: rotate(-90deg); }
.season-wrap .season-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 12;
  display: none; min-width: 190px; max-height: 280px; overflow: auto;
}
.season-wrap.open .season-menu { display: grid; animation: rise 0.16s var(--ease) both; }
.season-menu .pop-item em { margin-left: auto; font-style: normal; color: var(--dim); font-size: 11.5px; }

.eps-list { overflow-y: auto; overscroll-behavior: contain; padding: 8px; display: grid; gap: 4px; align-content: start; }
.eps-list .hint { padding: 14px; }
.ep-row {
  display: grid; grid-template-columns: 24px 112px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 6px; border-radius: 12px; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: inherit; font: inherit;
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}
.ep-row:hover { background: var(--surface-2); border-color: var(--line-soft); }
.ep-row:active { transform: scale(0.99); }
.ep-row.current { background: var(--tint-faint, var(--surface-2)); border-color: var(--tint-line, var(--line)); }
.ep-row.loading { grid-template-columns: 112px minmax(0, 1fr); cursor: default; }
.ep-num { font-style: normal; text-align: center; font-size: 13px; color: var(--dim); }
.ep-row.current .ep-num { color: var(--tint, var(--accent)); font-weight: 700; }
.ep-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-blank { height: 100%; display: grid; place-items: center; color: var(--dim); --isz: 18px; }
.ep-thumb em {
  position: absolute; right: 4px; bottom: 4px; font-style: normal; font-size: 10.5px;
  padding: 1px 5px; border-radius: 6px; background: rgba(3, 7, 20, 0.76); color: #fff;
}
.ep-play {
  position: absolute; inset: 0; display: grid; place-items: center; --isz: 22px;
  color: #fff; background: rgba(3, 7, 20, 0.42); opacity: 0; transition: opacity var(--fast);
}
.ep-row:hover .ep-play, .ep-row.current .ep-play { opacity: 1; }
.ep-text { min-width: 0; display: grid; gap: 2px; }
.ep-text b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-text span {
  font-size: 12px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.eps-hide {
  display: flex; align-items: center; justify-content: center; gap: 6px; --isz: 15px;
  padding: 10px; border: 0; border-top: 1px solid var(--line-soft);
  background: var(--surface-2); color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer;
}
.eps-hide:hover { color: var(--text); }
.eps-hide i { transform: rotate(-90deg); }

@media (max-width: 1100px) {
  .watch-bay.eps-open .bay.has-eps { grid-template-columns: minmax(0, 1fr) 300px; }
  .ep-row { grid-template-columns: 22px 92px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .watch-bay.eps-open .bay.has-eps { grid-template-columns: minmax(0, 1fr); }
  .watch-bay.eps-open .eps-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    max-height: 68vh; border-radius: var(--r-l) var(--r-l) 0 0;
    border-bottom: 0; box-shadow: 0 -24px 60px rgba(3, 7, 20, 0.66);
    animation: rise 0.24s var(--ease) both;
  }
  .eps-hide { position: sticky; bottom: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* ── комната: кто на какой минуте ── */
.crowd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.crowd-one { display: grid; justify-items: center; gap: 3px; transition: opacity var(--fast); }
.crowd-one.away { opacity: 0.42; }
.crowd-one .ava {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #06070d; border: 2px solid transparent;
}
.crowd-one.playing .ava { border-color: var(--ok); }
.crowd-at {
  font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 999px;
  background: rgba(3, 7, 20, 0.6); border: 1px solid var(--line); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.crowd-at.drift { color: var(--warn); border-color: rgba(232, 176, 106, 0.42); }
.who b .at { font-style: normal; font-weight: 500; margin-left: 6px; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.sync-btn svg { transition: transform 0.5s var(--ease); }
.sync-btn:active svg { transform: rotate(180deg); }

/* ── события в чате ── */
.msg.sys {
  display: flex; align-items: center; gap: 8px; margin: 3px 0;
  padding: 6px 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line-soft);
  color: var(--muted); font-size: 12.5px;
}
.msg.sys .sys-ic { --isz: 14px; display: grid; place-items: center; color: var(--dim); flex: none; }
.msg.sys span { min-width: 0; }
.msg.sys time { margin-left: auto; font-size: 11px; color: var(--dim); flex: none; }
.msg.sys.play .sys-ic, .msg.sys.join .sys-ic { color: var(--ok); }
.msg.sys.pause .sys-ic { color: var(--warn); }
.msg.sys.seek .sys-ic, .msg.sys.sync .sys-ic { color: var(--accent-2); }
.msg.sys.source .sys-ic { color: var(--accent); }
.msg.sys.leave .sys-ic { color: var(--err); }

/* ── лайк и избранное: красное сердце, желтая звезда — везде одинаково ── */
.btn.mark.like.on { color: var(--like); border-color: rgba(255, 90, 110, 0.45); background: rgba(255, 90, 110, 0.12); }
.btn.mark.fav.on { color: var(--fav); border-color: rgba(255, 194, 71, 0.45); background: rgba(255, 194, 71, 0.12); }
.btn.mark.on svg { fill: currentColor; animation: pop-mark 0.4s var(--ease); }
.marks-group.like h4 .dot { color: var(--like); }
.marks-group.fav h4 .dot { color: var(--fav); }
.marks-group.like h4 .dot svg, .marks-group.fav h4 .dot svg { fill: currentColor; }
.card-save.on { color: var(--fav); }
.card-save.on svg { fill: currentColor; }

/* ════════════════════ СЛОЙ 9 — синхрон чужих плееров и жизнь комнаты ════════════════════ */

/* ── полоска состояния чужого плеера ── */
.player .embed-bar {
  position: absolute; left: 14px; bottom: 74px; z-index: 8;
  display: none; align-items: center; gap: 10px;
  max-width: min(520px, calc(100% - 200px));
  padding: 8px 14px; border-radius: 999px;
  background: rgba(7, 11, 24, 0.86); border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  font-size: 12.5px; color: var(--muted);
  animation: rise 0.24s var(--ease) both;
}
.player .embed-bar.show { display: flex; }
.player .embed-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .embed-bar b { color: var(--accent-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.player .embed-bar.ok { border-color: rgba(98, 208, 160, 0.42); color: var(--ok); }
.player .embed-bar.warn { border-color: rgba(232, 176, 106, 0.42); color: var(--warn); }
.player.idle .embed-bar { opacity: 0; transition: opacity var(--slow); }

/* у мостового эмбеда своя панель управления поверх чужого кадра */
.player.external.bridged .controls { display: block; }
.player.external.bridged .timeline { cursor: pointer; }
.player.external.bridged .sync-pill b { color: var(--ok); }
.player.external:not(.bridged) .embed-bar { bottom: 18px; }

/* ── боковая панель: четыре вкладки вместо трех ── */
.room-tabs button { padding: 9px 4px; font-size: 12.5px; }
.pane-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 16px 0 10px;
}
.pane-head:first-child { margin-top: 4px; }
.pane-head h4 { margin: 0; font-size: 13px; letter-spacing: 0.2px; text-transform: uppercase; color: var(--dim); }
.pane-head .btn.sm { padding: 5px 10px; font-size: 12px; }

/* ── «Сейчас в комнате» ── */
.watch-pane { display: none; }
.watch-pane.active { display: block; }
.room-now {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line-soft);
}
.room-now .hint { margin: 0; }
.now-poster {
  width: 62px; height: 92px; flex: 0 0 auto;
  border-radius: 10px; object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.now-poster.blank { display: grid; place-items: center; color: var(--dim); }
.now-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.now-meta em { font-size: 10.5px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--dim); font-style: normal; }
.now-meta b { font-size: 15px; line-height: 1.25; }
.now-meta > span { font-size: 12.5px; color: var(--muted); }
.now-meta .row { margin-top: 6px; gap: 6px; flex-wrap: wrap; }

/* ── поиск внутри комнаты ── */
.field.wsearch { width: 100%; margin-bottom: 10px; }
.field.mini { width: 78px; padding: 7px 10px; }
.wres { display: flex; flex-direction: column; gap: 6px; }
.wres-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px; border-radius: 12px; text-align: left;
  background: transparent; border: 1px solid transparent; color: inherit;
  cursor: pointer; transition: background var(--fast), border-color var(--fast);
}
.wres-row:hover { background: var(--surface); border-color: var(--line-soft); }
.wres-row img, .wres-row .blank {
  width: 40px; height: 58px; flex: 0 0 auto; border-radius: 8px;
  object-fit: cover; background: var(--surface-2);
  display: grid; place-items: center; color: var(--dim);
}
.wres-row span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wres-row b { font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wres-row em { font-size: 11.5px; color: var(--dim); font-style: normal; }

/* ── карточка выбора серии и источника ── */
.pick {
  padding: 12px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line);
  animation: rise 0.22s var(--ease) both;
}
.pick-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.pick-head img, .pick-head .blank {
  width: 44px; height: 64px; border-radius: 8px; object-fit: cover;
  background: var(--surface-2); display: grid; place-items: center; color: var(--dim);
}
.pick-head b { display: block; font-size: 14.5px; line-height: 1.25; }
.pick-head span { font-size: 12px; color: var(--dim); }
.pick-eps { display: flex; gap: 10px; margin-bottom: 10px; }
.pick-eps label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--dim); }
.pick-src { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; max-height: 210px; overflow: auto; }
.pick-src .hint { margin: 4px 0; }
.src-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 10px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: inherit;
  cursor: pointer; transition: border-color var(--fast), transform var(--fast);
}
.src-row:hover { border-color: var(--accent); transform: translateX(2px); }
.src-row i { color: var(--accent-2); display: grid; place-items: center; }
.src-row span { min-width: 0; display: flex; flex-direction: column; }
.src-row b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-row em { font-size: 11px; color: var(--dim); font-style: normal; }
.pick .field { width: 100%; }
.pick .row { margin-top: 10px; gap: 8px; }

/* ── история комнаты ── */
.hist { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.hist .hint { margin: 4px 0; }
.hist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px; border-radius: 12px;
  border: 1px solid transparent;
  transition: background var(--fast), border-color var(--fast);
}
.hist-row:hover { background: var(--surface); border-color: var(--line-soft); }
.hist-row img, .hist-row .blank {
  width: 34px; height: 50px; flex: 0 0 auto; border-radius: 7px;
  object-fit: cover; background: var(--surface-2);
  display: grid; place-items: center; color: var(--dim);
}
.hist-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hist-meta b { font-size: 13px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-meta span { font-size: 11px; color: var(--dim); }
.hist-row .btn { flex: 0 0 auto; opacity: 0; transition: opacity var(--fast); }
.hist-row:hover .btn { opacity: 1; }

@media (max-width: 1100px) {
  .hist-row .btn { opacity: 1; }
  .player .embed-bar { max-width: calc(100% - 28px); }
}
@media (max-width: 720px) {
  .room-tabs button { padding: 8px 2px; font-size: 12px; }
  .player .embed-bar { left: 10px; bottom: 66px; font-size: 11.5px; padding: 6px 11px; }
  .now-poster { width: 52px; height: 78px; }
}

/* ═══════════ СЛОЙ 10 — страница тайтла ═══════════ */
.tpage { position: relative; padding-top: calc(var(--header-h) + 26px); }

.tpage-bg { position: absolute; inset: 0 0 auto; height: 620px; overflow: hidden; z-index: 0; pointer-events: none; }
.tpage-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.42; filter: saturate(1.05); }
.tpage-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 460px at 18% -8%, var(--tint-soft, rgba(108, 140, 255, 0.34)), transparent 68%),
    linear-gradient(180deg, rgba(4, 7, 16, 0.42) 0%, rgba(4, 7, 16, 0.72) 46%, var(--bg) 96%);
}

.tp-top, .tp-body { position: relative; z-index: 1; }

.tp-crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); margin-bottom: 18px; flex-wrap: wrap; }
.tp-crumbs a { color: var(--muted); text-decoration: none; transition: color var(--fast) var(--ease); }
.tp-crumbs a:hover { color: var(--text); }
.tp-crumbs .ic { --isz: 13px; opacity: 0.5; }
.tp-crumbs span { color: var(--text); }

.tp-hero { display: grid; grid-template-columns: 292px minmax(0, 1fr) 288px; gap: 30px; align-items: start; }

.tp-poster {
  position: relative; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 2 / 3;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  box-shadow: 0 34px 90px -36px var(--tint-soft, rgba(0, 0, 0, 0.75));
}
.tp-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-play {
  position: absolute; inset: auto 0 0; height: 62px; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(4, 7, 16, 0.86));
  opacity: 0; transition: opacity var(--fast) var(--ease);
}
.tp-poster:hover .tp-play { opacity: 1; }
.tp-play .ic { --isz: 30px; }

.tp-main { min-width: 0; }
.tp-title { font-size: clamp(28px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -1.4px; margin: 0 0 8px; }
.tp-orig { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.tp-tagline { color: var(--accent-3); font-size: 14px; font-style: italic; margin-bottom: 12px; }

.tp-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip.ghost {
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; color: var(--muted);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-soft);
}
.chip.ghost.age { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

.tp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

.tp-desc {
  color: #c8d2e8; line-height: 1.68; font-size: 15px; max-width: 820px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.tp-desc.open { -webkit-line-clamp: unset; display: block; }

.tp-more {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: none; border: 0; color: var(--accent-2); font: inherit; font-size: 13.5px; padding: 4px 0;
}
.tp-more .ic { --isz: 15px; transform: rotate(90deg); transition: transform var(--fast) var(--ease); }
.tp-more.open .ic { transform: rotate(-90deg); }
.tp-more:hover { color: var(--text); }
.tp-more.sm { font-size: 12.5px; margin-top: 8px; }

/* ── карточка рейтингов ── */
.tp-score { padding: 20px; display: grid; gap: 12px; align-content: start; }
.score-main { display: flex; align-items: center; gap: 14px; }
.score-main b { font-size: 40px; line-height: 1; letter-spacing: -2px; color: var(--text); }
.score-main span { display: block; font-size: 13px; color: var(--text); font-weight: 600; }
.score-main em { display: block; font-style: normal; font-size: 12px; color: var(--dim); margin-top: 2px; }
.score-bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--tint, var(--accent)), var(--accent-2)); transition: width var(--slow) var(--ease); }
.score-note { font-size: 12.5px; color: var(--muted); }
.score-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.score-row span { color: var(--dim); }
.score-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent-2); text-decoration: none; }
.score-link .ic { --isz: 14px; }

/* ── вкладки ── */
.tp-body { margin-top: 34px; padding-bottom: 60px; }
.tp-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line-soft); margin-bottom: 22px;
}
.tp-tabs::-webkit-scrollbar { display: none; }
.tp-tab {
  position: relative; flex: 0 0 auto; padding: 12px 16px; cursor: pointer;
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500;
  transition: color var(--fast) var(--ease);
}
.tp-tab::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--tint, var(--accent)); transform: scaleX(0); transition: transform var(--fast) var(--ease);
}
.tp-tab:hover { color: var(--text); }
.tp-tab.active { color: var(--text); }
.tp-tab.active::after { transform: scaleX(1); }

.tp-pane { display: none; }
.tp-pane.active { display: block; animation: fade-in 0.28s var(--ease) both; }

.tp-about { display: grid; gap: 18px; }
.tp-block { padding: 20px 22px; }
.tp-block h3 { margin: 0 0 16px; font-size: 15px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h3 { margin: 0; }
.block-nav { display: flex; gap: 6px; }

/* ── характеристики ── */
.spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 26px; }
.spec-row {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft); font-size: 13.5px;
}
.spec-row span { color: var(--dim); flex: 0 0 auto; }
.spec-row b { font-weight: 500; color: var(--text); text-align: right; margin-left: auto; }
.spec-more { display: none; }
.spec-more.open { display: grid; animation: fade-in 0.24s var(--ease) both; }

/* ── актеры ── */
.tp-cast { display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 6px; }
.tp-cast::-webkit-scrollbar { display: none; }
.cast-card { width: 116px; flex: 0 0 auto; text-align: center; }
.cast-card img, .cast-blank {
  width: 116px; height: 116px; border-radius: 50%; object-fit: cover;
  background: var(--surface-2); margin-bottom: 9px; display: grid; place-items: center;
  font-size: 30px; color: var(--dim); border: 1px solid var(--line-soft);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.cast-card:hover img { transform: translateY(-3px); box-shadow: 0 14px 30px -12px var(--tint-soft, rgba(0, 0, 0, 0.7)); }
.cast-card b { display: block; font-size: 12.5px; line-height: 1.35; }
.cast-card span { display: block; font-size: 11.5px; color: var(--dim); margin-top: 3px; }
.cast-nav {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--muted);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.cast-nav:hover { background: var(--surface); color: var(--text); }
.cast-nav .ic { --isz: 16px; }
.block-nav .cast-nav:first-child .ic { transform: none; }

/* ── кадры ── */
.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.frame {
  padding: 0; border: 1px solid var(--line-soft); border-radius: var(--r-m); overflow: hidden;
  cursor: pointer; background: var(--surface-2); aspect-ratio: 16 / 9;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px var(--tint-soft, rgba(0, 0, 0, 0.75)); }

/* ── отзывы ── */
.reviews { display: grid; gap: 14px; }
.review { padding: 18px 20px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line-soft); }
.rev-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rev-head img, .rev-ava {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--tint, var(--accent)), var(--accent-2));
}
.rev-head b { display: block; font-size: 14px; }
.rev-head span { display: block; font-size: 12px; color: var(--dim); }
.rev-head .badge.rate { margin-left: auto; }
.rev-text {
  color: #c3cee6; font-size: 14px; line-height: 1.66; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.rev-text.open { -webkit-line-clamp: unset; display: block; }

/* ── видео ── */
.tp-video {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-l); overflow: hidden;
  background: #05070f; border: 1px solid var(--line-soft); box-shadow: var(--shadow-soft);
}
.tp-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.video-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; cursor: pointer;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-soft);
  color: var(--muted); font: inherit; font-size: 12.5px;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.video-chip .ic { --isz: 14px; }
.video-chip:hover { color: var(--text); }
.video-chip.on { color: var(--text); border-color: var(--tint, var(--accent)); background: var(--tint-faint, rgba(108, 140, 255, 0.16)); }

/* ── факты ── */
.fact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.fact { padding: 16px 18px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line-soft); }
.fact span { display: block; font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.fact b { font-size: 18px; letter-spacing: -0.4px; }
.kw { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── окно выбора источника ── */
.src-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

/* ── адаптация ── */
@media (max-width: 1180px) {
  .tp-hero { grid-template-columns: 232px minmax(0, 1fr); }
  .tp-score { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .tpage { padding-top: calc(var(--header-h) + 14px); }
  .tpage-bg { height: 420px; }
  .tp-hero { grid-template-columns: 140px minmax(0, 1fr); gap: 16px; }
  .tp-title { font-size: 24px; letter-spacing: -0.8px; }
  .tp-actions { gap: 8px; }
  .tp-actions .btn { flex: 1 1 auto; justify-content: center; }
  .tp-actions .list-wrap { flex: 1 1 100%; }
  .tp-actions .list-wrap .btn { width: 100%; }
  .tp-play { opacity: 1; height: 46px; }
  .tp-block { padding: 16px; }
  .spec-row { font-size: 13px; }
  .cast-card, .cast-card img, .cast-blank { width: 92px; }
  .cast-card img, .cast-blank { height: 92px; }
  .frames { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .tp-tab { padding: 11px 12px; font-size: 13px; }
}
