/* ПАЛИТРА */

:root {
  --bg: #080808;
  --panel: #121212;
  --ink: #f5f5f5;
  --mute: #a2a2a2;
  --accent: #ededed;
  --line: rgba(255,255,255,.12);
  --a3: #ededed;
  --display: 'Unbounded','Arial Black',sans-serif;
}

/* ОБЩИЕ СТИЛИ */

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 'Golos Text','Segoe UI',sans-serif;
}

body.menu-open { overflow: hidden; }

button,input {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,a,input {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

::selection {
  background: #dedede;
  color: #080808;
}

h1,h2,h3,p { margin: 0; }
h1,h2,h3 { line-height: 1.2; }
.muted { color: var(--mute); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ШАПКА */

.top-header {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  padding: 26px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg,#262626b3,#101010b3);
  backdrop-filter: blur(16px);
  transition: border-color .2s,background .2s;
  font-size: 28px;
}

.icon-btn:hover {
  border-color: #777;
  background: #242424;
}

.icon-btn svg,.nav-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-btn { border-radius: 50%; }

.header-caption {
  color: #999;
  font-size: 9px;
  letter-spacing: 3px;
}

.wordmark {
  font: 900 25px/1 var(--display);
  letter-spacing: -1.5px;
}

/* ВЫЕЗЖАЮЩЕЕ МЕНЮ */

dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(10px);
}

.navigation-dialog {
  position: fixed;
  inset: 0 auto 0 0;
  margin: 0;
  width: min(330px,88vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 28px 20px;
  color: var(--ink);
  border: 0;
  border-right: 1px solid #ffffff24;
  border-radius: 0 24px 24px 0;
  background: linear-gradient(150deg,#1b1b1b,#0b0b0b 65%);
  box-shadow: 30px 0 100px #0008;
}

.navigation-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: drawer-in .28s ease-out;
}

@keyframes drawer-in {
  from { transform: translateX(-100%); opacity: .4; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.drawer-header .icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
}

.drawer-caption {
  margin: 36px 12px 18px;
  color: #929292;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.nav-menu {
  display: grid;
  gap: 8px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #a9a9a9;
  transition: background .2s,color .2s;
}

.nav-item:hover {
  background: #ffffff08;
  color: #fff;
}

.nav-item.active {
  color: #fff;
  border-color: #ffffff24;
  background: linear-gradient(100deg,#ffffff19,#ffffff04);
}

.nav-item.active::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  margin-left: auto;
  box-shadow: 0 0 12px #ffffff66;
}

.drawer-footer {
  margin-top: auto;
  padding: 40px 12px 4px;
  color: #999;
  font-size: 14px;
}

.drawer-footer span { color: #eee; }

/* ГЛАВНЫЙ ЭКРАН */

.main-content {
  max-width: 1320px;
  margin: auto;
  padding: 0 40px;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.hero-screen {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: 142px 0 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-beam {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px,100vw);
  height: 100%;
  pointer-events: none;
  background: linear-gradient(180deg,#ffffff10,#ffffff04 48%,transparent 90%);
  clip-path: polygon(46% 0,54% 0,100% 100%,0 100%);
  mask-image: linear-gradient(#000,transparent 95%);
}

.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  border: 1px solid #ffffff20;
  border-radius: 30px;
  background: #ffffff04;
  color: #bcbcbc;
  font-size: 12px;
  margin-bottom: 32px;
}

.badge span {
  width: 6px;
  height: 6px;
  background: #e8e8e8;
  border-radius: 50%;
  box-shadow: 0 0 12px #ffffff66;
}

.huge-logo {
  position: relative;
  font: 900 clamp(82px,15vw,200px)/1.08 var(--display);
  letter-spacing: -.065em;
  margin: 0 0 27px;
  padding-right: .065em;
}

.huge-logo span {
  position: relative;
  display: block;
  z-index: 1;
  background: linear-gradient(180deg,#fff 12%,#e4e4e4 45%,#939393 75%,#555 100%);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 14px 35px #0008);
}

.huge-logo::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  padding-right: .065em;
  color: transparent;
  -webkit-text-stroke: 1px #ffffff12;
  transform: scale(1.13,1.12);
  pointer-events: none;
}

.hero-title {
  font: 700 clamp(23px,3.5vw,43px)/1.3 var(--display);
  letter-spacing: -.04em;
  text-wrap: balance;
}

.hero-title span { color: #b8b8b8; }

.lead {
  max-width: 620px;
  margin: 20px 0 34px;
  color: #a7a7a7;
  font-size: clamp(14px,1.5vw,17px);
  line-height: 1.8;
}

/* СОЗДАНИЕ КОМНАТЫ */

.composer {
  width: 100%;
  max-width: 820px;
  padding: 10px;
  border: 1px solid #ffffff21;
  border-radius: 25px;
  background: linear-gradient(140deg,#202020c9,#0b0b0be6);
  box-shadow: 0 24px 70px #0006,inset 0 1px #ffffff0c;
}

.composer-main { display: flex; gap: 10px; }
.composer-main .field { flex: 1; }
.composer-main .btn { flex: 0 0 auto; }

.composer-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.composer-bottom .field { flex: 1; }

.field {
  width: 100%;
  min-height: 52px;
  padding: 15px 18px;
  border: 1px solid #ffffff12;
  border-radius: 14px;
  background: #090909b3;
  color: #f5f5f5;
  outline: none;
  transition: border-color .2s,box-shadow .2s;
}

.field::placeholder { color: #969696; }

.field:focus {
  border-color: #ffffff6b;
  box-shadow: 0 0 0 3px #ffffff08;
}

.field-small {
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 11px;
  font-size: 13px;
}

.btn {
  min-height: 54px;
  padding: 15px 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid #fff9;
  border-radius: 14px;
  background: linear-gradient(125deg,#fff,#d2d2d2);
  color: #111;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 5px 20px #ffffff08;
  transition: filter .2s,transform .2s;
}

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }
.btn span { font-size: 11px; }

.sources {
  display: flex;
  gap: 6px;
  padding-right: 3px;
}

.sources span {
  padding: 5px 10px;
  border: 1px solid #ffffff16;
  border-radius: 20px;
  color: #b7b7b7;
  font-size: 11px;
}

.hero-note {
  margin-top: 16px;
  font-size: 11px;
  color: #929292;
}

.scroll-link {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 42px;
  font-size: 11px;
  color: #929292;
}

.scroll-link:hover { color: #fff; }
.scroll-link span { font-size: 18px; }

/* НИЖНЯЯ ЧАСТЬ ГЛАВНОЙ */

.eyebrow {
  color: #999;
  font-size: 9px;
  letter-spacing: 2px;
}

.join-strip {
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 25px;
}

.join-strip h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.join-strip p { font-size: 14px; }

.join-row {
  display: flex;
  gap: 12px;
}

.code-field {
  width: 165px;
  font-family: monospace;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.btn-ghost {
  background: linear-gradient(140deg,#292929,#171717);
  border-color: #ffffff24;
  color: #f4f4f4;
  box-shadow: none;
}

.how { padding: 70px 0 50px; }

.section-heading h2 {
  margin-top: 14px;
  font-size: 32px;
  letter-spacing: -1px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 45px;
  margin-top: 42px;
}

.steps article > span {
  color: #ddd;
  font: 12px monospace;
}

.steps h3 {
  font-size: 19px;
  margin: 20px 0 12px;
}

.steps p {
  color: var(--mute);
  font-size: 14px;
  line-height: 1.8;
  max-width: 320px;
}

.faq {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.faq summary {
  cursor: pointer;
  color: #d2d2d2;
}

.faq p {
  margin-top: 15px;
  color: var(--mute);
  line-height: 1.8;
  max-width: 900px;
}

footer {
  max-width: 1240px;
  margin: 55px auto 0;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #999;
  font-size: 11px;
}

footer .wordmark {
  color: #d8d8d8;
  font-size: 20px;
}

/* КАТАЛОГ */

.catalog-header { padding: 142px 0 34px; }

.catalog-header h1 {
  margin: 18px 0;
  font: 700 clamp(28px,4vw,46px)/1.3 var(--display);
  letter-spacing: -1.5px;
}

.catalog-header p { font-size: 14px; }

.search {
  max-width: 430px;
  margin-top: 24px;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 24px;
}

.movie-card {
  min-width: 0;
  cursor: pointer;
  border-radius: 16px;
  border: 1px solid #ffffff10;
  background: #141414;
  overflow: hidden;
  transition: transform .2s,border-color .2s;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: #ffffff40;
}

.movie-poster {
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: #222;
}

.movie-poster[src$="/img/poster.svg"] {
  filter: grayscale(1);
}

.movie-info { padding: 15px; }

.movie-title {
  font-size: 14px;
  font-weight: 600;
}

.movie-meta {
  margin-top: 5px;
  font-size: 12px;
  color: #999;
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid #ffffff30;
  border-radius: 50%;
  background: #111b;
  backdrop-filter: blur(8px);
  color: #fff;
}

.fav-btn svg {
  width: 19px;
  height: 19px;
}

.fav-btn.active {
  background: #eee;
  color: #111;
}

.fav-btn.active svg { fill: currentColor; }

/* НЕДАВНИЕ КОМНАТЫ */

.recent-list {
  display: grid;
  gap: 12px;
}

.recent-room {
  padding: 22px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(130deg,#1b1b1b,#101010);
  overflow-wrap: anywhere;
}

.recent-room:hover { border-color: #777; }

/* ОШИБКИ */

.error:empty { display: none; }

.error {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid #aaa;
  border-left: 3px solid #fff;
  border-radius: 12px;
  background: #222;
  color: #fff;
}

/* ВХОД И РЕГИСТРАЦИЯ */

[hidden] { display: none !important; }

.account-dialog {
  width: min(460px,calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid #ffffff26;
  border-radius: 26px;
  background: linear-gradient(140deg,#202020,#101010);
  color: var(--ink);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.modal-header h2 {
  font: 500 21px/1.4 var(--display);
  letter-spacing: -.7px;
}

.close-btn {
  font-size: 28px;
  width: 32px;
  height: 36px;
  flex: none;
  color: #aaa;
}

.close-btn:hover { color: #fff; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  margin-bottom: 24px;
  background: #090909;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.auth-tab {
  padding: 10px 8px;
  border-radius: 9px;
  font-size: 13px;
  color: #aaa;
}

.auth-tab.active {
  background: linear-gradient(140deg,#383838,#242424);
  color: #fff;
  box-shadow: inset 0 1px #ffffff16;
}

.auth-field { margin-bottom: 16px; }

.auth-field label {
  display: block;
  font-size: 12px;
  color: #bbb;
  margin-bottom: 8px;
}

.auth-field .field { min-height: 55px; }

.show-password {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #aaa;
  cursor: pointer;
  margin: 0 0 22px;
}

.show-password input {
  accent-color: #eee;
  width: 15px;
  height: 15px;
  margin: 0;
}

.account-dialog .btn { width: 100%; }

.auth-status:empty { display: none; }

.auth-status {
  padding: 13px;
  border: 1px solid #ffffff30;
  border-radius: 12px;
  margin-bottom: 18px;
  background: #ffffff08;
  color: #eee;
  font-size: 13px;
}

.auth-note {
  margin-top: 18px;
  color: #999;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.guest-btn {
  display: block;
  margin: 16px auto 0;
  padding: 6px;
  color: #c5c5c5;
  font-size: 12px;
}

.guest-btn:hover { color: #fff; }

/* КОМНАТА ПРОСМОТРА */

.room-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
}

.ghost-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
}

.ghost-btn:hover { color: #fff; }
.room-title-wrap { min-width: 0; }

.room-title {
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50vw;
}

.room-code {
  color: var(--mute);
  font-size: 12px;
}

.connection-status {
  padding: 12px 32px;
  color: #bcbcbc;
  font-size: 12px;
}

.room-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 330px;
  gap: 24px;
  padding: 8px 32px 32px;
  max-width: 1800px;
  margin: auto;
}

.video-section { min-width: 0; }

.player-wrap {
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.player-wrap iframe,.player-wrap video,#yt {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.notice {
  font-size: 13px;
  color: var(--mute);
  margin: 15px 0;
  min-height: 20px;
}

.bar { display: flex; gap: 12px; }
.bar .field { flex: 1; }

/* ЧАТ */

.side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 400px;
  max-height: 75vh;
  background: linear-gradient(150deg,#191919,#101010);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.side-header h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.users-label {
  display: block;
  font-size: 12px;
  color: var(--mute);
  overflow-wrap: anywhere;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.messages {
  flex: 1;
  overflow: auto;
  padding: 18px 0;
  min-height: 180px;
}

.message {
  font-size: 14px;
  background: #242424;
  border-radius: 5px 14px 14px 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.message b {
  display: block;
  color: #eee;
  font-size: 11px;
  margin-bottom: 5px;
}

.message.system {
  background: none;
  color: var(--mute);
  font-size: 11px;
  text-align: center;
}

.chat-form {
  display: flex;
  gap: 8px;
}

.chat-form .field {
  flex: 1;
  font-size: 13px;
  padding: 10px;
}

.send-btn {
  background: linear-gradient(130deg,#fff,#c6c6c6);
  border-radius: 12px;
  width: 44px;
  flex: none;
}

.send-btn svg { stroke: #111; }

/* РЕЖИМ КИНО */

.cinema .room-layout { grid-template-columns: 1fr; }
.cinema .side,.cinema .bar { display: none; }
.cinema .player-wrap { max-height: 78vh; }
.removed { display: none; }

/* АДАПТИВ */

@media (min-width: 761px) and (max-width: 1320px) {
  footer {
    margin-left: 40px;
    margin-right: 40px;
  }
}

@media (max-width: 1050px) {
  .movie-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 18px;
  }

  .room-layout {
    grid-template-columns: minmax(0,1fr) 280px;
  }

  .bar { flex-wrap: wrap; }
  .bar .field { flex-basis: 100%; }
}

@media (max-width: 760px) {
  .top-header { padding: 20px; }

  .icon-btn {
    width: 43px;
    height: 43px;
    border-radius: 13px;
  }

  .account-btn { border-radius: 50%; }

  .header-caption {
    font-size: 8px;
    letter-spacing: 1.8px;
  }

  .main-content { padding: 0 20px; }
  .hero-screen { padding: 115px 0 45px; }

  .huge-logo {
    font-size: clamp(72px,17vw,126px);
    margin-bottom: 22px;
  }

  .huge-logo::before { transform: scale(1.06,1.13); }

  .badge {
    font-size: 10px;
    margin-bottom: 32px;
  }

  .hero-title { font-size: clamp(20px,4.7vw,30px); }

  .lead {
    font-size: 14px;
    margin: 18px 0 26px;
  }

  .composer {
    padding: 9px;
    border-radius: 20px;
  }

  .composer-main { flex-direction: column; }

  .composer-main .field,.composer-main .btn {
    flex: auto;
    width: 100%;
  }

  .composer-bottom {
    flex-direction: column;
    gap: 12px;
  }

  .composer-bottom .field { flex: auto; }
  .sources { padding: 0 0 4px; }
  .hero-note { font-size: 10px; }
  .scroll-link { margin-top: 30px; }

  .join-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .join-row .field {
    width: 100%;
    flex: 1;
  }

  .join-row .btn {
    font-size: 12px;
    padding: 12px 15px;
  }

  .how { padding: 45px 0 30px; }
  .section-heading h2 { font-size: 28px; }

  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 30px;
  }

  .steps h3 { margin-top: 12px; }
  .steps p { max-width: none; }

  .account-dialog { padding: 24px; }
  .modal-header h2 { font-size: 18px; }

  .catalog-header { padding-top: 120px; }

  .movie-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
  }

  .movie-info { padding: 12px; }
  .movie-title { font-size: 12px; }

  footer {
    margin: 36px 20px 0;
    padding: 24px 0;
    flex-wrap: wrap;
  }

  footer > span:last-child { width: 100%; }

  .room-topbar {
    padding: 18px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .room-title {
    max-width: 70vw;
    font-size: 15px;
  }

  .room-title-wrap {
    order: 3;
    width: 100%;
    display: grid;
    justify-content: center;
  }

  .connection-status { padding: 12px 16px; }

  .room-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 24px;
    gap: 20px;
  }

  .side {
    height: 420px;
    max-height: none;
  }

  .bar { flex-wrap: nowrap; }
  .bar .field { flex-basis: auto; }

  .bar .btn {
    font-size: 12px;
    padding: 10px;
  }

  .player-wrap { border-radius: 10px; }
}

:root[data-echo-motion='off'],
:root[data-echo-motion='off'] *,
:root[data-echo-motion='off'] *::before,
:root[data-echo-motion='off'] *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  :root:not([data-echo-motion]),
  :root:not([data-echo-motion]) *,
  :root:not([data-echo-motion]) *::before,
  :root:not([data-echo-motion]) *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
/* Запрет выделения текста интерфейса. Поля остаются редактируемыми. */
body, body * {
  -webkit-user-select: none;
  user-select: none;
}
body input, body textarea, body [contenteditable="true"],
body [contenteditable="true"] * {
  -webkit-user-select: text;
  user-select: text;
}
