:root {
  --bg: #050505;
  --surface: #151515;
  --surface-2: #202020;
  --text: #f8f8f8;
  --muted: #9a9a9a;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #01b0ff;
  --green: #15b84a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  --tg-safe-area-inset-top: 0px;
  --tg-safe-area-inset-right: 0px;
  --tg-safe-area-inset-bottom: 0px;
  --tg-safe-area-inset-left: 0px;
  --tg-content-safe-area-inset-top: 0px;
  --tg-content-safe-area-inset-right: 0px;
  --tg-content-safe-area-inset-bottom: 0px;
  --tg-content-safe-area-inset-left: 0px;
  --tg-content-safe-area-top: 0px;
  --tg-content-safe-area-right: 0px;
  --tg-content-safe-area-bottom: 0px;
  --tg-content-safe-area-left: 0px;
  --tg-fullscreen-controls-top: 0px;
  --app-edge-padding: clamp(16px, 2vw, 32px);
  --catalog-card-width: clamp(170px, 9.2vw, 190px);
  color-scheme: dark;
  font-family: Inter, "Inter Fallback", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  height: auto;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  touch-action: auto;
  -webkit-overflow-scrolling: touch;
}

html.startup-splash-open,
html.startup-splash-open body {
  height: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
  scrollbar-gutter: auto;
}

.startup-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  opacity: 1;
  pointer-events: auto;
  touch-action: none;
  overscroll-behavior: contain;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.startup-splash-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  transform: translateY(-2vh);
}

.startup-splash-card img {
  width: clamp(70px, 10vw, 96px);
  height: clamp(70px, 10vw, 96px);
  display: block;
  animation: startupSplashSpin 2.8s linear infinite;
}

html.startup-splash-done .startup-splash {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@keyframes startupSplashSpin {
  to {
    transform: rotate(360deg);
  }
}

.pull-refresh {
  --pull-y: 0px;
  --pull-progress: 0;
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  z-index: 80;
  display: grid;
  place-items: center;
  min-width: 96px;
  height: 34px;
  border-radius: 17px;
  background: rgba(21, 21, 21, 0.86);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-46px + var(--pull-y)));
  transition:
    opacity 0.24s ease,
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.2s ease,
    background 0.2s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pull-refresh.pulling {
  transition: opacity 0.08s ease, color 0.16s ease, background 0.16s ease;
}

.pull-refresh.ready,
.pull-refresh.refreshing {
  color: var(--accent);
  background: rgba(21, 21, 21, 0.94);
}

.pull-refresh.refreshing span::after {
  content: "...";
}

html {
  height: auto;
  background: var(--bg);
  overscroll-behavior-y: auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  touch-action: auto;
  -webkit-overflow-scrolling: touch;
}

::-webkit-scrollbar {
  width: 6px;
  height: 0;
}

::-webkit-scrollbar:horizontal {
  display: none;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.shelf-row,
.nav-options,
.genre-options {
  scrollbar-width: none;
}


a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: max(22px, env(safe-area-inset-top)) var(--app-edge-padding) calc(34px + env(safe-area-inset-bottom));
  overflow-x: clip;
}

.app-shell:has(.player.is-watch-open) {
  position: relative;
  z-index: 2147483600;
}

html.player-overlay-open,
body.player-overlay-open {
  overflow: hidden;
}

body.player-overlay-open .desktop-rail,
body.player-overlay-open .bottom-nav,
body.player-overlay-open .profile-popover,
body.player-overlay-open .side-menu {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.watch-party-active .side-menu,
body.watch-party-active .side-menu-backdrop,
body.watch-party-theater .side-menu,
body.watch-party-theater .side-menu-backdrop,
body.watch-party-theater .desktop-rail-category .nav-options {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.player-overlay-open:not(.watch-party-theater) .topbar {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.topbar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 0;
}

.fatal-error {
  min-height: 70vh;
  display: grid;
  align-content: center;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
  color: var(--text);
}

.fatal-error h1 {
  margin: 0;
  font-size: 28px;
}

.fatal-error p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.fatal-error button {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #050505;
  cursor: pointer;
  font-weight: 700;
  padding: 12px 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand.is-spinning .brand-mark img,
.desktop-rail-brand.is-spinning img {
  animation: filmachLogoSpin 1.15s cubic-bezier(0.34, 0.02, 0.22, 1) both;
}

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

.mobile-title,
.bottom-nav,
.desktop-rail {
  display: none;
}

.desktop-rail-search-button {
  display: none;
}

.top-actions {
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}

.header-nav {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.nav-menu {
  position: relative;
  flex: 0 0 auto;
}

.nav-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0 9px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-pill svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.nav-pill.active,
.nav-pill[aria-expanded="true"] {
  background: var(--surface-2);
  color: #fff;
}

.nav-pill[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav-options,
.genre-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  width: min(360px, calc(100vw - 40px));
  max-height: 310px;
  display: grid;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 18, 18, 0.98);
  box-shadow: var(--shadow);
  padding: 8px;
}

.nav-options {
  width: 210px;
}

@media (min-width: 900px) {
  .nav-menu {
    position: relative;
  }

  .nav-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: auto;
    width: min(240px, calc(100vw - 40px));
    max-height: min(680px, calc(100vh - 110px));
    display: grid;
    align-items: stretch;
    overflow-x: hidden;
  }

  .nav-menu:nth-last-child(-n + 2) .nav-options {
    left: auto;
    right: 0;
  }

  .nav-options .nav-option {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@media (min-width: 900px) {
  .nav-options .nav-option {
    gap: 10px;
    padding: 0 14px;
  }
}

.nav-option,
.genre-option {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
}

.nav-option:hover,
.nav-option.active,
.genre-option:hover,
.genre-option.active {
  background: rgba(1, 176, 255, 0.12);
  color: var(--accent);
}

.nav-option-check {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(1, 176, 255, 0.18);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.nav-option-clear {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.catalog-picker {
  display: grid;
  gap: 10px;
}

.catalog-picker-tabs,
.catalog-picker-options {
  display: grid;
  gap: 4px;
}

.catalog-picker-options {
  position: relative;
}

.genre-option-list-move,
.genre-option-list-enter-active,
.genre-option-list-leave-active {
  transition:
    transform 180ms ease,
    opacity 120ms ease;
}

.genre-option-list-enter-from,
.genre-option-list-leave-to {
  opacity: 0;
}

.genre-option-list-leave-active {
  position: absolute;
  inset-inline: 0;
}

@media (prefers-reduced-motion: reduce) {
  .genre-option-list-move,
  .genre-option-list-enter-active,
  .genre-option-list-leave-active {
    transition: none;
  }
}

.catalog-picker-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.catalog-picker-tabs .nav-option {
  min-height: 44px;
  font-weight: 700;
}

.catalog-picker-tabs .nav-option.clearable {
  border-radius: 999px;
  background: rgba(1, 176, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(1, 176, 255, 0.32);
  color: #fff;
}

.catalog-picker-tabs .nav-option.clearable:hover,
.catalog-picker-tabs .nav-option.clearable:focus-visible {
  background: rgba(1, 176, 255, 0.32);
  box-shadow: inset 0 0 0 1px rgba(1, 176, 255, 0.5);
}

.catalog-picker-options .nav-option {
  font-weight: 650;
}

.round-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.round-button svg,
.back-link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.round-button.accent,
.round-button.active {
  color: var(--accent);
}

.profile-menu {
  position: relative;
  display: inline-grid;
}

.profile-menu::after {
  content: none;
}

.profile-button.has-avatar {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: transparent;
}

.profile-button-avatar,
.profile-popover-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.profile-button.has-avatar .profile-button-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.profile-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 95;
  width: min(320px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(24, 24, 24, 0.98);
  box-shadow: var(--shadow);
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.profile-popover:empty {
  display: none;
}

.profile-popover::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  width: 100%;
  height: 24px;
}

body.profile-popover-open .profile-popover:not(:empty),
body.profile-popover-open .profile-menu:hover .profile-popover:not(:empty),
body.profile-popover-open .profile-button:hover ~ .profile-popover:not(:empty),
body.profile-popover-open .profile-popover:not(:empty):hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-login-card {
  display: grid;
  gap: 9px;
  justify-items: stretch;
}

.profile-login-card.has-qr {
  gap: 10px;
}

.profile-popover-user {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 4px;
}

.profile-popover-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
}

.profile-popover-avatar.is-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.profile-popover-user strong {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-popover-login,
.profile-popover-row,
.profile-continue-card {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.profile-popover-login,
.profile-popover-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-weight: 700;
}

.profile-popover-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  min-height: 48px;
  padding: 0 14px;
  font-size: 15px;
}

.profile-popover-login.has-hint {
  display: grid;
  grid-template-columns: 22px minmax(0, auto);
  align-content: center;
  align-items: center;
  justify-content: center;
  justify-items: start;
  column-gap: 10px;
  row-gap: 2px;
}

.profile-popover-login:disabled {
  cursor: progress;
  opacity: 0.9;
}

.profile-popover-login svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
}

.profile-popover-login > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-popover-login.has-hint > span:first-child {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
}

.profile-popover-login > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-popover-login.has-hint > span:nth-child(2) {
  width: max-content;
  max-width: 100%;
  text-align: left;
}

.profile-popover-login small {
  min-width: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-popover-login.has-hint small {
  grid-column: 2;
  width: max-content;
  max-width: 100%;
  text-align: left;
}

.profile-popover-qr-toggle {
  width: max-content;
  justify-self: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  padding: 2px 6px;
  text-align: center;
}

.profile-popover-qr-toggle:hover {
  color: #36c4ff;
}

.profile-popover-qr-toggle:disabled {
  cursor: progress;
  opacity: 0.55;
}

.profile-login-status {
  min-height: 56px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  padding: 9px 10px;
}

.profile-login-status-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(21, 174, 239, 0.16);
  color: #36c4ff;
}

.profile-login-status-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.profile-login-status > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-login-status strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-login-status small {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-popover-qr {
  display: grid;
  gap: 7px;
  justify-items: center;
  text-align: center;
}

.profile-popover-qr-code {
  width: min(196px, 100%);
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.profile-popover-qr-code svg {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}

.profile-popover-qr-title {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.profile-popover-qr-caption {
  max-width: 300px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.profile-popover-telegram-link {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  background: #15aeef;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.profile-popover-telegram-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.profile-popover-telegram-link:hover {
  background: #32c2ff;
}

.telegram-qr-screen {
  position: fixed;
  inset: 0;
  z-index: 2147483602;
  display: grid;
  place-items: center;
  background: #000;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.telegram-qr-screen[hidden] {
  display: none;
}

html.telegram-qr-screen-open,
body.telegram-qr-screen-open {
  width: 100%;
  height: 100dvh;
  overflow: hidden !important;
  overscroll-behavior: none;
  scrollbar-gutter: auto;
}

body.telegram-qr-screen-open .app-shell {
  height: 100dvh;
  overflow: hidden !important;
}

.telegram-qr-screen-body {
  width: min(70vmin, 430px);
  max-width: calc(100dvw - 32px);
  max-height: calc(100dvh - 40px);
  display: grid;
  justify-items: center;
  filter: drop-shadow(0 22px 54px rgba(0, 0, 0, 0.52));
}

.telegram-qr-screen-code {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: clamp(12px, 2.4vmin, 18px);
  background: #fff;
  padding: 0;
  overflow: hidden;
}

.telegram-qr-screen-code svg {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

.telegram-qr-screen .telegram-qr-screen-close {
  position: fixed !important;
  top: max(16px, env(safe-area-inset-top)) !important;
  right: max(16px, env(safe-area-inset-right)) !important;
  z-index: 2147483604;
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  cursor: pointer;
  opacity: 0.92;
  transform: none !important;
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.18s ease;
}

.telegram-qr-screen .telegram-qr-screen-close:hover,
.telegram-qr-screen .telegram-qr-screen-close:focus-visible {
  background: rgba(1, 176, 255, 0.88);
  opacity: 1;
}

.telegram-qr-screen .telegram-qr-screen-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-popover-login:hover,
.profile-popover-row:hover,
.profile-continue-card:hover {
  background: rgba(255, 255, 255, 0.07);
}

.profile-popover-login:hover {
  background: #18baff;
}

.profile-popover-row.is-danger {
  color: #ff5b5b;
}

.profile-continue-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.profile-continue-card img,
.profile-continue-card > span:first-child {
  width: 42px;
  height: 58px;
  border-radius: 7px;
  object-fit: cover;
  background: #151515;
}

.profile-continue-card > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-continue-card strong,
.profile-continue-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-continue-card strong {
  font-size: 14px;
}

.profile-continue-card small {
  color: var(--muted);
  font-size: 12px;
}

.profile-continue-play {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
}

.profile-continue-play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.menu-button {
  display: none;
}

.search-form {
  position: absolute;
  inset: 0 108px 0 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 44px;
  box-sizing: border-box;
  width: 0;
  height: 44px;
  max-width: none;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-10px);
  transition: width 0.22s ease, opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.search-open .search-form {
  width: auto;
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
  transform: translateX(0);
}

@media (min-width: 900px) {
  :root {
    --desktop-rail-width: clamp(96px, 8.5vw, 118px);
    --desktop-catalog-panel-width: min(340px, calc(100vw - var(--desktop-rail-width) - 40px));
    --desktop-catalog-content-offset: calc(var(--desktop-catalog-panel-width) + 22px - var(--app-edge-padding));
  }

  .app-shell {
    padding-top: calc(max(18px, env(safe-area-inset-top)) + 96px);
    padding-left: calc(var(--desktop-rail-width) + var(--app-edge-padding));
  }

  .home-view {
    min-width: 0;
    transition: margin-left 0.22s ease;
  }

  .desktop-rail {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 55;
    width: var(--desktop-rail-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    border-right: 0;
    background: rgba(5, 5, 5, 0.86);
    padding: 0 12px calc(18px + env(safe-area-inset-bottom));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .desktop-rail-top {
    width: 100%;
    height: 110px;
    min-height: 110px;
    display: grid;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .desktop-rail-brand {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
  }

  .desktop-rail-brand img {
    width: 100%;
    height: 100%;
    display: block;
  }

  .desktop-rail-nav {
    width: 100%;
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 0 110px;
  }

  .desktop-rail-category {
    position: relative;
    width: 100%;
    display: grid;
    justify-items: center;
  }

  .desktop-rail-button {
    position: relative;
    min-width: 0;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
  }

  .desktop-rail-button svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .desktop-rail-new span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 24px;
    border: 2px solid currentColor;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
  }

  .desktop-rail-button:hover,
  .desktop-rail-button.active {
    color: #fff;
  }

  .desktop-rail-button:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .desktop-rail-search-button {
    display: none;
  }

  .desktop-rail-category .nav-options {
    position: fixed;
    top: 120px;
    bottom: 24px;
    right: auto;
    left: calc(var(--desktop-rail-width) + 14px);
    z-index: 82;
    width: var(--desktop-catalog-panel-width);
    max-height: none;
    align-content: start;
    overflow-y: auto;
    scrollbar-gutter: stable;
    border-radius: 0 18px 18px 0;
    padding: 16px;
    background: #121212;
    box-shadow: 18px 0 34px rgba(0, 0, 0, 0.32);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    transform-origin: left center;
    animation: railGenrePanelIn 0.18s ease both;
  }

  body:has(.desktop-rail-options:not([hidden])) {
    overflow-x: hidden;
  }

  body:has(.desktop-rail-options:not([hidden])) .home-view:not([hidden]) {
    margin-left: var(--desktop-catalog-content-offset);
  }

  .desktop-rail-category .nav-options::-webkit-scrollbar {
    width: 6px;
  }

  .desktop-rail-category .nav-options::-webkit-scrollbar-track {
    background: transparent;
  }

  .desktop-rail-category .nav-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
  }

  .desktop-rail-category .nav-option {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 46px;
  }

  .rail-catalog-section {
    display: grid;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 0 8px;
  }

  .rail-catalog-section + .rail-catalog-section {
    margin-top: 8px;
  }

  .rail-catalog-section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .rail-catalog-section summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    list-style: none;
    padding: 0 12px;
  }

  .rail-catalog-section summary::-webkit-details-marker {
    display: none;
  }

  .rail-catalog-section summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.72;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
  }

  .rail-catalog-section[open] summary {
    background: rgba(1, 176, 255, 0.12);
    color: var(--accent);
  }

  .rail-catalog-section[open] summary::after {
    transform: rotate(225deg);
  }

  .rail-catalog-section:not([open]) .nav-option {
    display: none;
  }

  .desktop-rail-button::after {
    content: attr(aria-label);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    z-index: 96;
    display: block;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(32, 32, 32, 0.98);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    padding: 11px 14px;
    pointer-events: none;
    transform: translate(8px, -50%);
    transition: opacity 0.14s ease, transform 0.14s ease;
    white-space: nowrap;
  }

  .desktop-rail-button:hover::after {
    opacity: 1;
    transform: translate(0, -50%);
  }

  .desktop-rail-button[aria-expanded="true"]::after,
  .desktop-rail-button[aria-expanded="true"]:hover::after {
    display: none;
  }

  body.search-open .desktop-rail-button::after,
  body.search-open .desktop-rail-button:hover::after {
    display: none;
  }

  button[data-tooltip-label],
  a[data-tooltip-label] {
    position: relative;
  }

  button[data-tooltip-label]::after,
  a[data-tooltip-label]::after {
    content: attr(data-tooltip-label);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    z-index: 96;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    background: rgba(32, 32, 32, 0.98);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    padding: 11px 14px;
    pointer-events: none;
    transform: translate(8px, -50%);
    transition: opacity 0.14s ease, transform 0.14s ease;
    white-space: nowrap;
  }

  button[data-tooltip-label]:hover::after,
  button[data-tooltip-label]:focus-visible::after,
  a[data-tooltip-label]:hover::after,
  a[data-tooltip-label]:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
  }

  button[data-tooltip-label].tooltip-left::after,
  a[data-tooltip-label].tooltip-left::after {
    right: calc(100% + 14px);
    left: auto;
    transform: translate(-8px, -50%);
  }

  button[data-tooltip-label].tooltip-left:hover::after,
  button[data-tooltip-label].tooltip-left:focus-visible::after,
  a[data-tooltip-label].tooltip-left:hover::after,
  a[data-tooltip-label].tooltip-left:focus-visible::after {
    transform: translate(0, -50%);
  }

  button[data-tooltip-placement="left"]::after,
  a[data-tooltip-placement="left"]::after {
    right: calc(100% + 14px);
    left: auto;
    top: 50%;
    bottom: auto;
    transform: translate(-8px, -50%);
  }

  button[data-tooltip-placement="left"]:hover::after,
  button[data-tooltip-placement="left"]:focus-visible::after,
  a[data-tooltip-placement="left"]:hover::after,
  a[data-tooltip-placement="left"]:focus-visible::after {
    transform: translate(0, -50%);
  }

  button[data-tooltip-placement="right"]::after,
  a[data-tooltip-placement="right"]::after {
    right: auto;
    left: calc(100% + 14px);
    top: 50%;
    bottom: auto;
    transform: translate(8px, -50%);
  }

  button[data-tooltip-placement="right"]:hover::after,
  button[data-tooltip-placement="right"]:focus-visible::after,
  a[data-tooltip-placement="right"]:hover::after,
  a[data-tooltip-placement="right"]:focus-visible::after {
    transform: translate(0, -50%);
  }

  button[data-tooltip-placement="bottom"]::after,
  a[data-tooltip-placement="bottom"]::after {
    right: auto;
    left: 50%;
    top: calc(100% + 12px);
    bottom: auto;
    transform: translate(-50%, -8px);
  }

  button[data-tooltip-placement="bottom"]:hover::after,
  button[data-tooltip-placement="bottom"]:focus-visible::after,
  a[data-tooltip-placement="bottom"]:hover::after,
  a[data-tooltip-placement="bottom"]:focus-visible::after {
    transform: translate(-50%, 0);
  }

  button[data-tooltip-label][data-tooltip-placement="top"]::after,
  a[data-tooltip-label][data-tooltip-placement="top"]::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: calc(100% + 13px);
    border-color: rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    background: rgba(32, 32, 32, 0.98);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    font-size: 14px;
    padding: 9px 12px;
    transform: translate(calc(-50% + var(--tooltip-shift-x, 0px)), 8px);
  }

  button[data-tooltip-label][data-tooltip-placement="top"]::before,
  a[data-tooltip-label][data-tooltip-placement="top"]::before {
    content: "";
    position: absolute;
    left: calc(50% + var(--tooltip-shift-x, 0px));
    bottom: calc(100% + 5px);
    z-index: 97;
    display: block;
    width: 0;
    height: 0;
    border-top: 8px solid rgba(32, 32, 32, 0.98);
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 0.14s ease;
  }

  button[data-tooltip-label][data-tooltip-placement="top"]:hover::after,
  button[data-tooltip-label][data-tooltip-placement="top"]:focus-visible::after,
  a[data-tooltip-label][data-tooltip-placement="top"]:hover::after,
  a[data-tooltip-label][data-tooltip-placement="top"]:focus-visible::after {
    transform: translate(calc(-50% + var(--tooltip-shift-x, 0px)), 0);
  }

  button[data-tooltip-label][data-tooltip-placement="top"]:hover::before,
  button[data-tooltip-label][data-tooltip-placement="top"]:focus-visible::before,
  a[data-tooltip-label][data-tooltip-placement="top"]:hover::before,
  a[data-tooltip-label][data-tooltip-placement="top"]:focus-visible::before {
    opacity: 1;
  }

  button[data-tooltip-label][data-tooltip-placement="top"][data-tooltip-effective-placement="bottom"]::after,
  a[data-tooltip-label][data-tooltip-placement="top"][data-tooltip-effective-placement="bottom"]::after {
    top: calc(100% + 13px);
    bottom: auto;
    transform: translate(calc(-50% + var(--tooltip-shift-x, 0px)), -8px);
  }

  button[data-tooltip-label][data-tooltip-placement="top"][data-tooltip-effective-placement="bottom"]::before,
  a[data-tooltip-label][data-tooltip-placement="top"][data-tooltip-effective-placement="bottom"]::before {
    top: calc(100% + 5px);
    bottom: auto;
    border-top: 0;
    border-bottom: 8px solid rgba(32, 32, 32, 0.98);
  }

  button[data-tooltip-label][data-tooltip-placement="top"][data-tooltip-effective-placement="bottom"]:hover::after,
  button[data-tooltip-label][data-tooltip-placement="top"][data-tooltip-effective-placement="bottom"]:focus-visible::after,
  a[data-tooltip-label][data-tooltip-placement="top"][data-tooltip-effective-placement="bottom"]:hover::after,
  a[data-tooltip-label][data-tooltip-placement="top"][data-tooltip-effective-placement="bottom"]:focus-visible::after {
    transform: translate(calc(-50% + var(--tooltip-shift-x, 0px)), 0);
  }

  .movie-actions button[data-tooltip-label]::after,
  .top-actions button[data-tooltip-label]::after,
  .watch-party-actions button[data-tooltip-label]::after,
  .watch-party-section-head button[data-tooltip-label]::after,
  .watch-party-form button[data-tooltip-label]::after,
  .feedback-close[data-tooltip-label]::after {
    left: 50%;
    top: calc(100% + 12px);
    bottom: auto;
    transform: translate(-50%, -8px);
  }

  .movie-actions button[data-tooltip-label]:hover::after,
  .movie-actions button[data-tooltip-label]:focus-visible::after,
  .top-actions button[data-tooltip-label]:hover::after,
  .top-actions button[data-tooltip-label]:focus-visible::after,
  .watch-party-actions button[data-tooltip-label]:hover::after,
  .watch-party-actions button[data-tooltip-label]:focus-visible::after,
  .watch-party-section-head button[data-tooltip-label]:hover::after,
  .watch-party-section-head button[data-tooltip-label]:focus-visible::after,
  .watch-party-form button[data-tooltip-label]:hover::after,
  .watch-party-form button[data-tooltip-label]:focus-visible::after,
  .feedback-close[data-tooltip-label]:hover::after,
  .feedback-close[data-tooltip-label]:focus-visible::after {
    transform: translate(-50%, 0);
  }

  body.search-open [data-tooltip-label]::after,
  body.side-menu-open [data-tooltip-label]::after,
  body.profile-popover-open [data-tooltip-label]::after {
    display: none;
  }

  @keyframes railGenrePanelIn {
    from {
      opacity: 0;
      transform: translateX(-18px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .topbar {
    position: fixed;
    top: 0;
    left: var(--desktop-rail-width);
    right: 0;
    z-index: 58;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 640px) minmax(56px, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 110px;
    margin: 0;
    padding: max(18px, env(safe-area-inset-top)) var(--app-edge-padding) 22px;
    background: rgba(5, 5, 5, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  body.watch-party-active .desktop-rail {
    display: none;
  }

  body.watch-party-active .app-shell {
    padding-top: calc(max(18px, env(safe-area-inset-top)) + 96px);
    padding-left: var(--app-edge-padding);
  }

  body.watch-party-active .topbar {
    left: 0;
  }

  body.player-overlay-open .topbar {
    left: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .brand {
    display: none;
  }

  .header-nav {
    display: none;
  }

  .top-actions {
    display: contents;
  }

  .search-form {
    position: absolute;
    top: calc(max(18px, env(safe-area-inset-top)) + 13px);
    right: auto;
    bottom: auto;
    left: calc(50vw - var(--desktop-rail-width));
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    width: min(760px, calc(100vw - 360px));
    height: 44px;
    max-width: 760px;
    transform: translateX(-50%);
  }

  .search-suggestions {
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
  }

  .profile-menu {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .search-form {
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
  }

  .search-open .search-form {
    width: min(760px, calc(100vw - 360px));
    transform: translateX(-50%);
  }

  body.together-mode .search-form,
  body.watch-party-active .search-form,
  body.player-overlay-open .search-form {
    left: 50vw;
  }

  #topSearchButton {
    display: none;
  }
}

.search-form input {
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 10px 0 0 10px;
  background: transparent;
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

.search-loading-indicator {
  display: none;
}

.search-form.search-loading .search-loading-indicator {
  display: none;
}

.search-loading-spinner {
  display: none;
}

@keyframes searchLoadingSpin {
  to {
    transform: rotate(360deg);
  }
}

.search-form input::-webkit-search-cancel-button,
.search-form input::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
}

.search-submit {
  width: 44px;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0 10px 10px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.search-submit-icon,
.search-submit-loader {
  grid-area: 1 / 1;
}

.search-submit-icon {
  display: grid;
  place-items: center;
}

.search-submit svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-form.search-loading .search-submit {
  color: var(--accent);
}

.search-form.search-loading .search-submit-icon {
  opacity: 0;
}

.search-submit-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.24);
  border-left-color: var(--accent);
  border-radius: 50%;
  animation: searchLoadingSpin 0.72s linear infinite;
}

.search-form.search-loading .search-submit-loader {
  display: block;
}

.search-submit:hover {
  color: var(--accent);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 110;
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 96px));
  display: grid;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.98);
  box-shadow: var(--shadow);
  padding: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (min-width: 900px) {
  .search-suggestions {
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
  }
}

.search-suggestion {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 68px;
  border-radius: 10px;
  padding: 6px 8px 6px 6px;
  color: var(--text);
}

.search-suggestion:hover,
.search-suggestion.active {
  background: rgba(255, 255, 255, 0.08);
}

.search-suggestion-more {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.search-suggestion-more:hover,
.search-suggestion-more:focus-visible {
  background: rgba(1, 176, 255, 0.16);
  color: var(--accent);
  outline: none;
}

.search-suggestion-poster {
  width: 42px;
  height: 58px;
  display: block;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(135deg, #252525, #101010);
}

.search-suggestion-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.search-suggestion-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.search-suggestion-title,
.search-suggestion-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggestion-title {
  font-size: 15px;
  font-weight: 700;
}

.search-suggestion-meta {
  color: var(--muted);
  font-size: 13px;
}

.top-actions .round-button {
  position: relative;
  z-index: 12;
}

#watchedButton,
#favoritesButton,
.bottom-nav-button[data-mobile-nav="watched"],
.bottom-nav-button[data-mobile-nav="favorites"] {
  display: none;
}

.search-form:focus-within {
  border-color: rgba(1, 176, 255, 0.75);
}

.side-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.side-menu {
  position: fixed;
  inset: 0 auto 0 var(--desktop-rail-width);
  z-index: 41;
  width: min(72vw, 640px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.98);
  box-shadow: 26px 0 54px rgba(0, 0, 0, 0.44);
  padding: max(34px, env(safe-area-inset-top)) 34px calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
  transform: translateX(-104%);
  transition: transform 0.22s ease;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.side-menu::-webkit-scrollbar {
  width: 6px;
}

.side-menu::-webkit-scrollbar-track {
  background: transparent;
}

.side-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.side-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.side-menu-open .side-menu {
  transform: translateX(0);
}

@media (min-width: 901px) {
  body.side-menu-open .side-menu {
    transform: translateX(-100%);
    pointer-events: none;
  }

  body.side-menu-open .side-menu-backdrop {
    display: none;
  }
}

.side-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  margin: calc(max(34px, env(safe-area-inset-top)) * -1) -34px 0;
  padding: max(28px, env(safe-area-inset-top)) 34px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98) 72%, rgba(18, 18, 18, 0));
  font-size: 26px;
  font-weight: 700;
}

.side-menu-content {
  display: grid;
  gap: 22px;
}

.side-menu-loading {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.side-menu-section {
  display: grid;
  gap: 10px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.side-menu-catalog-title {
  min-height: 72px;
  display: flex;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px 16px 0 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: clamp(24px, 2.1vw, 32px);
  font-weight: 700;
  letter-spacing: 0;
  padding: 0 28px 18px;
  text-align: left;
}

.side-menu-catalog-title:hover,
.side-menu-catalog-title:focus-visible,
.side-menu-catalog-title.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

.side-menu-section summary {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 16px;
  cursor: pointer;
  margin: 0;
  padding: 0 28px;
  color: var(--text);
  font-size: clamp(24px, 2.1vw, 32px);
  font-weight: 700;
  letter-spacing: 0;
  list-style: none;
  outline: none;
}

.side-menu-section summary::-webkit-details-marker {
  display: none;
}

.side-menu-section summary::after {
  content: "";
  width: 14px;
  height: 14px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  opacity: 0.7;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.side-menu-section summary:hover,
.side-menu-section summary:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.side-menu-section[open] summary {
  color: var(--accent);
  background: rgba(1, 176, 255, 0.14);
}

.side-menu-section[open] summary::after {
  transform: rotate(225deg);
}

.side-menu-section:not([open]) .nav-option {
  display: none;
}

.side-menu-catalog-picker {
  display: grid;
  gap: 16px;
}

.side-menu-catalog-heading {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
}

.side-menu-catalog-picker .catalog-picker-tabs,
.side-menu-catalog-picker .catalog-picker-options {
  display: grid;
  gap: 4px;
}

.side-menu-catalog-picker .catalog-picker-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 0 8px;
}

.side-menu-catalog-picker .catalog-picker-tabs .nav-option.clearable {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 18px;
  font-weight: 700;
}

.side-menu-catalog-picker .nav-option-clear {
  width: 24px;
  height: 24px;
  font-size: 28px;
}

.side-menu .nav-option {
  min-height: 64px;
  border-radius: 14px;
  padding: 0 28px;
  font-size: clamp(22px, 1.8vw, 30px);
  font-weight: 500;
}

.side-menu .nav-option small {
  min-width: 56px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.82em;
  text-align: right;
}

.side-menu .nav-option:hover,
.side-menu .nav-option.active {
  background: rgba(1, 176, 255, 0.16);
  color: var(--accent);
  outline: none;
}

.side-menu .nav-option:focus-visible {
  outline: 2px solid rgba(1, 176, 255, 0.72);
  outline-offset: 2px;
}

@media (max-width: 899px) {
  .side-menu {
    inset: 0 auto 0 0;
    width: min(92vw, 520px);
    padding-inline: 22px;
  }

  .side-menu-head {
    margin-inline: -22px;
    padding-inline: 22px;
  }

  .side-menu-section summary,
  .side-menu-catalog-title,
  .side-menu .nav-option {
    padding-inline: 20px;
  }
}

.genre-menu {
  position: relative;
  width: auto;
  margin-bottom: 0;
}

.genre-toggle {
  color: var(--muted);
}

.nav-option small {
  color: var(--muted);
}

.catalog-summary {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.catalog-title {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.catalog-layout,
.catalog-results {
  min-width: 0;
}

.catalog-filters {
  display: none;
}

.catalog-panel.is-tv-catalog .catalog-filters {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin-bottom: 24px;
}

.catalog-filters-title {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0;
}

.catalog-filter-options,
.catalog-filter-options .catalog-picker {
  min-width: 0;
}

.catalog-filter-options .catalog-picker {
  display: grid;
  gap: 10px;
}

.catalog-filter-options .catalog-picker-tabs,
.catalog-filter-options .catalog-picker-options {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 6px;
  border: 0;
  scroll-padding-inline: 0 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.catalog-filter-options .catalog-picker-tabs::-webkit-scrollbar,
.catalog-filter-options .catalog-picker-options::-webkit-scrollbar {
  display: none;
}

.catalog-filter-options .nav-option {
  flex: 0 0 auto;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.catalog-filter-options .nav-option:hover,
.catalog-filter-options .nav-option:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: none;
}

.catalog-filter-options .nav-option.active,
.catalog-filter-options .catalog-picker-tabs .nav-option.clearable {
  background: #fff;
  color: #050505;
  box-shadow: none;
}

.catalog-filter-options .nav-option.active:hover,
.catalog-filter-options .nav-option.active:focus-visible,
.catalog-filter-options .catalog-picker-tabs .nav-option.clearable:hover,
.catalog-filter-options .catalog-picker-tabs .nav-option.clearable:focus-visible {
  background: rgba(255, 255, 255, 0.86);
  color: #050505;
  box-shadow: none;
}

.catalog-filter-options .nav-option-check {
  background: transparent;
  color: var(--accent);
}

.catalog-filter-options .nav-option-clear {
  color: currentColor;
  font-size: 24px;
}

.catalog-filter-options .nav-option small {
  display: none !important;
}

.catalog-panel.is-tv-catalog .catalog-title {
  display: none;
}

.catalog-panel.is-tv-catalog .pagination {
  margin-top: 42px;
  margin-bottom: 12px;
}

.catalog-panel.is-tv-catalog .load-more-button {
  min-width: 176px;
  min-height: 48px;
  border-radius: 10px;
  padding-inline: 24px;
}

@media (max-width: 899px) {
  .catalog-panel.is-tv-catalog .catalog-filters {
    display: none;
  }

  .catalog-filters-title {
    display: none;
  }
}

@media (min-width: 900px) {
  .catalog-panel.is-tv-catalog .catalog-filter-options {
    margin-top: 10px;
  }

  .catalog-panel.is-tv-catalog .catalog-layout {
    display: grid;
    grid-template-columns: minmax(210px, 248px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(24px, 2.5vw, 48px);
  }

  .catalog-panel.is-tv-catalog .catalog-filters {
    position: sticky;
    top: 118px;
    align-content: start;
    gap: 20px;
    max-height: calc(100vh - 142px);
    margin: 0;
    padding: 0 10px 30px 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .catalog-panel.is-tv-catalog .catalog-filters::-webkit-scrollbar {
    display: none;
  }

  .catalog-panel.is-tv-catalog .catalog-filters-title {
    font-size: 24px;
    line-height: 1.15;
  }

  .catalog-filter-options .catalog-picker {
    gap: 12px;
  }

  .catalog-filter-options .catalog-picker-tabs,
  .catalog-filter-options .catalog-picker-options {
    display: grid;
    gap: 7px;
    overflow: visible;
    padding: 0;
  }

  .catalog-filter-options .catalog-picker-tabs {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .catalog-filter-options .nav-option {
    position: relative;
    width: 100%;
    min-height: 48px;
    justify-content: center;
    border-radius: 999px;
    padding: 0 42px;
    background: transparent;
    text-align: center;
  }

  .catalog-filter-options .nav-option > span:first-child {
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
  }

  .catalog-filter-options .nav-option::before {
    content: "+";
    position: absolute;
    left: 17px;
    top: 50%;
    color: currentColor;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    opacity: 0;
    transform: translateY(-52%);
    transition: opacity 140ms ease;
  }

  .catalog-filter-options .nav-option:hover::before,
  .catalog-filter-options .nav-option:focus-visible::before {
    opacity: 1;
  }

  .catalog-filter-options .nav-option.active::before,
  .catalog-filter-options .nav-option.clearable::before {
    opacity: 0;
  }

  .catalog-filter-options .nav-option-check,
  .catalog-filter-options .nav-option-clear {
    position: absolute;
    right: 15px;
  }

  .catalog-panel.is-tv-catalog .catalog-results {
    --catalog-card-width: clamp(158px, 9vw, 198px);
    --catalog-card-column-gap: clamp(14px, 1.1vw, 22px);
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--catalog-card-width));
    justify-content: start;
    column-gap: var(--catalog-card-column-gap);
  }

  .catalog-panel.is-tv-catalog .catalog-results > .catalog-title,
  .catalog-panel.is-tv-catalog .catalog-results > .content-grid,
  .catalog-panel.is-tv-catalog .catalog-results > .empty-state,
  .catalog-panel.is-tv-catalog .catalog-results > .pagination {
    grid-column: 1 / -1;
    width: 100%;
  }

  .catalog-panel.is-tv-catalog .content-grid {
    --catalog-card-width: clamp(158px, 9vw, 198px);
    grid-template-columns: repeat(auto-fill, var(--catalog-card-width));
    justify-content: start;
    gap: clamp(30px, 2.1vw, 42px) var(--catalog-card-column-gap);
  }

  .catalog-panel.is-tv-catalog .movie-card {
    width: var(--catalog-card-width);
  }

  .catalog-panel.is-tv-catalog .poster-wrap {
    aspect-ratio: 2 / 3;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
    transition: transform 150ms ease, box-shadow 150ms ease;
  }

  .catalog-panel.is-tv-catalog .movie-card:hover .poster-wrap,
  .catalog-panel.is-tv-catalog .movie-card:focus-visible .poster-wrap {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  }

  .catalog-panel.is-tv-catalog .movie-card:focus-visible {
    outline: none;
  }

  .catalog-panel.is-tv-catalog .card-body {
    padding-top: 10px;
  }

  .catalog-panel.is-tv-catalog .card-title {
    min-height: 0;
    font-size: 17px;
    line-height: 1.18;
  }

  .catalog-panel.is-tv-catalog .card-meta {
    margin-top: 3px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.site-footer {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 52px;
  padding: 22px 0 4px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.footer-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.site-footer a:hover,
.footer-link-button:hover {
  color: var(--accent);
}

.site-footer p {
  margin: 0;
}

body.together-mode .app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.together-mode .site-footer {
  margin-top: auto;
}

.modal-open {
  overflow: hidden;
}

.player-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 18px;
}

.player-picker-modal[hidden] {
  display: none !important;
}

.player-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.player-picker-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #111;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
.player-picker-panel > .feedback-close {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  left: auto !important;
  margin: 0 !important;
}


.player-picker-panel h2 {
  margin: 0 52px 8px 0;
  font-size: clamp(25px, 5vw, 32px);
  line-height: 1.1;
}

.player-picker-status {
  min-height: 22px;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.4;
}

.player-picker-status.is-error {
  color: #ff9f9f;
}

.player-picker-options {
  display: grid;
  gap: 10px;
}

.player-picker-option {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.player-picker-option:not(:disabled):hover,
.player-picker-option:not(:disabled):focus-visible {
  border-color: rgba(1, 176, 255, 0.72);
  background: rgba(1, 176, 255, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.player-picker-option:disabled {
  cursor: default;
  opacity: 0.48;
}

.player-picker-option.is-locked {
  border-color: rgba(1, 176, 255, 0.48);
}

.player-picker-option-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(1, 176, 255, 0.14);
  color: var(--accent);
}

.player-picker-option-icon.is-plus {
  background: rgba(1, 176, 255, 0.16);
  color: #56caff;
}

.player-picker-option-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.player-picker-option-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.player-picker-option-copy strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-picker-option-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.player-picker-option-state {
  min-width: 0;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.player-picker-option.is-locked .player-picker-option-state {
  background: rgba(1, 176, 255, 0.16);
  color: #56caff;
}

.player-picker-option[data-player-provider="direct"] .player-picker-option-state {
  background: rgba(1, 176, 255, 0.16);
  color: #56caff;
}

@media (max-width: 560px) {
  .player-picker-modal {
    align-items: end;
    padding: 0;
  }

  .player-picker-panel {
    width: 100%;
    padding: 24px 16px max(18px, env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
  }

  .player-picker-option {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    min-height: 72px;
    padding: 11px 12px;
  }

  .player-picker-option-icon {
    width: 42px;
    height: 42px;
  }
}

.player-picker-modal {
  padding: 24px;
}

.player-picker-backdrop {
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.player-picker-panel {
  width: min(760px, calc(100vw - 48px));
  max-height: min(720px, calc(100dvh - 48px));
  overflow: auto;
  padding: 36px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: #101010;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.player-picker-panel > .feedback-close {
  top: 24px !important;
  right: 24px !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.065);
}

.player-picker-panel > .feedback-close svg {
  width: 22px;
  height: 22px;
}

.player-picker-panel h2 {
  margin: 0 76px 10px 0;
  font-size: clamp(34px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.player-picker-status {
  min-height: 26px;
  margin: 0 0 28px;
  color: #a7a7aa;
  font-size: 18px;
}

.player-picker-options {
  gap: 14px;
}

.player-picker-option {
  min-height: 88px;
  grid-template-columns: 56px minmax(0, 1fr) auto 18px;
  gap: 18px;
  padding: 15px 20px;
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.player-picker-option[data-player-provider="direct"] {
  border-color: rgba(1, 176, 255, 0.46);
  background: rgba(1, 176, 255, 0.055);
}

.player-picker-option:not(:disabled):hover,
.player-picker-option:not(:disabled):focus-visible {
  border-color: rgba(1, 176, 255, 0.78);
  background: rgba(1, 176, 255, 0.1);
  transform: none;
}

.player-picker-option:disabled {
  opacity: 0.54;
}

.player-picker-option-icon {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(1, 176, 255, 0.34);
  background: rgba(1, 176, 255, 0.1);
}

.player-picker-option-icon.is-plus {
  background: rgba(1, 176, 255, 0.14);
}

.player-picker-option-copy strong {
  font-size: 21px;
  font-weight: 700;
}

.player-picker-option-copy small {
  font-size: 14px;
}

.player-picker-option-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 12px;
}

.player-picker-option:not(.is-unavailable):not([data-player-provider="direct"]) .player-picker-option-state:not(:empty) {
  background: rgba(38, 211, 111, 0.12);
  color: #35df80;
}

.player-picker-option:not(.is-unavailable):not([data-player-provider="direct"]) .player-picker-option-state:not(:empty)::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
  box-shadow: 0 0 10px rgba(53, 223, 128, 0.55);
}

.player-picker-option[data-player-provider="direct"] .player-picker-option-state {
  border: 1px solid rgba(1, 176, 255, 0.3);
  background: rgba(1, 176, 255, 0.13);
  color: #55c8ff;
}

.player-picker-option-arrow {
  display: grid;
  place-items: center;
  color: #8d96a5;
  transition: color 0.16s ease, transform 0.16s ease;
}

.player-picker-option-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-picker-option:not(:disabled):hover .player-picker-option-arrow,
.player-picker-option:not(:disabled):focus-visible .player-picker-option-arrow {
  color: #55c8ff;
  transform: translateX(2px);
}

@media (max-width: 640px) {
  .player-picker-modal {
    align-items: end;
    padding: 0;
  }

  .player-picker-panel {
    width: 100%;
    max-height: calc(100dvh - 12px);
    padding: 26px 16px max(18px, env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 22px 22px 0 0;
  }

  .player-picker-panel > .feedback-close {
    top: 16px !important;
    right: 16px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
  }

  .player-picker-panel h2 {
    margin-right: 62px;
    font-size: 30px;
  }

  .player-picker-status {
    margin-bottom: 20px;
    font-size: 16px;
  }

  .player-picker-options {
    gap: 10px;
  }

  .player-picker-option {
    min-height: 74px;
    grid-template-columns: 44px minmax(0, 1fr) auto 14px;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 15px;
  }

  .player-picker-option-icon {
    width: 44px;
    height: 44px;
  }

  .player-picker-option-copy strong {
    font-size: 18px;
  }

  .player-picker-option-copy small {
    font-size: 12px;
  }

  .player-picker-option-state {
    gap: 5px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .player-picker-option-arrow svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 380px) {
  .player-picker-option {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .player-picker-option-arrow {
    display: none;
  }
}
.player-picker-modal {
  align-items: center;
  background: var(--bg);
  padding: 18px;
}

.player-picker-backdrop {
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.player-picker-panel {
  width: min(430px, calc(100vw - 36px));
  max-height: min(680px, calc(100dvh - 36px));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
  box-shadow: var(--shadow);
}

.player-picker-panel > .feedback-close {
  top: 14px !important;
  right: 14px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
}

.player-picker-panel > .feedback-close svg {
  width: 18px;
  height: 18px;
}

.player-picker-panel h2 {
  margin: 0 44px 20px 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}

.player-picker-status {
  min-height: 22px;
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.45;
}

.player-picker-options {
  gap: 10px;
}

.player-picker-option {
  min-height: 66px;
  grid-template-columns: 42px minmax(0, 1fr) auto 14px;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
}

.player-picker-option[data-player-provider="direct"] {
  border-width: 2px;
}
.player-picker-option:not(:disabled):hover,
.player-picker-option:not(:disabled):focus-visible {
  border-width: 2px;
}


.player-picker-option-icon {
  width: 42px;
  height: 42px;
}

.player-picker-option-icon svg {
  width: 20px;
  height: 20px;
}

.player-picker-option-copy strong {
  font-size: 18px;
  font-weight: 700;
}

.player-picker-option-copy small {
  font-size: 12px;
}

.player-picker-option-state {
  gap: 5px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 700;
}

.player-picker-option-arrow svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .player-picker-modal {
    align-items: center;
    padding: 14px;
  }

  .player-picker-panel {
    width: min(430px, 100%);
    max-height: calc(100dvh - 28px);
    padding: 30px;
    border-width: 1px;
    border-radius: 14px;
  }

  .player-picker-panel > .feedback-close {
    top: 12px !important;
    right: 12px !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
  }

  .player-picker-panel h2 {
    margin-right: 46px;
    font-size: 24px;
  }

  .player-picker-status {
    margin-bottom: 16px;
    font-size: 16px;
  }

  .player-picker-option {
    min-height: 62px;
    grid-template-columns: 38px minmax(0, 1fr) auto 12px;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 11px;
  }

  .player-picker-option-icon {
    width: 38px;
    height: 38px;
  }

  .player-picker-option-copy strong {
    font-size: 17px;
  }
}
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}

.feedback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.feedback-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111;
  box-shadow: var(--shadow);
}

.feedback-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.feedback-panel > .feedback-close[data-tooltip-label] {
  position: absolute;
}

.feedback-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.feedback-close:hover,
.feedback-close:focus-visible {
  border-color: rgba(1, 176, 255, 0.88);
  background: rgba(1, 176, 255, 0.88);
  color: #fff;
}

.feedback-panel h2 {
  margin: 0 48px 8px 0;
  font-size: 28px;
  line-height: 1.1;
}

.feedback-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.feedback-form {
  display: grid;
  gap: 14px;
}

.feedback-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: none;
}

.feedback-form input {
  height: 44px;
  padding: 0 12px;
}

.feedback-form textarea {
  min-height: 132px;
  resize: vertical;
  padding: 12px;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
  border-color: rgba(1, 176, 255, 0.75);
}

.feedback-form small {
  min-height: 18px;
  color: var(--muted);
}

.feedback-submit {
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #00131d;
  font-weight: 700;
  cursor: pointer;
}

.feedback-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.shelves {
  display: grid;
  gap: 38px;
  overflow-anchor: none;
}

[data-home-shelves-vue-root] {
  display: grid;
  gap: 38px;
  min-width: 0;
  width: 100%;
}

.shelf {
  min-width: 0;
  overflow-anchor: none;
}

.shelf.is-deferred {
  min-height: calc(var(--catalog-card-width) * 1.5 + 70px);
}

.shelf-deferred-row {
  width: 100%;
  min-height: calc(var(--catalog-card-width) * 1.5 + 52px);
  border-radius: 18px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  background-size: 240% 100%;
  animation: skeleton 1.8s ease-in-out infinite;
}

.shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.shelf-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.shelf-head button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
}

.shelf-row {
  --shelf-card-inline-size: var(--catalog-card-width);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--shelf-card-inline-size);
  gap: 12px;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-anchor: none;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.shelf-scroll {
  --shelf-card-inline-size: var(--catalog-card-width);
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.shelf-row > .movie-card,
.shelf-row > .shelf-show-all-card,
.shelf-row > .movie-person-card {
  scroll-snap-align: start;
}

.shelf-row > .movie-card:last-child,
.shelf-row > .shelf-show-all-card:last-child,
.shelf-row > .movie-person-card:last-child {
  scroll-snap-align: end;
}

.shelf-row.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.shelf-row img,
.shelf-row a {
  -webkit-user-drag: none;
}

@media (prefers-reduced-motion: reduce) {
  .shelf-row {
    scroll-behavior: auto;
  }
}

.shelf-arrow {
  position: absolute;
  top: calc(var(--shelf-card-inline-size, var(--catalog-card-width)) * 0.75);
  transform: translateY(-50%);
  z-index: 5;
  width: 38px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.72);
  color: var(--text);
  cursor: pointer;
  opacity: 0.86;
  backdrop-filter: blur(10px);
}

button.shelf-arrow[data-tooltip-label],
a.shelf-arrow[data-tooltip-label] {
  position: absolute;
}

.shelf-arrow.prev {
  left: 6px;
}

.shelf-arrow.next {
  right: 6px;
}

.shelf-arrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shelf-arrow:hover {
  color: #fff;
  opacity: 1;
}

.content-grid {
  --catalog-card-width: clamp(150px, 7.8vw, 170px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--catalog-card-width), 1fr));
  gap: 32px 14px;
  overflow-anchor: none;
}

.content-grid.has-stable-page-height {
  min-height: var(--catalog-page-min-height, 0);
  align-content: start;
}

.catalog-result-section-title {
  grid-column: 1 / -1;
  margin: 10px 0 -10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.catalog-result-section-title:first-child {
  margin-top: 0;
}

.movie-card {
  display: block;
  min-width: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  overflow-anchor: none;
}

.shelf-show-all-card {
  appearance: none;
  align-self: start;
  border: 0;
  display: block;
  padding: 0;
  width: 100%;
  color: #a7a7a7;
  cursor: pointer;
  font: inherit;
  line-height: normal;
}

.shelf-show-all-poster {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  place-items: center;
  aspect-ratio: 2 / 3;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    #1d1d1d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

.shelf-show-all-card:hover .shelf-show-all-poster {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    #232323;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.shelf-show-all-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #a7a7a7;
}

.shelf-show-all-mark svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shelf-show-all-mark.is-new {
  width: auto;
  min-width: 74px;
  height: 42px;
  border: 3px solid currentColor;
  border-radius: 12px;
  background: transparent;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
}

.shelf-show-all-label {
  max-width: calc(100% - 28px);
  color: #d8d8d8;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.poster-wrap {
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #202020, #101010);
  border-radius: 8px;
  overflow: hidden;
  overflow-anchor: none;
  position: relative;
}

.poster-wrap.is-no-poster {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.055), transparent 34%),
    linear-gradient(160deg, #232323, #111);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  overflow-anchor: none;
}

.no-poster-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  color: rgba(255, 255, 255, 0.74);
  text-align: center;
}

.no-poster-placeholder img {
  width: clamp(42px, 31%, 70px);
  height: auto;
  display: block;
  object-fit: contain;
  opacity: 0.78;
  filter: grayscale(1) brightness(1.7) contrast(0.72) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.no-poster-placeholder span {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(13px, 0.92rem, 16px);
  font-weight: 700;
  line-height: 1.18;
}

.rating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 2px;
  padding: 3px 7px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(80, 80, 80, 0.9);
  color: #fff;
}

.watch-status {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(1, 176, 255, 0.92);
  color: #031018;
  font-size: 12px;
  font-weight: 700;
}

.poster-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
}

.poster-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.card-remove-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-remove-button:hover {
  color: var(--accent);
  background: rgba(10, 10, 10, 0.9);
}

.card-remove-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rating-badge.good {
  background: var(--green);
}

.card-body {
  padding-top: 10px;
}

.card-title {
  min-height: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  margin: 34px auto 0;
  color: var(--muted);
  text-align: center;
}

.my-movies-panel {
  display: grid;
  gap: 34px;
}

.my-movies-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  align-content: center;
  min-height: 132px;
  border-radius: 14px;
  padding: 28px;
  background:
    radial-gradient(circle at 80% 50%, rgba(1, 176, 255, 0.34), transparent 35%),
    radial-gradient(circle at 48% 22%, rgba(44, 107, 255, 0.28), transparent 28%),
    linear-gradient(135deg, #063176, #01b0ff 64%, #071016);
  color: #fff;
  overflow: hidden;
}

.telegram-auth-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.telegram-login-button,
.telegram-logout-button {
  min-width: 92px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 10px;
  background: rgba(5, 5, 5, 0.38);
  color: #fff;
  cursor: pointer;
  padding: 10px 15px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.telegram-login-button span {
  font-weight: 700;
  font-size: 14px;
}

.telegram-login-button small {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.telegram-login-button small:empty,
.telegram-login-button small[hidden] {
  display: none;
}

.telegram-login-button:disabled {
  cursor: progress;
  opacity: 0.84;
}

.telegram-login-qr-toggle {
  flex: 0 0 100%;
  justify-self: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  padding: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.telegram-login-qr-toggle:hover {
  color: #fff;
}

.telegram-login-qr {
  flex: 0 0 auto;
  width: clamp(240px, 18vw, 320px);
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.telegram-login-qr-code {
  width: 100%;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.telegram-login-qr-code svg {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}

.telegram-login-qr-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.telegram-login-qr-caption {
  max-width: 230px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.telegram-logout-button {
  min-height: 42px;
  font-weight: 700;
}

.telegram-logout-icon {
  display: none;
}

.telegram-logout-button svg {
  display: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.my-movies-user {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.my-movies-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.my-movies-user-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.my-movies-hero strong {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 38px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.premium-diamond {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  fill: rgba(1, 176, 255, 0.28);
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.premium-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.premium-status-link {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.premium-status-link:hover {
  color: #fff;
}

.premium-info-button {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: rgba(5, 5, 5, 0.34);
  color: #fff;
  cursor: pointer;
  padding: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.premium-info-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.my-movies-hero small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.my-movies-section {
  display: grid;
  gap: 12px;
}

.premium-panel p {
  margin: 0;
  color: var(--muted);
}

.premium-buy-button {
  width: fit-content;
}

.watch-party-avatar .premium-diamond {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 15px;
  height: 15px;
  padding: 2px;
  border-radius: 50%;
  background: var(--surface);
}

.my-movies-section h2,
.my-section-head h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
}

.my-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.my-section-head button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 17px;
  cursor: pointer;
}

.continue-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 58px;
  gap: 18px;
  align-items: center;
  min-height: 160px;
  border-radius: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at 82% 50%, rgba(1, 176, 255, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.continue-card img {
  width: 96px;
  height: 136px;
  object-fit: cover;
  border-radius: 10px;
  background: #161616;
}

.continue-info {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.continue-info strong {
  font-size: 24px;
  line-height: 1.1;
}

.continue-info small,
.continue-time {
  color: var(--muted);
  font-size: 15px;
}

.continue-progress {
  display: block;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

.continue-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.continue-play {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--accent);
}

.continue-play svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.my-collections {
  display: grid;
  gap: 18px;
}

.my-collection-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 14px;
  gap: 12px;
  align-items: center;
  border: 0;
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.my-collection-card::after {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
}

.my-collection-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.my-latest-section {
  margin-top: 4px;
}

.my-collection-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(1, 176, 255, 0.12);
  color: var(--accent);
}

.my-collection-preview {
  position: relative;
  width: 82px;
  height: 72px;
  display: grid;
  place-items: center;
}

.my-collection-preview img {
  position: absolute;
  left: calc(var(--i) * 17px);
  z-index: var(--z);
  width: 48px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
}

.my-collection-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.my-collection-icon.heart svg {
  fill: currentColor;
}

.my-collection-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.my-collection-card strong {
  min-width: 0;
  font-size: 24px;
  line-height: 1.15;
}

.my-collection-card small {
  color: var(--muted);
  font-size: 17px;
}

.my-collection-card.is-loading {
  pointer-events: none;
}

.my-collection-card.is-loading span,
.my-collection-card.is-loading strong,
.my-collection-card.is-loading small {
  min-height: 18px;
  border-radius: 6px;
  color: transparent;
  background: linear-gradient(90deg, #171717, #252525, #171717);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  margin-bottom: 8px;
}

.page-button {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.page-button:hover:not(:disabled),
.page-number-button.active {
  border-color: rgba(1, 176, 255, 0.62);
  background: rgba(1, 176, 255, 0.16);
  color: var(--accent);
}

.page-number-button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.page-nav-button {
  width: 42px;
  padding: 0;
}

.page-nav-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-ellipsis {
  min-width: 24px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.load-more-button {
  min-width: 148px;
  min-height: 40px;
  padding: 0 20px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(1, 176, 255, 0.18);
  font-weight: 700;
}

.load-more-button:hover:not(:disabled) {
  color: #fff;
  border-color: #23c2ff;
  background: #23c2ff;
  filter: brightness(1.06);
}

.page-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.back-link {
  width: fit-content;
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  margin-bottom: 16px;
}

.movie-page {
  display: grid;
  gap: 32px;
  align-items: start;
}

.movie-view.is-error .back-link,
.movie-view.is-error .movie-actions,
.movie-view.is-error .player,
.movie-view.is-error .movie-details {
  display: none;
}

.movie-view.is-error .movie-page {
  min-height: min(620px, calc(100vh - 220px));
  display: grid;
  place-items: center;
}

.movie-view.is-error .movie-heading {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.movie-view.is-error .movie-heading h1 {
  font-size: 42px;
}

.movie-view.is-error .movie-heading p {
  margin-top: 10px;
  font-size: 18px;
}

.movie-details-main {
  display: flex;
  gap: 20px;
  align-items: start;
}

.movie-details-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 14px;
}


.movie-poster-wrap {
  display: block;
  width: 260px;
  height: 390px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #202020, #101010);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  align-self: start;
}

.movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.movie-poster.is-empty {
  visibility: hidden;
}

.movie-info {
  display: grid;
  gap: 16px;
}

.movie-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.movie-heading-main {
  min-width: 0;
}

.movie-heading h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.movie-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.movie-short-description {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
}

.movie-short-description[hidden] {
  display: none;
}

.movie-hero-summary {
  display: grid;
  gap: 18px;
  max-width: 720px;
}

.movie-hero-summary:empty {
  display: none;
}

.movie-hero-facts {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.72);
}

.movie-hero-facts[hidden] {
  display: none;
}

.movie-hero-fact {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
}

.movie-hero-fact .fact-links {
  gap: 0;
}

.movie-hero-fact .fact-links a {
  color: var(--accent);
}

.movie-hero-fact.is-year .fact-links a {
  color: inherit;
}

.movie-hero-fact.is-genre .fact-links a {
  color: inherit;
}

.movie-hero-fact.is-quality {
  color: inherit;
}

.movie-hero-stats {
  display: flex;
  align-items: center;
  gap: 10px 24px;
  flex-wrap: wrap;
  max-width: 720px;
  color: #fff;
}

.movie-hero-stats:empty {
  display: none;
}

.movie-hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
}

.movie-hero-stat.is-views::before {
  content: "•";
  margin-right: 4px;
  color: currentColor;
}

.movie-hero-stat svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.movie-hero-stat-icon {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.movie-hero-stat-label {
  color: inherit;
  font-weight: 700;
}

.movie-hero-stat-value {
  color: inherit;
}

.movie-hero-description-wrap {
  display: grid;
  gap: 10px;
}

.movie-hero-description-wrap[hidden] {
  display: none;
}

.movie-hero-description {
  max-width: 760px;
  color: #fff;
}

.meta-link {
  color: var(--accent);
}

.movie-meta-mobile {
  display: none;
}

.movie-extra-fact.is-mobile-only {
  display: none;
}

.movie-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.movie-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: #fff;
  cursor: pointer;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.movie-action.share,
.movie-action.icon-only {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.movie-action.icon-only span {
  display: none;
}

.movie-action.theater-toggle {
  display: none;
}

.movie-action.theater-toggle:not([hidden]) {
  display: inline-flex;
}

.movie-action svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.movie-action.favorite-action svg {
  fill: currentColor;
  stroke: none;
}

.movie-action.active {
  border-color: rgba(1, 176, 255, 0.48);
  background: rgba(1, 176, 255, 0.12);
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .movie-action:hover {
    border-color: rgba(1, 176, 255, 0.48);
    background: rgba(1, 176, 255, 0.12);
    color: var(--accent);
  }
}


.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.chip-link {
  color: var(--accent);
  border-color: rgba(1, 176, 255, 0.45);
}

.movie-details {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    rgba(16, 16, 18, 0.74);
  border-radius: 16px;
  padding: 20px;
  font-size: 16px;
  line-height: 1.55;
}

.movie-details h2 {
  display: none;
}

.description-wrap {
  display: grid;
  gap: 8px;
  border: 0;
  box-shadow: none;
  background-image: none;
}

.description-wrap[hidden] {
  display: none;
}

.description {
  position: relative;
  margin: 0;
  color: #d8d8d8;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.description.collapsed {
  max-height: 3.1em;
  overflow: hidden;
}

.description-toggle {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
}

.facts {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0 18px;
  margin: 0;
  border: 0;
  box-shadow: none;
  background-image: none;
}

.facts dt {
  padding: 7px 0;
  border: 0;
  color: var(--muted);
  font-size: inherit;
  line-height: inherit;
}

.facts dd {
  margin: 0;
  min-width: 0;
  padding: 7px 0;
  border: 0;
  color: #e6e6e6;
  font-size: inherit;
  line-height: inherit;
}

.fact-links {
  display: inline;
}

.fact-links a {
  color: var(--accent);
}

.rating-list {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  flex-wrap: wrap;
  vertical-align: middle;
}

.rating-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  line-height: 1;
}

.rating-source-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.rating-source-label {
  color: rgba(255, 255, 255, 0.68);
}

.rating-source-value {
  color: rgba(255, 255, 255, 0.94);
}

.movie-extra-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 20px 36px;
  align-items: start;
  max-width: 1280px;
  padding-top: 8px;
}

.movie-extra-facts[hidden] {
  display: none;
}

.movie-extra-fact {
  min-width: 0;
}

.movie-extra-fact.is-wide {
  grid-column: span 2;
}

.movie-extra-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.25;
}

.movie-extra-value {
  color: #f1f1f1;
  font-size: 19px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.movie-extra-value .fact-links a {
  color: inherit;
}

.movie-extra-description {
  max-width: 100%;
  overflow-wrap: break-word;
}

.movie-extra-description.collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.movie-extra-description-toggle {
  display: inline-flex;
  align-items: center;
  border: 0;
  margin: 6px 0 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.movie-extra-description-toggle[hidden] {
  display: none;
}

.movie-cast {
  display: grid;
  gap: 28px;
  padding-top: clamp(34px, 4vw, 56px);
}

.movie-cast[hidden] {
  display: none;
}

.movie-cast-group {
  display: grid;
  gap: 24px;
}

.movie-cast-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}

.movie-cast-scroll {
  --shelf-card-inline-size: clamp(104px, 6.6vw, 132px);
}

.movie-cast-list {
  --shelf-card-inline-size: clamp(104px, 6.6vw, 132px);
  display: flex;
  grid-auto-columns: auto;
  gap: clamp(18px, 2.8vw, 40px);
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 0 0 10px;
}

.movie-cast-scroll .shelf-arrow {
  top: calc(var(--shelf-card-inline-size) * 1.25 / 2);
  width: 44px;
  height: 52px;
}

.movie-cast-scroll .shelf-arrow.prev {
  left: 6px;
}

.movie-cast-scroll .shelf-arrow.next {
  right: 6px;
}

.movie-cast-list::-webkit-scrollbar {
  display: none;
}

.movie-person-card {
  display: grid;
  align-content: start;
  justify-items: center;
  flex: 0 0 var(--shelf-card-inline-size);
  width: var(--shelf-card-inline-size);
  min-height: calc((var(--shelf-card-inline-size) * 1.28) + 72px);
  gap: 11px;
  color: #fff;
  cursor: pointer;
  padding: 0 0 6px;
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
}

.content-grid .movie-person-card,
.catalog-person-card {
  width: 100%;
  min-height: auto;
  flex: initial;
}

.catalog-person-card {
  justify-items: stretch;
  gap: 0;
  text-align: left;
}

.catalog-person-card .movie-person-role {
  display: none;
}

.catalog-person-card .movie-person-name {
  margin-top: 10px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-person-card:hover .movie-person-photo,
.movie-person-card:focus-visible .movie-person-photo {
  box-shadow: inset 0 0 0 1px rgba(1, 176, 255, 0.54), 0 10px 28px rgba(1, 176, 255, 0.16);
}

.movie-person-card:focus-visible {
  border-radius: 10px;
  outline: 2px solid rgba(1, 176, 255, 0.72);
  outline-offset: 5px;
}

.movie-cast-list > .movie-person-card:last-child {
  scroll-snap-align: end;
}

.movie-person-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #202020, #101010);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.movie-person-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.movie-person-initials {
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 700;
  line-height: 1;
}

.movie-person-role {
  max-width: 100%;
  min-height: 1.2em;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(14px, 1.1vw, 18px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-person-name {
  max-width: 100%;
  color: inherit;
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 400;
  line-height: 1.18;
}

.movie-related {
  display: grid;
  gap: 24px;
  margin-top: clamp(38px, 4.6vw, 72px);
  padding-top: 0;
}

.movie-related-mount:empty {
  display: none;
}

.movie-related[hidden] {
  display: none;
}

.movie-related-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}

.movie-related-scroll {
  --shelf-card-inline-size: var(--catalog-card-width);
}

.movie-related-scroll .shelf-arrow {
  top: calc(var(--shelf-card-inline-size) * 1.5 / 2);
}

.movie-related-scroll .shelf-arrow.prev {
  left: 6px;
}

.movie-related-scroll .shelf-arrow.next {
  right: 6px;
}

.movie-related-row {
  gap: clamp(16px, 2vw, 28px);
  padding: 0 0 10px;
  scrollbar-width: none;
}

.movie-related-row::-webkit-scrollbar {
  display: none;
}

@media (min-width: 901px) {
  .movie-details-main {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px 22px;
  }

  .movie-details-text {
    display: contents;
  }

  .description-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .movie-poster-wrap {
    grid-column: 1;
    grid-row: 2;
  }

  .facts {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }
}

@media (min-width: 901px) {
  .app-shell:has(.movie-view:not([hidden])) {
    padding-top: 0;
  }

  .app-shell:has(.movie-view:not([hidden])) .topbar {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .app-shell:has(.movie-view:not([hidden])) .search-form,
  .app-shell:has(.movie-view:not([hidden])) .profile-button {
    background: rgba(22, 22, 22, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .movie-view:not(.is-error):not([hidden]) {
    margin-left: calc(var(--app-edge-padding) * -1);
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden]))) {
    position: relative;
    isolation: isolate;
    width: calc(100vw - var(--desktop-rail-width));
    min-height: 100dvh;
    display: block;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: #050505;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden])))::before,
  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden])))::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 100dvh;
    pointer-events: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden])))::before {
    z-index: -2;
    background-image: var(--movie-hero-bg);
    background-position: center right;
    background-size: cover;
    filter: saturate(1.08) contrast(1.06);
    opacity: 0.92;
    transform: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden])))::after {
    z-index: -1;
    background:
      radial-gradient(circle at 72% 30%, rgba(5, 5, 5, 0.12) 0%, rgba(5, 5, 5, 0.46) 45%, rgba(5, 5, 5, 0.8) 78%),
      linear-gradient(90deg, rgba(5, 5, 5, 0.98) 0%, rgba(5, 5, 5, 0.86) 30%, rgba(5, 5, 5, 0.34) 64%, rgba(5, 5, 5, 0.3) 100%),
      linear-gradient(180deg, rgba(5, 5, 5, 0.08) 0%, rgba(5, 5, 5, 0.52) 70%, #050505 100%);
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    align-content: end;
    gap: 24px;
    min-height: 100dvh;
    max-width: none;
    padding: clamp(220px, 34vh, 340px) clamp(44px, 6vw, 92px) clamp(46px, 7vh, 74px);
    box-sizing: border-box;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading-main {
    display: grid;
    gap: 12px;
    max-width: 860px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading h1 {
    max-width: 15ch;
    font-size: clamp(46px, 4.2vw, 86px);
    font-weight: 700;
    line-height: 1.02;
    text-wrap: balance;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading.is-title-fit-reduced h1 {
    max-width: min(24ch, 980px);
    font-size: clamp(38px, 3vw, 60px);
    line-height: 1.03;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 20px;
    font-weight: 400;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading .movie-hero-description {
    max-width: 760px;
    color: #fff;
    font-size: 18px;
    line-height: 1.45;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.44);
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading .movie-hero-description:not(.collapsed) {
    max-width: 700px;
    font-size: 19px;
    line-height: 1.5;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-hero-summary {
    max-width: 720px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-actions {
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    max-width: 860px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action {
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 0 24px;
    font-size: 17px;
    font-weight: 400;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action.icon-only {
    width: 54px;
    min-width: 54px;
    padding: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action.watch-action {
    order: 1;
    min-width: 260px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction {
    order: 3;
    width: 54px;
    min-width: 54px;
    padding: 0;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction span {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) #movieFavoriteAction {
    order: 4;
  }

  .movie-view:not(.is-error):not([hidden]) #movieWatchedAction {
    order: 5;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action svg {
    width: 20px;
    height: 20px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action.watch-action svg {
    fill: #fff;
    stroke: #fff;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action.active,
  .movie-view:not(.is-error):not([hidden]) .movie-action:hover {
    background: var(--accent);
    color: #fff;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action.watch-action:hover {
    background: #25c2ff;
    color: #fff;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-details {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0 clamp(44px, 6vw, 92px);
    padding: clamp(42px, 5vw, 72px) 0 clamp(10px, 1.8vw, 24px);
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-related-mount {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: clamp(28px, 2.6vw, 46px) clamp(44px, 6vw, 92px) clamp(70px, 8vw, 120px);
  }

  .movie-view:not(.is-error):not([hidden]) .movie-related-mount .movie-related {
    margin-top: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-details h2 {
    display: block;
    margin: 0 0 clamp(30px, 4vw, 52px);
    color: #fff;
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 400;
    line-height: 1.08;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-details .movie-cast-title,
  .movie-view:not(.is-error):not([hidden]) .movie-details .movie-related-title {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-details-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(28px, 4vw, 48px);
  }

  .movie-view:not(.is-error):not([hidden]) .movie-extra-facts {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: clamp(20px, 3vw, 38px);
    padding-top: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-cast {
    margin-top: clamp(34px, 3.4vw, 56px);
    padding-top: clamp(24px, 2.8vw, 42px);
  }

  .movie-view:not(.is-error):not([hidden]) .movie-cast-scroll,
  .movie-view:not(.is-error):not([hidden]) .movie-related-scroll {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-cast-list,
  .movie-view:not(.is-error):not([hidden]) .movie-related-row {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-details-text {
    display: grid;
    gap: 26px;
    width: 100%;
    max-width: min(860px, 100%);
  }

  .movie-view:not(.is-error):not([hidden]) .description {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.45;
  }

  .movie-view:not(.is-error):not([hidden]) .description-wrap {
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .description.collapsed {
    max-height: 4.65em;
  }

  .movie-view:not(.is-error):not([hidden]) .facts {
    display: grid;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px 22px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .facts dt {
    display: block;
    color: var(--muted);
    font-size: 18px;
    font-weight: 400;
  }

  .movie-view:not(.is-error):not([hidden]) .facts dd {
    min-height: 0;
    display: flex;
    align-items: center;
    width: auto;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    padding: 0;
    font-size: 19px;
    font-weight: 400;
    text-overflow: clip;
    white-space: normal;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-poster-wrap {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) .player {
    grid-area: player;
    z-index: 1;
    display: none;
    width: min(1440px, calc(100% - clamp(0px, 4vw, 80px)));
    justify-self: center;
    margin-top: clamp(86px, 16vh, 180px);
    border-radius: 14px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden]))) .player.is-fs,
  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden]))) .player.is-watch-open {
    display: grid;
    position: fixed;
    inset: 0;
    z-index: 2147483601;
    width: 100vw;
    height: 100dvh;
    max-height: none;
    min-height: 0;
    aspect-ratio: auto;
    justify-self: stretch;
    align-self: stretch;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #101010;
  border-radius: 12px;
  overflow: hidden;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: default;
}

.player:focus,
.player:focus-visible {
  outline: none;
}

.player:empty {
  display: none;
}

body.watch-party-active .movie-page:has(.watch-party:not([hidden])) .player:not(.is-empty) {
  display: grid;
  visibility: visible;
}

.player iframe,
.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.player-video {
  z-index: 2;
  background: #000;
  object-fit: contain;
  cursor: default;
  pointer-events: none;
}

.player-video::-webkit-media-controls,
.player-video::-webkit-media-controls-enclosure,
.player-video::-webkit-media-controls-panel,
.player-video::-webkit-media-controls-play-button,
.player-video::-webkit-media-controls-start-playback-button,
.player-video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0 !important;
  pointer-events: none !important;
}

.direct-player-click-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: default;
}

.direct-player-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #050505;
  background-position: center;
  background-size: cover;
  filter: saturate(1.04);
  transform: scale(1.01);
}

.direct-player-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.18) 46%, rgba(0, 0, 0, 0.42)),
    radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.46) 74%);
}

.direct-player-placeholder-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
  transform: translate(-50%, -50%);
}

.direct-player-placeholder-play:hover,
.direct-player-placeholder-play:focus-visible {
  background: #19b9ff;
}

.direct-player-placeholder-play:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.86);
  outline-offset: 3px;
}

.direct-player-placeholder-play-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translateX(2px);
}

.direct-player-placeholder-play-icon svg {
  width: 34px;
  height: 34px;
  display: block;
  fill: currentColor;
}

.player-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}

.player.is-player-loading .player-loading,
.player.is-player-buffering .player-loading {
  display: grid;
}

.player.is-player-buffering .player-loading {
  background: rgba(0, 0, 0, 0.22);
}

.player-loading-logo {
  width: 46px;
  height: 46px;
  display: block;
  border-radius: 50%;
  background: currentColor;
  color: inherit;
  mask: url("/favicon.svg?v=20260602-4") center / contain no-repeat;
  -webkit-mask: url("/favicon.svg?v=20260602-4") center / contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.12));
  animation: player-loading-spin 1.05s linear infinite;
}

.player-loading-text {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.72);
}

.player-status-message {
  position: absolute;
  left: 50%;
  bottom: clamp(96px, 18%, 148px);
  z-index: 14;
  max-width: min(520px, calc(100% - 32px));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(18, 22, 28, 0.94);
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%);
}

.player-status-message[hidden] {
  display: none !important;
}

@keyframes player-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.player-title-overlay {
  display: none;
}

.direct-player-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 28px 70px 84px 32px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.32) 46%, rgba(0, 0, 0, 0) 100%);
  color: #fff;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.direct-player-title-stack {
  min-width: 0;
  max-width: min(58vw, 860px);
  display: grid;
  gap: 5px;
}

.direct-player-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(22px, 2.1vw, 34px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.78);
}

.direct-player-episode-title {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.78);
}

.direct-player-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.direct-player-select {
  min-width: 108px;
  position: relative;
  display: inline-grid;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0;
  font-weight: 700;
  line-height: 1;
}

.direct-player-select.compact {
  min-width: 112px;
}

.direct-player-select span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.direct-player-select select {
  max-width: 184px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.34);
  color: #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  padding: 0 30px 0 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.direct-player-select select:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 10px 26px rgba(0, 0, 0, 0.22);
}

.direct-player-bottom-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  display: grid;
  gap: 0;
  min-height: 112px;
  background: transparent;
  color: #fff;
  padding: 0 18px 14px;
  pointer-events: auto;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.player.direct-player-ui-idle:not(.has-player-menu-open):not(.is-player-loading):not(.is-player-buffering) .direct-player-topbar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}

.player.direct-player-ui-idle:not(.has-player-menu-open):not(.is-player-loading):not(.is-player-buffering) .direct-player-bottom-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
}

.player.direct-player-ui-idle:not(.has-player-menu-open):not(.is-player-loading):not(.is-player-buffering) .player-title-overlay,
.player.direct-player-ui-idle:not(.has-player-menu-open):not(.is-player-loading):not(.is-player-buffering) .direct-player-skip-intro,
.player.direct-player-ui-idle:not(.has-player-menu-open):not(.is-player-loading):not(.is-player-buffering) .player-overlay-btn {
  opacity: 0;
  pointer-events: none;
}

.player.has-player-settings-window::before,
.player.has-player-serial-window::before {
  content: none;
}

.player.has-player-settings-window .direct-player-bottom-panel,
.player.has-player-serial-window .direct-player-bottom-panel {
  z-index: 31;
}

.player.has-player-menu-open .direct-player-center-play,
.player.has-player-menu-open .direct-player-feedback,
.player.has-player-menu-open .direct-player-toast {
  opacity: 0 !important;
  pointer-events: none !important;
}

.player.has-player-menu-open .direct-player-progress-row {
  opacity: 0;
}

.direct-player-feedback {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  display: grid;
  width: clamp(112px, 7.4vw, 142px);
  height: clamp(112px, 7.4vw, 142px);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.direct-player-feedback.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.direct-player-feedback svg {
  display: block;
  width: clamp(58px, 3.8vw, 74px);
  height: clamp(58px, 3.8vw, 74px);
  fill: currentColor;
}

.direct-player-seek-feedback {
  display: grid;
  place-items: center;
  min-width: 84px;
  min-height: 84px;
  color: #fff;
  font-size: clamp(28px, 2.5vw, 42px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.direct-player-toast {
  position: absolute;
  left: 50%;
  bottom: clamp(104px, 12vh, 168px);
  z-index: 14;
  max-width: min(460px, calc(100vw - 32px));
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(18, 18, 19, 0.88);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.direct-player-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.direct-player-center-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 13;
  display: grid;
  width: clamp(58px, 5.8vw, 112px);
  height: clamp(58px, 5.8vw, 112px);
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  place-items: center;
  transform: translate(-50%, -50%);
  transition: background 0.16s ease, transform 0.16s ease;
}

body.player-overlay-open .direct-player-center-play,
.player.is-fs .direct-player-center-play,
.player.is-watch-open .direct-player-center-play {
  position: fixed !important;
  left: 50vw !important;
  top: 50dvh !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 60 !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}

.direct-player-center-play::before,
.direct-player-center-play::after {
  display: none !important;
  content: none !important;
}

.direct-player-center-play:hover,
.direct-player-center-play:focus-visible {
  background: rgba(0, 0, 0, 0.68);
  outline: none;
}

.direct-player-center-play-icon {
  display: grid;
  width: 50%;
  height: 50%;
  color: currentColor;
  place-items: center;
  transform: none;
}

.direct-player-center-play-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.direct-player-subtitle-overlay {
  position: absolute;
  left: 50%;
  bottom: 132px;
  z-index: 6;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: min(920px, calc(100vw - 44px));
  color: #fff;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.88), 0 0 2px rgba(0, 0, 0, 0.96);
  pointer-events: none;
  transform: translateX(-50%);
}

.direct-player-subtitle-overlay span {
  display: inline;
  max-width: 100%;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.42);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 1px 8px 3px;
}

.direct-player-subtitle-overlay.subtitle-size-small {
  font-size: clamp(18px, 1.7vw, 27px);
}

.direct-player-subtitle-overlay.subtitle-size-large {
  font-size: clamp(27px, 2.7vw, 40px);
}

.direct-player-subtitle-overlay.subtitle-size-huge {
  font-size: clamp(32px, 3.2vw, 48px);
}

.direct-player-resume {
  position: absolute;
  top: auto;
  bottom: 132px;
  left: 50%;
  z-index: 12;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: fit-content;
  min-width: min(390px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(18, 18, 19, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
  color: #fff;
  padding: 22px 20px 24px;
  pointer-events: auto;
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.direct-player-resume-text {
  max-width: 380px;
  font-size: clamp(16px, 1.22vw, 20px);
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  letter-spacing: 0;
  white-space: pre-line;
}

.direct-player-resume-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
}

.direct-player-resume-action,
.direct-player-skip-intro {
  min-height: 52px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  cursor: pointer;
  padding: 0 24px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  transition: background 0.16s ease, opacity 0.18s ease, transform 0.16s ease;
}

.direct-player-resume-action.primary {
  background: var(--accent);
}

.direct-player-resume-action {
  border-radius: 8px;
}

.direct-player-resume-action:hover,
.direct-player-resume-action:focus-visible,
.direct-player-skip-intro:hover,
.direct-player-skip-intro:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.direct-player-resume-action.primary:hover,
.direct-player-resume-action.primary:focus-visible {
  background: #19b9ff;
}

.direct-player-resume-action:active,
.direct-player-skip-intro:active {
  transform: scale(0.98);
}

.direct-player-next,
.direct-player-ended {
  position: absolute;
  left: 50%;
  bottom: 132px;
  z-index: 12;
  width: min(460px, calc(100vw - 52px));
  color: #fff;
  pointer-events: auto;
  transform: translateX(-50%);
}

.direct-player-ended {
  z-index: 13;
}

.direct-player-next-card,
.direct-player-ended-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(18, 18, 19, 0.91);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
  padding: 22px 24px 24px;
  text-align: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.direct-player-next-title,
.direct-player-ended-title {
  max-width: 360px;
  font-size: clamp(16px, 1.22vw, 20px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
}

.direct-player-next-actions,
.direct-player-ended-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.direct-player-next-btn,
.direct-player-ended-btn,
.player-empty-retry {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.direct-player-next-btn.primary,
.direct-player-ended-btn.primary,
.player-empty-retry {
  background: var(--accent);
  color: #fff;
}

.direct-player-next-btn:hover,
.direct-player-next-btn:focus-visible,
.direct-player-ended-btn:hover,
.direct-player-ended-btn:focus-visible,
.player-empty-retry:hover,
.player-empty-retry:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.direct-player-next-btn.primary:hover,
.direct-player-next-btn.primary:focus-visible,
.direct-player-ended-btn.primary:hover,
.direct-player-ended-btn.primary:focus-visible,
.player-empty-retry:hover,
.player-empty-retry:focus-visible {
  background: #19b9ff;
}

.direct-player-next-btn:active,
.direct-player-ended-btn:active,
.player-empty-retry:active {
  transform: scale(0.98);
}

.direct-player-next-btn:disabled,
.direct-player-ended-btn:disabled,
.player-empty-retry:disabled {
  cursor: default;
  opacity: 0.48;
  transform: none;
}

.direct-player-skip-intro {
  position: absolute;
  left: 50%;
  bottom: 132px;
  z-index: 10;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(31, 38, 47, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  padding: 0 18px;
  font-size: 16px;
  transform: translateX(-50%);
}

.direct-player-skip-intro:active {
  transform: translateX(-50%) scale(0.98);
}

.direct-player-progress-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 26px;
}

.direct-player-time {
  min-width: 54px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.72);
  white-space: nowrap;
}

.direct-player-time-duration {
  text-align: left;
}

.direct-player-progress-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 26px;
}

.direct-player-hover-time {
  position: absolute;
  left: 0;
  top: -31px;
  z-index: 2;
  min-width: 54px;
  border-radius: 5px;
  background: rgba(12, 15, 18, 0.9);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  opacity: 0;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.direct-player-hover-time.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.direct-player-progress {
  width: 100%;
  height: 16px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
  appearance: none;
  -webkit-appearance: none;
}

.direct-player-progress:disabled {
  cursor: default;
  opacity: 0.62;
}

.direct-player-progress::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #16b8ff 0%,
    #16b8ff var(--direct-progress-percent, 0%),
    rgba(255, 255, 255, 0.36) var(--direct-progress-percent, 0%),
    rgba(255, 255, 255, 0.36) 100%
  );
}

.direct-player-progress::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #16b8ff;
  box-shadow: 0 2px 10px rgba(1, 176, 255, 0.38), 0 1px 8px rgba(0, 0, 0, 0.42);
  appearance: none;
  -webkit-appearance: none;
}

.direct-player-progress::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.direct-player-progress::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #16b8ff;
}

.direct-player-progress::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #16b8ff;
  box-shadow: 0 2px 10px rgba(1, 176, 255, 0.38), 0 1px 8px rgba(0, 0, 0, 0.42);
}

.direct-player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
}

.direct-player-panel-left,
.direct-player-panel-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.direct-player-panel-right {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.direct-player-panel-btn,
.direct-player-option-btn {
  min-width: 44px;
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  touch-action: manipulation;
  transition: border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.direct-player-panel-btn {
  display: grid;
  place-items: center;
  padding: 0;
}

.direct-player-panel-btn svg,
.direct-player-option-icon svg {
  width: 30px;
  height: 30px;
  display: block;
  fill: currentColor;
}

.direct-player-panel-btn img,
.direct-player-option-icon img,
.direct-player-settings-row-icon img,
.direct-player-settings-quality-icon,
.direct-player-quality-icon {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: invert(1);
}

.direct-player-quality-badge,
.direct-player-settings-hd-icon {
  width: auto !important;
  min-width: 28px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 3px solid currentColor;
  border-radius: 6px;
  color: currentColor;
  padding: 0 3px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  filter: none;
}

.direct-player-panel-btn svg path[fill="none"],
.direct-player-option-icon svg path[fill="none"] {
  fill: none;
  stroke: currentColor;
}

.direct-player-panel-btn:hover,
.direct-player-panel-btn:focus-visible,
.direct-player-option-btn:hover,
.direct-player-option-btn:focus-visible {
  border-color: transparent;
  background: transparent;
  outline: none;
  box-shadow: none;
  color: #fff;
  opacity: 1;
}

.direct-player-toolbar:has(.direct-player-panel-btn:hover, .direct-player-panel-btn:focus-visible, .direct-player-option-btn:hover, .direct-player-option-btn:focus-visible) .direct-player-panel-btn,
.direct-player-toolbar:has(.direct-player-panel-btn:hover, .direct-player-panel-btn:focus-visible, .direct-player-option-btn:hover, .direct-player-option-btn:focus-visible) .direct-player-option-btn,
.player.has-player-menu-open .direct-player-panel-btn,
.player.has-player-menu-open .direct-player-option-btn {
  color: rgba(255, 255, 255, 0.56);
  opacity: 0.72;
}

.direct-player-toolbar:has(.direct-player-panel-btn:hover, .direct-player-panel-btn:focus-visible, .direct-player-option-btn:hover, .direct-player-option-btn:focus-visible) .direct-player-panel-btn:hover,
.direct-player-toolbar:has(.direct-player-panel-btn:hover, .direct-player-panel-btn:focus-visible, .direct-player-option-btn:hover, .direct-player-option-btn:focus-visible) .direct-player-panel-btn:focus-visible,
.direct-player-toolbar:has(.direct-player-panel-btn:hover, .direct-player-panel-btn:focus-visible, .direct-player-option-btn:hover, .direct-player-option-btn:focus-visible) .direct-player-option-btn:hover,
.direct-player-toolbar:has(.direct-player-panel-btn:hover, .direct-player-panel-btn:focus-visible, .direct-player-option-btn:hover, .direct-player-option-btn:focus-visible) .direct-player-option-btn:focus-visible,
.player.has-player-settings-window .direct-player-settings-btn,
.player.has-player-serial-window .direct-player-series-wrap .direct-player-option-btn {
  color: #fff;
  opacity: 1;
}

.player.has-player-settings-window .direct-player-panel-btn:not(.direct-player-settings-btn),
.player.has-player-settings-window .direct-player-option-btn,
.player.has-player-serial-window .direct-player-panel-btn,
.player.has-player-serial-window .direct-player-option-btn:not(.active) {
  color: rgba(255, 255, 255, 0.56);
  opacity: 0.72;
}

.player.has-player-settings-window .direct-player-settings-btn,
.player.has-player-serial-window .direct-player-series-wrap .direct-player-option-btn {
  color: #fff;
  opacity: 1;
}

.direct-player-panel-btn:disabled,
.direct-player-option-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

.direct-player-panel-btn.active {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.direct-player-option-btn.active {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.direct-player-panel-btn.is-pip:hover,
.direct-player-panel-btn.is-pip:focus-visible,
.direct-player-panel-btn.is-pip.active,
.direct-player-panel-btn.is-fullscreen:hover,
.direct-player-panel-btn.is-fullscreen:focus-visible,
.direct-player-panel-btn.is-fullscreen.active {
  background: transparent;
  color: #fff;
}

.direct-player-panel-btn.is-fullscreen:hover,
.direct-player-panel-btn.is-fullscreen:focus-visible {
  border-color: transparent;
  box-shadow: none;
}

.direct-player-settings-btn.is-open {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.direct-player-settings-btn.is-open:hover,
.direct-player-settings-btn.is-open:focus-visible {
  box-shadow: none;
}

.direct-player-volume-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
}

.direct-player-panel-btn.is-volume {
  flex: 0 0 auto;
}

.direct-player-volume {
  width: 0;
  height: 14px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: width 0.16s ease, opacity 0.16s ease, margin-left 0.16s ease;
  appearance: none;
  -webkit-appearance: none;
}

.direct-player-volume-wrap:hover,
.direct-player-volume-wrap:focus-within {
  gap: 8px;
  min-width: 124px;
}

.direct-player-volume-wrap:hover .direct-player-volume,
.direct-player-volume-wrap:focus-within .direct-player-volume {
  width: 78px;
  opacity: 1;
  pointer-events: auto;
}

.direct-player-volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #16b8ff 0%,
    #16b8ff var(--direct-volume-percent, 0%),
    rgba(255, 255, 255, 0.32) var(--direct-volume-percent, 0%),
    rgba(255, 255, 255, 0.32) 100%
  );
}

.direct-player-volume::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  background: #16b8ff;
  box-shadow: 0 1px 8px rgba(1, 176, 255, 0.34), 0 1px 6px rgba(0, 0, 0, 0.34);
  appearance: none;
  -webkit-appearance: none;
}

.direct-player-volume::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.direct-player-volume::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #16b8ff;
}

.direct-player-volume::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #16b8ff;
  box-shadow: 0 1px 8px rgba(1, 176, 255, 0.34), 0 1px 6px rgba(0, 0, 0, 0.34);
}

.direct-player-volume-tip {
  position: absolute;
  left: var(--direct-volume-tip-x, 52px);
  bottom: calc(100% + 13px);
  z-index: 21;
  display: block;
  min-width: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: rgba(32, 32, 32, 0.98);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  padding: 8px 10px;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 8px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
}

.direct-player-volume-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  width: 0;
  height: 0;
  border-top: 8px solid rgba(32, 32, 32, 0.98);
  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
  transform: translateX(-50%);
}

.direct-player-volume-wrap:hover .direct-player-volume-tip,
.direct-player-volume-wrap:focus-within .direct-player-volume-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.direct-player-menu-wrap {
  position: relative;
}

.direct-player-option-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 260px;
  padding: 0 10px;
  white-space: nowrap;
}

.direct-player-option-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.direct-player-option-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.direct-player-option-btn.compact {
  gap: 8px;
  max-width: 170px;
  padding: 0 11px;
}

.direct-player-option-btn.compact .direct-player-option-icon svg {
  width: 27px;
  height: 27px;
}

.direct-player-option-btn.compact .direct-player-option-icon img {
  width: 27px;
  height: 27px;
}

.direct-player-option-btn.compact small {
  max-width: 92px;
  font-size: 13px;
}

.direct-player-option-btn small {
  max-width: 120px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.direct-player-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  display: grid;
  gap: 0;
  width: min(300px, calc(100vw - 28px));
  min-width: min(240px, calc(100vw - 28px));
  max-width: min(360px, calc(100vw - 28px));
  max-height: min(360px, 58vh);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(18, 18, 19, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
  padding: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  scrollbar-color: rgba(255, 255, 255, 0.5) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.direct-player-menu-item {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  padding: 0 18px;
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-player-menu-audio {
  width: min(320px, calc(100vw - 28px));
  min-width: min(270px, calc(100vw - 28px));
  max-height: min(410px, 58vh);
}

.direct-player-menu-subtitle {
  width: min(260px, calc(100vw - 28px));
  min-width: min(220px, calc(100vw - 28px));
  max-height: min(300px, 46vh);
}

.direct-player-menu-item:hover,
.direct-player-menu-item:focus-visible,
.direct-player-menu-item.active {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.direct-player-menu-item:disabled {
  cursor: default;
  opacity: 0.48;
}

.direct-player-settings-menu {
  right: 0;
  bottom: calc(100% + 10px);
  width: min(460px, calc(100vw - 28px));
  max-width: min(460px, calc(100vw - 28px));
  max-height: min(430px, 62vh);
  padding: 10px 0;
}

.direct-player-main-settings-menu {
  padding: 0;
}

.direct-player-settings-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 18, 19, 0.96);
}

.direct-player-settings-header-main {
  min-height: 58px;
  padding: 0 18px;
}

.direct-player-settings-title {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-player-settings-list {
  display: grid;
  padding: 10px 0;
}

.direct-player-settings-submenu .direct-player-settings-list {
  padding: 0 0 10px;
}

.direct-player-settings-row,
.direct-player-settings-back,
.direct-player-settings-choice {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 46px minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0 18px;
  text-align: left;
}

.direct-player-settings-row:hover,
.direct-player-settings-row:focus-visible,
.direct-player-settings-back:hover,
.direct-player-settings-back:focus-visible,
.direct-player-settings-choice:hover,
.direct-player-settings-choice:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.direct-player-settings-row:disabled,
.direct-player-settings-choice:disabled {
  cursor: default;
  opacity: 0.48;
}

.direct-player-settings-row-icon {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.86);
}

.direct-player-settings-row-icon svg {
  width: 28px;
  height: 28px;
}

.direct-player-settings-row-icon > span {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.direct-player-settings-row-icon > .direct-player-quality-badge,
.direct-player-settings-row-icon > .direct-player-settings-hd-icon {
  min-width: 28px;
  height: 22px;
  border-width: 3px;
  border-radius: 6px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 1;
}

.direct-player-settings-row strong,
.direct-player-settings-back strong,
.direct-player-settings-choice strong {
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-player-settings-row > span:last-child {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-player-settings-submenu {
  border-radius: 10px;
  padding: 0;
}

.direct-player-settings-back {
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 62px;
  border-bottom: 0;
  background: transparent;
}

.direct-player-settings-back > span {
  color: #fff;
  font-size: 38px;
  font-weight: 300;
  line-height: 0.8;
}

.direct-player-settings-choice {
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 56px;
}

.direct-player-settings-choice.has-media {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.direct-player-settings-choice.has-media .direct-player-settings-quality-icon {
  width: 26px;
  height: 26px;
}

.direct-player-settings-submenu-quality {
  width: min(330px, calc(100vw - 28px));
  min-width: min(280px, calc(100vw - 28px));
  max-width: min(330px, calc(100vw - 28px));
  max-height: min(500px, 66vh);
}

.direct-player-settings-submenu-quality .direct-player-settings-choice {
  min-height: 62px;
  padding-inline: 28px 18px;
}

.direct-player-settings-submenu-speed {
  width: min(340px, calc(100vw - 28px));
  min-width: min(280px, calc(100vw - 28px));
  max-width: min(340px, calc(100vw - 28px));
}

.direct-player-settings-submenu-audio {
  width: min(340px, calc(100vw - 28px));
  min-width: min(280px, calc(100vw - 28px));
  max-width: min(340px, calc(100vw - 28px));
  max-height: min(460px, 62vh);
}

.direct-player-settings-submenu-subtitle {
  width: min(300px, calc(100vw - 28px));
  min-width: min(240px, calc(100vw - 28px));
  max-width: min(300px, calc(100vw - 28px));
  max-height: min(340px, 52vh);
}

.direct-player-settings-submenu-subtitle-size {
  width: min(360px, calc(100vw - 28px));
  min-width: min(300px, calc(100vw - 28px));
  max-width: min(360px, calc(100vw - 28px));
}

.direct-player-settings-choice.active,
.direct-player-settings-choice:hover,
.direct-player-settings-choice:focus-visible {
  background: rgba(255, 255, 255, 0.07);
}

.player-video.subtitle-size-small::cue {
  font-size: 78%;
}

.player-video.subtitle-size-standard::cue {
  font-size: 100%;
}

.player-video.subtitle-size-large::cue {
  font-size: 126%;
}

.player-video.subtitle-size-huge::cue {
  font-size: 152%;
}

.direct-player-series-menu {
  width: min(460px, calc(100vw - 28px));
  min-width: min(300px, calc(100vw - 28px));
  max-width: min(460px, calc(100vw - 28px));
  max-height: min(430px, 62vh);
  padding: 0;
}

.direct-player-series-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 18, 19, 0.96);
  padding: 0 18px;
}

.direct-player-series-title {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-player-season-list {
  display: grid;
  padding: 0;
}

.direct-player-season-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.direct-player-season-group:last-child {
  border-bottom: 0;
}

.direct-player-series-menu .direct-player-season-row {
  grid-template-columns: 24px minmax(0, 1fr) auto 24px;
  gap: 10px;
  min-height: 56px;
}

.direct-player-series-menu .direct-player-season-row.active,
.direct-player-series-menu .direct-player-season-row.is-playing-season {
  background: rgba(255, 255, 255, 0.055);
}

.direct-player-series-menu .direct-player-season-row.active.is-playing-season {
  background: rgba(255, 255, 255, 0.08);
}

.direct-player-season-count {
  min-width: 0;
  max-width: 110px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.64);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-player-season-chevron {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.68);
  transform: rotate(90deg);
  transform-origin: center;
}

.direct-player-season-row.is-expanded .direct-player-season-chevron {
  transform: rotate(-90deg);
}

.direct-player-season-chevron svg {
  display: block;
  width: 22px;
  height: 22px;
}

.direct-player-episode-list {
  padding: 0;
  background: rgba(255, 255, 255, 0.018);
}

.direct-player-series-menu .direct-player-episode-row {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  min-height: 56px;
  padding-left: 36px;
}

.direct-player-series-menu .direct-player-episode-card {
  align-items: center;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.direct-player-episode-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.direct-player-episode-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.direct-player-episode-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-player-episode-duration {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.48);
}

.direct-player-series-menu .direct-player-episode-row.active {
  background: rgba(255, 255, 255, 0.08);
}

.direct-player-episode-row + .direct-player-episode-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.direct-player-settings-choice-marker {
  display: grid;
  place-items: center;
  width: 20px;
  min-width: 0;
  color: #16b8ff;
}

.direct-player-episode-play-marker svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.direct-player-episode-empty {
  min-height: 50px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 15px;
  font-weight: 700;
}

@media (min-width: 1180px) {
  .direct-player-bottom-panel {
    padding-inline: 26px;
  }

  .direct-player-progress-row {
    grid-template-columns: auto minmax(360px, 1fr) auto;
    gap: 18px;
  }

  .direct-player-progress::-webkit-slider-runnable-track {
    height: 6px;
  }

  .direct-player-progress::-moz-range-track,
  .direct-player-progress::-moz-range-progress {
    height: 6px;
  }
}

@media (pointer: coarse) {
  .direct-player-volume-wrap {
    gap: 0;
    min-width: 44px;
  }

  .direct-player-volume {
    display: none;
  }
}

@media (max-width: 760px) {
  .direct-player-topbar {
    padding: 14px 54px 62px 14px;
  }

  .direct-player-title-stack {
    max-width: calc(100vw - 82px);
  }

  .direct-player-title {
    font-size: 20px;
  }

  .direct-player-controls {
    justify-content: flex-start;
    gap: 6px;
  }

  .direct-player-select {
    min-width: 88px;
  }

  .direct-player-select select {
    max-width: 150px;
    min-height: 30px;
    font-size: 11px;
  }

  .direct-player-bottom-panel {
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 126px;
    gap: 8px;
    padding: 0 10px 10px;
  }

  .direct-player-resume {
    top: auto;
    bottom: 132px;
    width: fit-content;
    min-width: min(340px, calc(100vw - 28px));
    max-width: calc(100vw - 24px);
    gap: 14px;
    padding: 18px 16px 20px;
  }

  .direct-player-resume-text {
    max-width: min(340px, calc(100vw - 60px));
    font-size: 15px;
  }

  .direct-player-resume-actions {
    width: auto;
    gap: 10px;
  }

  .direct-player-resume-action,
  .direct-player-skip-intro {
    min-height: 46px;
    padding: 0 16px;
    font-size: 17px;
  }

  .direct-player-resume-action {
    flex: 0 1 auto;
    min-width: 118px;
  }

  .direct-player-next,
  .direct-player-ended {
    bottom: 132px;
    width: calc(100vw - 24px);
  }

  .direct-player-next-card,
  .direct-player-ended-card {
    gap: 10px;
    padding: 16px 14px 18px;
  }

  .direct-player-next-title,
  .direct-player-ended-title {
    font-size: 15px;
  }

  .direct-player-next-actions,
  .direct-player-ended-actions {
    gap: 8px;
  }

  .direct-player-next-btn,
  .direct-player-ended-btn {
    min-height: 46px;
    padding: 0 16px;
    font-size: 16px;
  }

  .direct-player-skip-intro {
    bottom: 138px;
  }

  .direct-player-toolbar {
    min-height: 86px;
    align-items: flex-start;
    gap: 8px;
  }

  .direct-player-panel-left,
  .direct-player-panel-right {
    gap: 4px;
  }

  .direct-player-volume-wrap {
    min-width: 36px;
  }

  .direct-player-volume {
    display: none;
  }

  .direct-player-volume-wrap:hover,
  .direct-player-volume-wrap:focus-within {
    gap: 0;
    min-width: 36px;
  }

  .direct-player-panel-right {
    justify-content: flex-end;
    align-content: flex-start;
  }

  .direct-player-panel-btn,
  .direct-player-option-btn {
    min-width: 36px;
    min-height: 36px;
  }

  .direct-player-panel-btn svg,
  .direct-player-option-icon svg {
    width: 24px;
    height: 24px;
  }

  .direct-player-panel-btn img,
  .direct-player-option-icon img,
  .direct-player-settings-row-icon img,
  .direct-player-settings-quality-icon,
  .direct-player-quality-icon {
    width: 24px;
    height: 24px;
  }

  .direct-player-option-btn {
    max-width: 138px;
    gap: 5px;
    padding: 0 6px;
    font-size: 11px;
  }

  .direct-player-option-btn:not(.compact) small {
    display: none;
  }

  .direct-player-option-btn.compact {
    max-width: 82px;
  }

  .direct-player-option-btn.compact small {
    max-width: 42px;
    display: block;
    font-size: 10px;
  }

  .direct-player-menu {
    right: -2px;
    width: min(320px, calc(100vw - 20px));
    min-width: min(270px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
  }

  .direct-player-settings-menu {
    right: -2px;
  }

  .direct-player-menu-item {
    min-height: 48px;
    padding: 0 12px;
    font-size: 16px;
  }

  .direct-player-settings-row,
  .direct-player-settings-back,
  .direct-player-settings-choice {
    min-height: 48px;
    grid-template-columns: 34px minmax(0, auto) minmax(0, 1fr);
    gap: 7px;
    padding: 0 12px;
  }

  .direct-player-settings-row-icon svg {
    width: 24px;
    height: 24px;
  }

  .direct-player-settings-row-icon > span {
    font-size: 21px;
  }

  .direct-player-settings-row strong,
  .direct-player-settings-back strong,
  .direct-player-settings-choice strong {
    font-size: 16px;
  }

  .direct-player-settings-row > span:last-child {
    font-size: 14px;
  }

  .direct-player-settings-back,
  .direct-player-settings-choice {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .direct-player-settings-choice {
    grid-template-columns: minmax(0, 1fr);
  }

  .direct-player-settings-choice.has-media {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .direct-player-settings-back > span {
    font-size: 34px;
  }

  .direct-player-series-menu {
    right: auto;
    left: 0;
    width: min(360px, calc(100vw - 20px));
    min-width: min(270px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
  }

  .direct-player-series-header {
    min-height: 50px;
    padding: 0 12px;
  }

  .direct-player-series-title {
    font-size: 16px;
  }

  .direct-player-series-menu .direct-player-season-row {
    grid-template-columns: 20px minmax(0, 1fr) auto 22px;
    gap: 7px;
    min-height: 50px;
    padding: 0 12px;
  }

  .direct-player-season-count {
    max-width: 90px;
    font-size: 14px;
  }

  .direct-player-series-menu .direct-player-episode-row {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 7px;
    min-height: 50px;
    padding-left: 28px;
  }

  .direct-player-settings-choice-marker {
    width: 18px;
  }
}

.player.is-empty {
  display: none;
}

.player.is-empty.is-retry {
  display: grid;
  min-height: 320px;
  background: #050505;
  place-items: center;
}

.player-empty-content {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(520px, calc(100vw - 32px));
  padding: 24px;
  color: #fff;
  text-align: center;
}

.player-empty-text {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 700;
  line-height: 1.28;
}

.player-error-overlay {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 320px;
  place-items: center;
  padding: 24px;
  color: #fff;
}

.player-error-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(620px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(18, 18, 19, 0.93);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.45);
  padding: 24px;
  text-align: center;
}

.player-error-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.player-error-title {
  margin: 0;
  color: #fff;
  font-size: clamp(19px, 1.7vw, 26px);
  font-weight: 700;
  line-height: 1.12;
}

.player-error-text {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 600;
  line-height: 1.36;
}

.player-error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.player-error-btn {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  transition: background 0.16s ease, transform 0.16s ease;
}

.player-error-btn.primary {
  background: var(--accent);
}

.player-error-btn:hover,
.player-error-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.player-error-btn.primary:hover,
.player-error-btn.primary:focus-visible {
  background: #19b9ff;
}

.player-error-btn:active {
  transform: scale(0.98);
}

.player-error-btn:disabled {
  cursor: default;
  opacity: 0.48;
  transform: none;
}

.watch-party {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #141414 0%, #0f0f11 100%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  padding: 0;
}

.watch-party-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
}

.watch-party-head > div {
  min-width: 0;
}

.watch-party-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
}

.watch-party-head h2 span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  margin-left: 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-size: 14px;
}

.watch-party-head p {
  display: block;
  max-width: 100%;
  margin: 5px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.watch-party-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.watch-party-meta[hidden] {
  display: none;
}

.watch-party-meta-chip {
  max-width: 180px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  padding: 0 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.watch-party-meta-chip.is-accent {
  background: rgba(1, 176, 255, 0.14);
  color: var(--accent);
}

.watch-party-actions,
.watch-party-sync-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.watch-party button {
  min-height: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.watch-party-create {
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(1, 176, 255, 0.35);
  background: rgba(1, 176, 255, 0.12);
  color: var(--accent);
  font-size: 13px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease, transform 0.14s ease;
}

.watch-party-create:hover,
.watch-party-sync-button:hover,
.watch-party-leave:hover {
  border-color: rgba(1, 176, 255, 0.65);
  background: rgba(1, 176, 255, 0.16);
  color: var(--accent);
}

.watch-party-create:active {
  transform: translateY(1px) scale(0.98);
}

.watch-party-create:disabled {
  cursor: wait;
  opacity: 0.72;
}

.watch-party .watch-party-icon-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0;
}

.watch-party .watch-party-icon-button:hover {
  color: var(--accent);
  background: rgba(1, 176, 255, 0.14);
}

.watch-party .watch-party-icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.watch-party-sync-button,
.watch-party-leave {
  width: auto;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 1px solid rgba(1, 176, 255, 0.35);
  background: rgba(1, 176, 255, 0.08);
  color: var(--accent);
}

.watch-party-sync-button {
  padding: 0 10px;
}

.watch-party-leave {
  width: 34px;
}

.watch-party-sync-button svg,
.watch-party-leave svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.watch-party-sync-button span,
.watch-party-leave span {
  font-size: 12px;
}

.watch-party-leave span {
  display: none;
}

.watch-party button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.watch-party-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.watch-party-room-bar {
  display: none;
}

.watch-party-room-card {
  display: contents;
}

.watch-party-main,
.watch-party-chat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.watch-party-main {
  flex: 0 0 auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  border-bottom: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.watch-party-section-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 18px minmax(0, auto) minmax(32px, 1fr);
  align-items: center;
  gap: 6px;
  padding: 13px 14px 12px;
}

.watch-party-copy-link {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 1px solid rgba(1, 176, 255, 0.34);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(1, 176, 255, 0.2), rgba(1, 176, 255, 0.08));
  color: #fff;
  cursor: pointer;
  padding: 0;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.watch-party-copy-link:hover {
  border-color: rgba(1, 176, 255, 0.62);
  background: var(--accent);
  transform: translateY(-1px);
}

.watch-party-copy-link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.watch-party .watch-party-users-collapse {
  width: 18px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0;
}

.watch-party-users-collapse svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.watch-party-room-card.is-collapsed .watch-party-users-collapse svg {
  transform: rotate(180deg);
}

.watch-party-section-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.watch-party-users-title {
  cursor: pointer;
  user-select: none;
}

.watch-party-users-title:focus-visible,
.watch-party-users-collapse:focus-visible,
.watch-party-copy-link:focus-visible {
  outline: 2px solid rgba(1, 176, 255, 0.72);
  outline-offset: 2px;
}

.watch-party-count {
  min-width: 24px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  padding: 0 7px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.watch-party-chat {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.watch-party-chat-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 18px minmax(0, auto) minmax(32px, 1fr);
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 13px 14px 12px;
}

.watch-party-chat-head h2 {
  margin: 0;
  grid-column: 1 / 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.watch-party-heading-icon {
  width: 18px;
  min-width: 18px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.watch-party-playback {
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1.35;
}

.watch-party-playback[hidden] {
  display: none;
}

.watch-party-pinned {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  margin: 12px 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.watch-party-pinned:hover {
  border-color: rgba(1, 176, 255, 0.34);
  background: rgba(1, 176, 255, 0.12);
}

.watch-party-pinned-close {
  position: absolute;
  top: 6px;
  right: 8px;
  left: auto;
  z-index: 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  padding: 0;
}

.watch-party-pinned-close svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.watch-party-pinned-close:hover {
  background: rgba(1, 176, 255, 0.88);
  color: #fff;
}

.watch-party-pinned-slide {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 13px 42px 13px 13px;
  text-decoration: none;
  text-align: left;
  font: inherit;
}

.watch-party-pinned-slide.is-hidden {
  display: none;
}

.watch-party-pinned-slide:not(.is-active) {
  display: none;
}

.watch-party-pinned-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  line-height: 1;
}

.watch-party-pinned-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.watch-party-pinned-icon.is-premium {
  background: var(--accent);
  color: #fff;
}

.watch-party-pinned-icon.is-premium svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
}

.watch-party-pinned-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.watch-party-pinned-title {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
}

.watch-party-pinned-line {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
  white-space: normal;
}

.watch-party-pinned-text em {
  color: var(--accent);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
}

.watch-party-room-card.is-collapsed .watch-party-main {
  display: none;
}

.watch-party-participants {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.watch-party-user {
  min-width: 0;
  min-height: 46px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0 10px 0 0;
  font-weight: 700;
}

.watch-party-user:hover {
  color: var(--accent);
}

.watch-party-avatar {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: visible;
  background: rgba(255, 255, 255, 0.11);
}

.watch-party-user img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: contain;
  background: transparent;
  overflow: hidden;
}

.watch-party-user i {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: var(--watch-party-user-color, rgba(255, 255, 255, 0.16));
  font-style: normal;
  font-size: 19px;
  overflow: hidden;
}

.watch-party-user .watch-party-guest-avatar {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(135deg, var(--guest-a), var(--guest-b));
  color: var(--guest-c);
  font-size: 23px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.watch-party-crown,
.watch-party-avatar-badges {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  z-index: 3;
}

.watch-party-crown {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.watch-party-crown svg,
.watch-party-avatar-badge svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.watch-party-avatar-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.watch-party-avatar-badge.is-crown {
  background: var(--accent);
}

.watch-party-avatar-badge.is-premium {
  background: #050505;
}

.watch-party-avatar-badge.is-premium svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
}

.watch-party-user-text {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.watch-party-user b {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-party-user-status {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.watch-party-user small {
  flex: 0 0 auto;
  width: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  font-weight: 700;
  line-height: inherit;
  text-align: right;
}

.watch-party-user small:empty {
  display: none;
}

.watch-party-messages {
  flex: 1 1 0;
  height: 0;
  min-height: 0;
  max-height: none;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 9px;
  background: transparent;
  padding: 12px 14px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.watch-party-message {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.watch-party-message strong {
  color: var(--accent);
  font-size: 14px;
}

.watch-party-message-content {
  display: inline;
  color: #e8e8e8;
  font-size: 14px;
  line-height: 1.35;
}

.watch-party-message-name {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  color: var(--watch-party-message-name-color, #aeb4bd);
  font-weight: 700;
  font-size: 14px;
}

.watch-party-message-content > .watch-party-message-name::after {
  content: ":";
  color: #e8e8e8;
  margin-left: -2px;
  margin-right: 4px;
}

.watch-party-message time {
  margin-right: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.watch-party-message > .watch-party-message-content {
  display: inline;
}

.watch-party-message-text {
  color: #e8e8e8;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.watch-party-suggestion-entry {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.watch-party-suggestion-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 13px;
  width: min(100%, 360px);
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #1b1b1d;
}

.watch-party-suggestion-poster {
  width: 58px;
  height: 82px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.watch-party-suggestion-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.watch-party-suggestion-body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.watch-party-suggestion-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.watch-party .watch-party-suggestion-watch {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 42px;
  min-height: 42px;
  margin-top: 12px;
  padding: 0 28px 0 24px;
  border: 1px solid rgba(1, 176, 255, 0.36);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.watch-party-suggestion-watch:hover:not(:disabled),
.watch-party-suggestion-watch:focus-visible:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.watch-party-suggestion-watch-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  color: var(--accent);
}

.watch-party-suggestion-watch:hover:not(:disabled) .watch-party-suggestion-watch-icon,
.watch-party-suggestion-watch:focus-visible:not(:disabled) .watch-party-suggestion-watch-icon {
  color: currentColor;
}

.watch-party-suggestion-watch-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.watch-party-suggestion-watch:disabled {
  cursor: default;
  opacity: 0.52;
  box-shadow: none;
  filter: grayscale(0.2);
}

.watch-party-emoji-picker button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.watch-party-message.is-system {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 2px 8px;
}

.watch-party-message.is-system span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.watch-party-chat-crown,
.watch-party-chat-diamond {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  margin-right: 1px;
  align-self: center;
  flex: 0 0 14px;
  line-height: 1;
}

.watch-party-chat-crown {
  background: var(--accent);
}

.watch-party-chat-diamond {
  background: #050505;
}

.watch-party-chat-crown svg {
  width: 9px;
  height: 9px;
  fill: currentColor;
}

.watch-party-chat-diamond svg {
  width: 10px;
  height: 10px;
  fill: rgba(1, 176, 255, 0.28);
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.watch-party-muted {
  color: var(--muted);
  font-size: 13px;
}

.watch-party-form {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  grid-template-areas:
    "picker picker"
    "input send";
  gap: 10px;
  align-items: stretch;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.watch-party-input-wrap {
  grid-area: input;
  position: relative;
  min-width: 0;
  width: 100%;
}

.watch-party-form textarea {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  min-height: 42px;
  display: block;
  max-height: 84px;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
  outline: none;
  padding: 10px 44px 10px 12px;
  resize: none;
  overflow-y: hidden;
  font: inherit;
  font-size: 16px;
  line-height: 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

@media (min-width: 901px) {
  .watch-party-form textarea {
    font-size: 14px;
  }
}

.watch-party-emoji-picker {
  grid-area: picker;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 4px;
}

.watch-party-emoji-picker[hidden] {
  display: none;
}

.watch-party-emoji-picker button,
.watch-party .watch-party-emoji-toggle {
  width: 34px;
  min-width: 34px;
  height: 42px;
  min-height: 42px;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 21px;
  line-height: 1;
  padding: 0;
}

.watch-party-emoji-picker button {
  color: #fff;
  filter: none;
  opacity: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.watch-party .watch-party-emoji-toggle {
  position: absolute;
  top: 2px;
  right: 7px;
  bottom: 2px;
  left: auto;
  z-index: 2;
  display: grid;
  place-items: center;
  font-size: 0;
  height: auto;
  min-height: 0;
  transform: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.watch-party .watch-party-emoji-toggle::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.watch-party-emoji-picker button:hover,
.watch-party .watch-party-emoji-toggle:hover {
  background: transparent;
  color: #fff;
}

.watch-party-form textarea:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}

.watch-party-form .watch-party-send {
  grid-area: send;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  align-self: stretch;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  padding: 0;
}

.watch-party-form button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.4);
  opacity: 0.55;
}

.watch-party-form .watch-party-emoji-picker button:disabled {
  cursor: pointer;
  filter: none;
  opacity: 1;
}

.watch-party-form button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.watch-party-form textarea:focus {
  border-color: rgba(1, 176, 255, 0.75);
}

.movie-page:has(.watch-party:not([hidden])) .movie-details,
.movie-page:has(.watch-party:not([hidden])) .movie-related-mount {
  display: none;
}

body.watch-party-active .movie-related-mount {
  display: none;
}

body:has(.watch-party:not([hidden])) .site-footer {
  display: none;
}

.watch-party-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  place-items: center;
  background: var(--bg);
  padding: 18px;
}

.app-shell:has(> .watch-party-modal:not([hidden])) > :not(.watch-party-modal) {
  visibility: hidden;
}

.watch-party-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

.watch-party-modal-panel {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  display: grid;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
  box-shadow: var(--shadow);
  padding: 30px;
}

.watch-party-modal-panel .feedback-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 10px;
}

.watch-party-modal-panel h2 {
  margin: 0 44px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.watch-party-modal-panel p {
  margin: 0 0 2px;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-line;
}

.watch-party-qr {
  justify-self: center;
  width: min(340px, 100%);
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.watch-party-qr-toggle {
  justify-self: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  padding: 2px 6px;
  text-align: center;
}

.watch-party-qr-toggle:hover,
.watch-party-qr-toggle:focus-visible {
  color: #36c4ff;
}

.watch-party-qr-code {
  width: min(300px, calc(100vw - 72px));
  max-width: 100%;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.watch-party-qr-code svg {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}

.watch-party-qr-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.watch-party-qr-caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.watch-party-invite-box {
  display: grid;
  gap: 12px;
}

.watch-party-invite-box[hidden] {
  display: none;
}

.watch-party-invite-field {
  position: relative;
  display: grid;
  gap: 6px;
}

.watch-party-invite-field > span:not(.watch-party-copy-wrap) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.watch-party-copy-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  min-width: 0;
  width: 100%;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.watch-party-invite-box input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 0 10px 0 12px;
  font-weight: 700;
  outline: 0;
  user-select: text;
  -webkit-user-select: text;
  caret-color: transparent;
  cursor: text;
}

.watch-party-copy-wrap:focus-within {
  border-color: transparent;
}

.watch-party-copy-field {
  position: relative;
  width: 42px;
  min-width: 32px;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #efeff1;
  cursor: pointer;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: background 160ms ease, color 160ms ease;
}

.watch-party-copy-field:hover {
  background: rgba(255, 255, 255, 0.08);
}

.watch-party-copy-field:active {
  background: rgba(255, 255, 255, 0.12);
}

.watch-party-copy-field svg {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  fill: currentColor;
  transform-origin: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.watch-party-copy-field:active svg {
  transform: scale(0.92);
}

.watch-party-copy-field::before {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0;
  transform: scale(0.25);
  pointer-events: none;
}

.watch-party-copy-field.is-copied {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.watch-party-copy-field.is-copied::before {
  animation: watchPartyCopyRipple 560ms ease-out;
}

.watch-party-copy-field.is-copied svg {
  opacity: 1;
  animation: watchPartyCopyIconConfirm 560ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes watchPartyCopyRipple {
  0% {
    opacity: 0;
    transform: scale(0.25);
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes watchPartyCopyIconConfirm {
  0% {
    transform: scale(0.92);
  }

  45% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

.watch-party-modal-submit {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.18s ease, opacity 0.18s ease, transform 0.14s ease, filter 0.18s ease;
}

.watch-party-modal-submit:active {
  transform: translateY(1px) scale(0.99);
}

.watch-party-modal-submit.is-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.watch-party-modal-submit::before {
  content: "";
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  display: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.9 4.2 18.6 20c-.2.9-.8 1.1-1.5.7l-4.5-3.3-2.2 2.1c-.2.2-.4.4-.9.4l.3-4.6 8.4-7.6c.4-.3-.1-.5-.6-.2L7.2 14 2.7 12.6c-1-.3-1-1 0-1.4L20.7 4c.8-.3 1.5.2 1.2.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.9 4.2 18.6 20c-.2.9-.8 1.1-1.5.7l-4.5-3.3-2.2 2.1c-.2.2-.4.4-.9.4l.3-4.6 8.4-7.6c.4-.3-.1-.5-.6-.2L7.2 14 2.7 12.6c-1-.3-1-1 0-1.4L20.7 4c.8-.3 1.5.2 1.2.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.watch-party-modal-submit.is-telegram::before {
  display: block;
}

.watch-party-modal-submit:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

@media (min-width: 901px) {
  .movie-page:has(.watch-party:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 312px;
    gap: 24px 20px;
    align-items: stretch;
  }

  .movie-page:has(.watch-party:not([hidden])) .movie-heading {
    grid-column: 1 / -1;
  }

  .movie-page:has(.watch-party:not([hidden])) .movie-details,
  .movie-page:has(.watch-party:not([hidden])) .movie-related-mount {
    display: none;
  }

  .movie-page:has(.watch-party:not([hidden])) .player {
    grid-column: 1;
    align-self: start;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party {
    grid-column: 2;
    align-self: start;
    min-height: 0;
    height: var(--watch-party-height, clamp(320px, 38vw, 460px));
    max-height: var(--watch-party-height, clamp(320px, 38vw, 460px));
  }

  .movie-page:has(.watch-party:not([hidden])):has(.player) .watch-party {
    height: var(--watch-party-height, clamp(320px, 38vw, 460px));
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-head {
    align-items: center;
    flex-direction: row;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-actions,
  .movie-page:has(.watch-party:not([hidden])) .watch-party-sync-actions {
    justify-content: flex-start;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-body {
    display: flex;
    grid-template-columns: none;
    min-height: 0;
    overflow: hidden;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-messages {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    max-height: none;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-form {
    grid-template-columns: minmax(0, 1fr) 42px;
  }
}

.movie-page:has(.watch-party:not([hidden])) .watch-party {
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.movie-page:has(.watch-party:not([hidden])) .watch-party-head {
  display: none;
}

.movie-page:has(.watch-party:not([hidden])) .watch-party-body {
  gap: 14px;
  overflow: visible;
}

.movie-page:has(.watch-party:not([hidden])) .watch-party-main {
  max-height: none;
  border: 0;
  background: transparent;
  padding: 0;
  overflow: visible;
}

.movie-page:has(.watch-party:not([hidden])) .watch-party-chat {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(16, 16, 18, 0.72);
  overflow: hidden;
}

.movie-page:has(.watch-party:not([hidden])) .watch-party-chat-head {
  display: flex;
}

.movie-page:has(.watch-party:not([hidden])) .watch-party-room-card {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    rgba(16, 16, 18, 0.74);
  overflow: hidden;
  padding: 0;
  position: relative;
}

.movie-page:has(.watch-party:not([hidden])) .watch-party-room-card .watch-party-main {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
}

.movie-page:has(.watch-party:not([hidden])) .watch-party-room-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

@media (min-width: 901px) {
  body.watch-party-theater {
    --watch-party-overlay-top: 18px;
    --watch-party-overlay-control: 42px;
    --watch-party-theater-top: 24px;
    --watch-party-player-edge-gap: 12px;
    --watch-party-panel-gap: 12px;
    --watch-party-panel-width: clamp(300px, 22vw, 360px);
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    background: #000;
  }

  body.watch-party-theater .app-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  body.watch-party-theater .back-link,
  body.watch-party-theater .site-footer {
    display: none;
  }

  body.watch-party-theater .topbar {
    position: fixed;
    inset: 0;
    z-index: 72;
    display: block;
    width: 100%;
    min-height: 0;
    height: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.watch-party-theater .topbar > :not(.top-actions),
  body.watch-party-theater .top-actions > :not(.search-form) {
    display: none;
  }

  body.watch-party-theater .top-actions {
    display: block;
  }

  body.watch-party-theater .search-form {
    position: fixed;
    inset: auto calc(var(--watch-party-panel-width) + 96px) auto auto;
    top: var(--watch-party-theater-top);
    z-index: 73;
    width: clamp(220px, 28vw, 420px);
    max-width: 420px;
    height: 42px;
    opacity: 0;
    overflow: visible;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  body.watch-party-theater.watch-party-panel-collapsed .search-form {
    right: 96px;
    width: min(420px, calc(100vw - 160px));
  }

  body.watch-party-theater:has(.player.player-overlay-visible) .search-form,
  body.watch-party-theater:has(.player.player-overlay-pinned) .search-form,
  body.watch-party-theater .search-form:focus-within,
  body.watch-party-theater .search-form:hover {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  body.watch-party-theater .search-form input,
  body.watch-party-theater .search-submit {
    height: 42px;
  }

  body.watch-party-theater .movie-view:not([hidden]) {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    transform: none;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 22vw, 360px);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    transform: none;
  }

  body.watch-party-theater.watch-party-panel-collapsed .movie-page:has(.watch-party:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .movie-heading {
    display: none;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .movie-actions {
    display: none;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .movie-related-mount {
    display: none !important;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .player {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    display: grid;
    place-items: stretch;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    margin: 0;
    aspect-ratio: auto;
    justify-self: stretch;
    align-self: stretch;
    border-radius: 0;
    box-shadow: none;
    background: #000;
    overflow: hidden;
    transform: none;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .player iframe,
  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .player-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 100%;
    max-width: none;
    max-height: none;
    transform: none;
  }

  body.watch-party-theater.watch-party-panel-collapsed .movie-page:has(.watch-party:not([hidden])) .player {
    grid-column: 1 / -1;
    width: 100%;
    margin-right: 0;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    max-height: none;
    min-height: 0;
    align-self: stretch;
    padding: var(--watch-party-panel-gap) 0 var(--watch-party-panel-gap) var(--watch-party-panel-gap);
    background: #050505;
  }

  body.watch-party-theater.watch-party-panel-collapsed .movie-page:has(.watch-party:not([hidden])) .watch-party {
    display: none;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-body {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    gap: 14px;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-room-card {
    flex: 0 0 auto;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    background: rgba(18, 18, 20, 0.66);
    padding: 0;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-room-bar {
    display: none;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-room-title {
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    color: #fff;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-room-title,
  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-chat-head h2,
  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-section-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-main {
    flex: 0 0 auto;
    max-height: none;
    min-height: 44px;
    align-self: stretch;
    align-items: center;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-user {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 44px;
    transform: none;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-avatar {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    border-radius: 11px;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-participants {
    align-items: stretch;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-chat {
    flex: 1 1 0;
    min-height: 0;
    border-radius: 9px;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-chat-head {
    justify-content: center;
    text-align: center;
  }

  body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .watch-party-chat-head h2 {
    width: 100%;
    text-align: center;
  }

  body.watch-party-theater .player-overlay-btn {
    display: grid;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
  }

  body.watch-party-theater .player-title-overlay {
    position: absolute;
    top: calc(var(--watch-party-theater-top) + 5px);
    left: 50%;
    z-index: 7;
    display: block;
    max-width: min(720px, calc(100% - 220px));
    overflow: hidden;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0;
    text-align: center;
    text-overflow: ellipsis;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.72);
    white-space: nowrap;
    transform: translateX(-50%);
    transition: opacity 0.22s ease;
    pointer-events: none;
  }

  body.watch-party-theater .watch-party-panel-toggle-btn {
    background: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  body.watch-party-theater .watch-party-panel-toggle-btn:hover,
  body.watch-party-theater .watch-party-panel-toggle-btn:focus-visible {
    background: rgba(1, 176, 255, 0.88);
  }

  body.watch-party-theater .watch-party-panel-toggle-btn {
    position: fixed;
    top: calc(var(--watch-party-theater-top) + ((42px - 34px) / 2));
    right: calc(var(--watch-party-panel-width) + 24px);
    bottom: auto;
    z-index: 2147483605;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    padding: 0;
    color: #fff;
  }

  body.watch-party-theater.watch-party-panel-collapsed .watch-party-panel-toggle-btn {
    right: 24px;
  }

  body.watch-party-theater .watch-party-pinned-close {
    inset-block-start: 10px !important;
    inset-inline-end: 10px !important;
    bottom: auto !important;
    left: auto !important;
    right: 10px !important;
    margin: 0 !important;
    transform: none !important;
  }

  body.watch-party-theater .watch-party-panel-toggle-btn svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
    stroke: none;
    transform: none;
  }

  body.watch-party-theater .watch-party-panel-toggle-btn span {
    display: none;
  }

  body.watch-party-theater .player.player-overlay-visible .player-title-overlay,
  body.watch-party-theater .player.player-overlay-pinned .player-title-overlay {
    opacity: 1;
  }

  body.watch-party-theater .player.player-overlay-visible .watch-party-panel-toggle-btn,
  body.watch-party-theater .player.player-overlay-pinned .watch-party-panel-toggle-btn {
    opacity: 0.92;
    pointer-events: auto;
  }

  body.watch-party-theater .player.player-overlay-visible .watch-party-panel-toggle-btn,
  body.watch-party-theater .player.player-overlay-pinned .watch-party-panel-toggle-btn {
    transform: translateY(0);
  }

  body.watch-party-theater .player:not(.player-overlay-visible):not(.player-overlay-pinned) {
    cursor: default;
  }

  @media (max-width: 1280px) {
    body.watch-party-theater .search-form {
      right: calc(var(--watch-party-panel-width) + 86px);
      width: clamp(180px, 24vw, 320px);
    }

    body.watch-party-theater .search-form input {
      padding-left: 14px;
      font-size: 15px;
    }

    body.watch-party-theater .search-submit {
      width: 38px;
    }
  }

  @media (max-width: 1040px) {
    body.watch-party-theater .search-form {
      width: clamp(150px, 22vw, 230px);
    }
  }
}

.together-panel {
  min-height: calc(100dvh - 260px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding-block: clamp(32px, 8vh, 88px);
}

.together-head {
  display: block;
  width: min(760px, calc(100vw - 64px - var(--tg-content-safe-area-left) - var(--tg-content-safe-area-right)));
  max-width: 100%;
  justify-self: center;
}

.together-head h2,
.together-empty h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.together-head p,
.together-empty p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.together-head button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #031018;
  cursor: pointer;
  padding: 0 16px;
  font-weight: 700;
  white-space: nowrap;
}

.together-join {
  display: grid;
  gap: 10px;
  width: min(760px, calc(100vw - 64px - var(--tg-content-safe-area-left) - var(--tg-content-safe-area-right)));
  max-width: 100%;
  justify-self: center;
  margin-inline: auto;
}

.together-join-form {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 12px 34px rgba(0, 0, 0, 0.2);
  padding: 7px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.together-join-form:focus-within {
  border-color: rgba(1, 176, 255, 0.66);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: 0 0 0 3px rgba(1, 176, 255, 0.12), 0 14px 38px rgba(0, 0, 0, 0.24);
}

.together-join-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 0 18px;
  font: inherit;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: 0;
}

.together-join-input:focus {
  box-shadow: none;
}

.together-join-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
}

.together-join-button {
  flex: 0 0 auto;
  min-width: 150px;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #031018;
  cursor: pointer;
  padding: 0 26px;
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 700;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.together-join-button:hover {
  filter: brightness(1.06);
}

.together-join-button:active {
  transform: translateY(1px);
}

.together-join-button:disabled,
.together-join-input:disabled {
  cursor: wait;
  opacity: 0.72;
}

.together-join-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

.together-join-status.is-error {
  color: #ff7b7b;
}

.watch-party-join-card {
  width: min(430px, 100%);
  max-width: 100%;
  display: grid;
  gap: 24px;
  justify-self: center;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
  box-shadow: var(--shadow);
}

.together-panel.watch-party-join-card {
  width: min(430px, calc(100vw - 64px - var(--tg-content-safe-area-left) - var(--tg-content-safe-area-right)));
  min-height: 0;
  align-content: start;
  justify-items: stretch;
  margin: clamp(18px, 4vh, 44px) auto 0;
  padding: 30px;
}

.watch-party-modal-panel.watch-party-join-card {
  width: min(430px, 100%);
  gap: 24px;
  border-radius: 14px;
  padding: 30px;
}

.watch-party-join-head {
  min-width: 0;
  display: block;
  border: 0;
  padding: 0;
}

.watch-party-join-head h2 {
  min-width: 0;
  margin: 0 44px 0 0;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.watch-party-modal-panel.watch-party-join-card .feedback-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 10px;
}

.watch-party-join-card .watch-party-join-form {
  display: grid;
  gap: 26px;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.watch-party-join-body {
  display: grid;
  gap: 26px;
  padding: 0;
}

.watch-party-join-text {
  max-width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}

.watch-party-join-card .watch-party-join-input {
  box-sizing: border-box;
  width: 100%;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 16px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  line-height: 68px;
  letter-spacing: 0.28em;
}

.watch-party-join-card .watch-party-join-input:focus {
  border-color: rgba(1, 176, 255, 0.72);
  box-shadow: inset 0 0 0 2px rgba(1, 176, 255, 0.28);
}

.watch-party-join-card .watch-party-join-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.watch-party-join-card .watch-party-join-input:focus::placeholder {
  color: transparent;
}

.watch-party-join-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: -8px;
}

.watch-party-join-status:empty {
  display: none;
}

.watch-party-join-footer {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 10px;
  border: 0;
  padding: 0;
}

.watch-party-join-cancel,
.watch-party-join-submit.together-join-button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.watch-party-join-cancel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
}

.watch-party-join-submit.together-join-button {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
}

.watch-party-join-footer:not(.has-cancel) .watch-party-join-submit {
  width: 100%;
}

.watch-party-join-footer:not(.has-cancel) {
  grid-template-columns: 1fr;
}

.watch-party-join-submit-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
}

.watch-party-join-submit-icon::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5 9.5 17 19 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5 9.5 17 19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.watch-party-join-cancel:hover,
.watch-party-join-submit.together-join-button:hover {
  filter: brightness(1.06);
}

.watch-party-join-cancel:active,
.watch-party-join-submit.together-join-button:active {
  transform: translateY(1px);
}

@media (max-width: 900px) {
  .together-panel.watch-party-join-card {
    width: min(430px, calc(100vw - 40px - var(--tg-content-safe-area-left) - var(--tg-content-safe-area-right)));
    margin-top: 0;
    border-radius: 14px;
    padding: 24px;
  }

  .watch-party-join-head {
    padding: 0;
  }

  .watch-party-join-head h2 {
    font-size: 22px;
  }

  .watch-party-join-card .watch-party-join-form {
    gap: 22px;
  }

  .watch-party-join-body {
    gap: 22px;
    padding: 0;
  }

  .watch-party-join-text {
    font-size: 16px;
    line-height: 1.45;
  }

  .watch-party-join-card .watch-party-join-input {
    height: 62px;
    border-radius: 12px;
    font-size: 22px;
    line-height: 62px;
    padding-inline: 16px;
  }

  .watch-party-join-card .watch-party-join-input::placeholder {
    font-size: 14px;
  }

  .watch-party-join-footer {
    padding: 0;
  }

  .watch-party-join-submit.together-join-button {
    min-height: 48px;
    border-radius: 10px;
    font-size: 16px;
    padding-inline: 16px;
  }
}

.together-rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.together-room-card,
.together-empty {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.together-room-card {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  padding: 18px;
  text-align: left;
}

.together-room-card span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(1, 176, 255, 0.14);
  font-size: 20px;
}

.together-room-card strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.together-room-card small {
  color: var(--muted);
}

.together-room-card:hover {
  border-color: rgba(1, 176, 255, 0.5);
  background: rgba(1, 176, 255, 0.08);
}

.together-empty {
  grid-column: 1 / -1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 34px;
  text-align: center;
}


.player-overlay-btn {
  position: absolute;
  right: 8px;
  z-index: 6;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0.92;
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.18s ease;
}

.player-fs-btn:hover,
.player-fs-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
  outline: none;
}

.player-fs-btn {
  bottom: 12px;
}

html:not(.telegram-miniapp) .player .player-fs-btn {
  display: none !important;
  pointer-events: none !important;
}

.telegram-miniapp .player .player-fs-btn {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  top: auto !important;
  z-index: 2147483605;
  display: grid !important;
  width: 58px;
  height: 54px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: transparent !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

.telegram-miniapp .player .player-fs-btn svg {
  opacity: 0;
}

.telegram-miniapp .player .player-fs-btn:hover,
.telegram-miniapp .player .player-fs-btn:focus-visible {
  background: transparent !important;
  color: transparent !important;
}

.player-theater-btn {
  top: auto;
  right: 8px;
  bottom: 56px;
}

.watch-party-panel-toggle-btn {
  top: 12px;
  right: 8px;
  bottom: auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.watch-party-panel-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (hover: hover) and (pointer: fine) {
  .player:has(iframe) .player-theater-btn,
  .player:has(video) .player-theater-btn {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
  }

  .player:has(iframe).player-overlay-visible .player-theater-btn,
  .player:has(video).player-overlay-visible .player-theater-btn {
    opacity: 0.92;
    transform: translateY(0);
    pointer-events: auto;
  }

  .player:has(iframe).player-overlay-pinned .player-theater-btn,
  .player:has(video).player-overlay-pinned .player-theater-btn {
    opacity: 0.92;
    transform: translateY(0);
    pointer-events: auto;
  }
}

body.watch-party-theater .player-theater-btn {
  right: 8px;
  bottom: 56px;
}

.player-overlay-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.watch-party-panel-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}

.player.player-overlay-visible .watch-party-panel-toggle-btn {
  opacity: 0.92;
  transform: translateY(0);
  pointer-events: auto;
}

.player.player-overlay-pinned .watch-party-panel-toggle-btn {
  opacity: 0.92;
  transform: translateY(0);
  pointer-events: auto;
}

.player-theater-btn svg {
  fill: currentColor;
  stroke: currentColor;
}

.player-theater-btn.active svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  stroke: none;
}

.player.is-fs,
.player.is-watch-open {
  position: fixed;
  inset: 0;
  z-index: 2147483601;
  width: 100vw;
  height: 100dvh;
  max-height: none;
  aspect-ratio: unset;
  border-radius: 0;
}

.player-close-btn {
  display: none;
  position: absolute !important;
  top: 16px;
  right: 16px !important;
  bottom: auto;
  left: auto !important;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.46);
  opacity: 0.92;
  transform: none;
  pointer-events: auto;
}

.player.is-fs .player-close-btn,
.player.is-watch-open .player-close-btn,
body.watch-party-theater .player-close-btn {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 2147483604;
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  transform: none !important;
}

body.watch-party-theater .player.player-overlay-visible .player-close-btn,
body.watch-party-theater .player.player-overlay-pinned .player-close-btn {
  opacity: 0.92;
  pointer-events: auto;
}

body.watch-party-theater .player-close-btn {
  --watch-party-close-edge: calc(16px + var(--watch-party-player-edge-gap));
  top: var(--watch-party-close-edge) !important;
  right: calc(var(--watch-party-panel-width) + var(--watch-party-close-edge)) !important;
}

body.watch-party-theater.watch-party-panel-collapsed .player-close-btn {
  right: var(--watch-party-close-edge) !important;
}

.player-close-btn:hover,
.player-close-btn:focus-visible {
  background: rgba(1, 176, 255, 0.88);
}

.player-close-btn,
.player.is-watch-open .player-close-btn,
body.watch-party-theater .player-close-btn {
  display: none !important;
}

@media (min-width: 901px) {
  body:not(.watch-party-active):not(.watch-party-theater) .player.is-fs .player-close-btn,
  body:not(.watch-party-active):not(.watch-party-theater) .player.is-watch-open .player-close-btn {
    display: grid !important;
  }
}

.is-loading .poster-wrap,
.is-loading .card-title,
.is-loading .card-meta {
  background: linear-gradient(90deg, #171717, #252525, #171717);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  color: transparent;
}

.movie-card.is-loading {
  pointer-events: none;
}

.is-loading .card-title,
.is-loading .card-meta {
  display: block;
  border-radius: 6px;
}

.is-loading .card-title {
  width: 82%;
  min-height: 19px;
}

.is-loading .card-meta {
  width: 56%;
  min-height: 15px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 900px) {
  html:has(.watch-party:not([hidden])),
  body:has(.watch-party:not([hidden])),
  html.watch-party-active,
  body.watch-party-active {
    width: 100%;
    height: var(--watch-party-viewport-height, 100dvh);
    min-height: 0;
    overflow: hidden;
    overscroll-behavior-y: none;
  }

  html.watch-party-keyboard-open,
  body.watch-party-keyboard-open {
    height: var(--watch-party-layout-height, 100dvh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell {
    padding-left: calc(20px + var(--tg-content-safe-area-left));
    padding-right: 0;
  }

  body:has(.watch-party:not([hidden])) .bottom-nav,
  body:has(.watch-party:not([hidden])) .site-footer,
  body.watch-party-active .bottom-nav,
  body.watch-party-active .site-footer {
    display: none;
  }

  body:has(.watch-party:not([hidden])) .app-shell,
  body.watch-party-active .app-shell {
    height: var(--watch-party-viewport-height, 100dvh);
    min-height: 0;
    overflow: hidden;
    padding-bottom: calc(10px + env(safe-area-inset-bottom) + var(--tg-content-safe-area-bottom));
  }

  body.watch-party-keyboard-open .app-shell {
    height: auto;
    min-height: var(--watch-party-layout-height, 100dvh);
    overflow: visible;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(18px + env(safe-area-inset-bottom) + var(--tg-content-safe-area-bottom));
  }

  .topbar,
  .catalog-summary,
  .site-footer,
  .catalog-panel,
  .movie-view {
    padding-right: calc(20px + var(--tg-content-safe-area-right));
  }

  .topbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .menu-button {
    display: inline-grid;
  }

  .header-nav {
    display: none;
  }

  .search-form {
    inset: 0 128px 0 0;
    grid-template-columns: 1fr;
    max-width: none;
  }

  .search-open .search-form {
    width: auto;
  }

  .search-open .menu-button {
    opacity: 0;
    pointer-events: none;
  }

  .search-form input {
    border: 0;
    border-radius: 10px;
    background: transparent;
    padding-right: 16px;
  }

  .search-submit {
    display: none;
  }

  .shelf-scroll {
    --shelf-card-inline-size: clamp(136px, calc((100vw - 104px - var(--tg-content-safe-area-left) - var(--tg-content-safe-area-right)) / 2), 340px);
  }

  .shelf-arrow {
    top: calc(var(--shelf-card-inline-size) * 0.75);
  }

  .my-movies-panel {
    gap: 34px;
    padding-right: 20px;
  }

  .my-movies-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 126px;
    margin-right: 0;
    border-radius: 12px;
    padding: 22px;
  }

  .telegram-auth-actions {
    width: auto;
    margin-left: 0;
    justify-self: end;
    justify-content: flex-end;
  }

  .telegram-auth-actions.has-login {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }

  .telegram-login-qr {
    grid-column: 1 / -1;
    width: min(300px, 100%);
    justify-self: center;
  }

  .telegram-login-qr-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }

  .telegram-login-button {
    width: 100%;
    min-height: 52px;
  }

  .telegram-logout-button {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 14px;
  }

  .telegram-logout-label {
    display: none;
  }

  .telegram-logout-icon {
    display: grid;
    place-items: center;
  }

  .telegram-logout-button svg {
    display: block;
  }

  .my-movies-user {
    gap: 12px;
  }

  .my-movies-avatar {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 12px;
  }

  .my-movies-hero strong {
    font-size: 34px;
  }

  .my-movies-hero small {
    font-size: 17px;
  }

  .my-movies-section h2,
  .my-section-head h2 {
    font-size: 23px;
  }

  .continue-card {
    grid-template-columns: 82px minmax(0, 1fr) 48px;
    gap: 12px;
    min-height: 128px;
    padding: 12px;
  }

  .continue-card img {
    width: 82px;
    height: 112px;
  }

  .continue-info strong {
    font-size: 20px;
  }

  .continue-info small {
    font-size: 14px;
  }

  .continue-time {
    display: none;
  }

  .continue-play {
    width: 46px;
    height: 46px;
  }

  .my-collections {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-right: 0;
  }

  .my-collection-card {
    grid-template-columns: 78px minmax(0, 1fr) 12px;
    min-height: 94px;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
  }

  .my-collection-icon {
    width: 54px;
    height: 54px;
    border-radius: 10px;
  }

  .my-collection-preview {
    width: 78px;
    height: 70px;
  }

  .my-collection-preview img {
    left: calc(var(--i) * 16px);
    width: 47px;
    height: 70px;
  }

  .my-collection-icon svg {
    width: 27px;
    height: 27px;
  }

  .my-collection-card strong {
    font-size: 22px;
    line-height: 1.1;
  }

  .my-collection-card small {
    color: #a8a8a8;
    font-size: 16px;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .catalog-result-section-title {
    margin-bottom: -8px;
    font-size: 20px;
  }

  .content-grid .poster-wrap {
    aspect-ratio: 5 / 7;
  }

  .content-grid .card-body {
    padding-top: 7px;
  }

  .content-grid .card-title {
    font-size: 16px;
    line-height: 1.18;
  }

  .content-grid .card-meta {
    margin-top: 1px;
    font-size: 13px;
  }

  .catalog-panel .pagination {
    flex-wrap: nowrap;
    gap: 7px;
    margin-top: 30px;
    margin-bottom: 34px;
    padding: 0 4px;
  }

  .catalog-panel .page-button {
    min-width: 38px;
    min-height: 38px;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 15px;
  }

  .catalog-panel .page-nav-button {
    width: 38px;
    padding: 0;
  }

  .catalog-panel .page-ellipsis {
    min-width: 18px;
    font-size: 14px;
  }

  .catalog-panel .load-more-button {
    min-width: 152px;
    min-height: 48px;
    margin-top: 4px;
    margin-bottom: 46px;
    border-radius: 10px;
    padding: 0 22px;
    font-size: 16px;
  }

  .movie-heading h1 {
    font-size: 24px;
  }

  .movie-info {
    gap: 12px;
  }

  .player {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    justify-self: center;
    transform: none;
  }

  .movie-view:has(.watch-party:not([hidden])) {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    transition: none;
  }

  body.watch-party-active .movie-view:not([hidden]) {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    transition: none;
  }

  body.watch-party-keyboard-open .movie-view:not([hidden]) {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .movie-page:has(.watch-party:not([hidden])) {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    overflow: hidden;
    transform: translate3d(0, calc(-1 * var(--watch-party-keyboard-shift, 0px)), 0);
    transition: none;
  }

  body.watch-party-active .movie-page {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    overflow: hidden;
    transform: translate3d(0, calc(-1 * var(--watch-party-keyboard-shift, 0px)), 0);
    transition: none;
  }

  body.watch-party-keyboard-open .movie-page:has(.watch-party:not([hidden])),
  body.watch-party-keyboard-open .movie-page {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto auto;
    gap: 32px;
    overflow: visible;
    padding-bottom: 0;
  }

  body.watch-party-keyboard-open .watch-party {
    height: auto;
    max-height: 100%;
    overflow: visible;
  }

  body.watch-party-keyboard-open .watch-party-body {
    height: auto;
    min-height: 0;
    gap: 16px;
    overflow: visible;
  }

  body.watch-party-keyboard-open .watch-party-room-card {
    flex: 0 0 auto;
  }

  body.watch-party-keyboard-open .watch-party-chat {
    flex: 0 0 auto;
    height: clamp(360px, 52vh, 520px);
    min-height: 360px;
    max-height: none;
  }

  html.watch-party-active.watch-party-keyboard-open,
  body.watch-party-active.watch-party-keyboard-open {
    height: auto;
    min-height: var(--watch-party-layout-height, 100dvh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.watch-party-active.watch-party-keyboard-open .app-shell,
  body.watch-party-active.watch-party-keyboard-open .movie-view:not([hidden]),
  body.watch-party-active.watch-party-keyboard-open .movie-page,
  body.watch-party-active.watch-party-keyboard-open .watch-party,
  body.watch-party-active.watch-party-keyboard-open .watch-party-body {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body.watch-party-active.watch-party-keyboard-open .app-shell {
    padding-bottom: calc(18px + env(safe-area-inset-bottom) + var(--tg-content-safe-area-bottom));
  }

  html.ios-device.watch-party-active.watch-party-keyboard-open,
  body.ios-device.watch-party-active.watch-party-keyboard-open {
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .app-shell,
  body.ios-device.watch-party-active.watch-party-keyboard-open .movie-view:not([hidden]),
  body.ios-device.watch-party-active.watch-party-keyboard-open .movie-page,
  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party,
  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-body {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .app-shell {
    padding-bottom: 8px;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .movie-page {
    grid-template-rows: auto auto auto;
    gap: 24px;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party {
    max-height: none;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-chat {
    flex: 0 0 auto;
    height: clamp(380px, 54vh, 560px);
    min-height: 380px;
    max-height: none;
    margin-bottom: 18px;
  }

  .movie-page:has(.watch-party:not([hidden])) .movie-details,
  .movie-page:has(.watch-party:not([hidden])) .movie-related-mount {
    display: none;
  }

  body.watch-party-active .movie-details,
  body.watch-party-active .movie-related-mount {
    display: none;
  }

  .movie-page:has(.watch-party:not([hidden])) .movie-heading {
    display: grid;
  }

  body.watch-party-active .movie-heading {
    display: grid;
  }

  .movie-page:has(.watch-party:not([hidden])) .player {
    align-self: start;
    border-radius: 0;
    margin-top: 0;
  }

  body.watch-party-active .player {
    align-self: start;
    border-radius: 0;
    margin-top: 0;
  }

  .watch-party {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    gap: 10px;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin-bottom: 0;
    overflow: hidden;
  }

  .watch-party-head {
    display: none;
  }

  .watch-party-head p {
    display: none;
  }

  .watch-party-actions,
  .watch-party-sync-actions {
    justify-content: flex-end;
  }

  .watch-party-sync-button {
    width: 34px;
    padding: 0;
  }

  .watch-party-sync-button span {
    display: none;
  }

  .watch-party-body {
    display: flex;
    flex-direction: column;
    order: 1;
    flex: 1 1 auto;
    gap: 16px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .movie-view:has(.watch-party:not([hidden])),
  body.watch-party-active .movie-view:not([hidden]),
  .movie-page:has(.watch-party:not([hidden])),
  body.watch-party-active .movie-page,
  .movie-page:has(.watch-party:not([hidden])) .watch-party,
  .movie-page:has(.watch-party:not([hidden])) .watch-party-body {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .movie-page:has(.watch-party:not([hidden])),
  body.watch-party-active .movie-page {
    grid-template-rows: auto auto auto;
    gap: 24px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party {
    max-height: none;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-room-card .watch-party-main {
    max-height: none;
    overflow: visible;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-chat {
    flex: 0 0 auto;
    min-height: min(520px, 58dvh);
    margin-bottom: 0;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-messages {
    height: auto;
    min-height: 220px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-heading,
  body.watch-party-active .movie-heading {
    order: 1;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-heading-main,
  body.watch-party-active .movie-heading-main {
    order: 1;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-actions,
  body.watch-party-active .movie-actions {
    order: 2;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .player,
  body.watch-party-active .player {
    order: 3;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .watch-party,
  body.watch-party-active .watch-party {
    order: 4;
  }

  .watch-party-body[hidden] {
    display: none;
  }

  .watch-party-main {
    order: 0;
    max-height: 64px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .watch-party-chat {
    order: 1;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 0;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: #101012;
    overflow: hidden;
  }

  body.watch-party-keyboard-open .watch-party-chat {
    flex: 0 0 auto;
    height: clamp(360px, 52vh, 520px);
    min-height: 360px;
    max-height: none;
    margin-bottom: 12px;
  }

  .watch-party-chat-head {
    display: flex;
  }

  .watch-party-messages {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  body.watch-party-keyboard-open .watch-party-messages {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    overflow-y: auto;
  }

  .watch-party-form {
    grid-template-columns: minmax(0, 1fr) 42px;
    flex: 0 0 auto;
    padding: 12px;
    background: rgba(255, 255, 255, 0.025);
  }

  body.watch-party-input-focused .watch-party-form,
  body.watch-party-keyboard-open .watch-party-form,
  body:has(#watchPartyInput:focus) .watch-party-form {
    background: rgba(255, 255, 255, 0.035);
  }

  .watch-party-pinned {
    margin: 10px 10px 0;
  }

  .watch-party-pinned-slide {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 10px 38px 10px 10px;
  }

  .watch-party-pinned-close {
    top: 5px;
    right: 4px;
    width: 26px;
    height: 26px;
  }

  .watch-party-pinned-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .watch-party-pinned-icon svg {
    width: 20px;
    height: 20px;
  }

  .watch-party-pinned-title {
    font-size: 14px;
    line-height: 1.1;
  }

  .watch-party-pinned-line,
  .watch-party-pinned-text em {
    font-size: 13px;
    line-height: 1.22;
  }

  .together-head {
    align-items: stretch;
    flex-direction: column;
  }

  .together-head button {
    width: 100%;
  }

  .together-join {
    width: min(680px, calc(100vw - 40px - var(--tg-content-safe-area-left) - var(--tg-content-safe-area-right)));
  }

  .together-join-form {
    min-height: 58px;
    gap: 6px;
    border-radius: 16px;
    padding: 5px;
  }

  .together-join-input {
    height: 48px;
    padding-inline: 13px;
    font-size: 16px;
  }

  .together-join-button {
    min-width: 104px;
    min-height: 48px;
    padding-inline: 18px;
    font-size: 17px;
  }

  .together-rooms {
    grid-template-columns: 1fr;
  }

  .movie-details {
    padding: 14px;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
      rgba(16, 16, 18, 0.74);
  }

  .movie-details h2 {
    display: none;
  }

  .movie-details-main {
    flex-direction: column;
    gap: 0;
  }

  .movie-poster-wrap {
    width: calc(100% - 32px);
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 16px;
    border-radius: 12px;
  }

  .movie-details-text {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .facts {
    grid-template-columns: 110px 1fr;
  }

  .movie-extra-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    padding: 14px;
  }

  .movie-extra-fact.is-wide {
    grid-column: 1 / -1;
  }

  .movie-extra-label {
    margin-bottom: 3px;
    font-size: 13px;
  }

  .movie-extra-value {
    font-size: 15px;
    line-height: 1.25;
  }

  .movie-cast {
    gap: 30px;
    padding: 34px 16px 18px;
  }

  .movie-cast-group {
    gap: 20px;
  }

  .movie-cast-title {
    font-size: 24px;
  }

  .movie-person-card {
    flex-basis: var(--shelf-card-inline-size);
    width: var(--shelf-card-inline-size);
    min-height: calc((var(--shelf-card-inline-size) * 1.28) + 64px);
  }

  .movie-person-photo {
    width: 100%;
  }

  .movie-person-role {
    font-size: 13px;
  }

  .movie-person-name {
    font-size: 15px;
  }

  .catalog-person-card .movie-person-name {
    margin-top: 7px;
    font-size: 16px;
    line-height: 1.18;
  }

  .movie-related {
    gap: 20px;
    padding: 8px 16px 18px;
  }

  .movie-related-title {
    font-size: 24px;
  }

  .movie-related-scroll {
    --shelf-card-inline-size: min(36vw, 154px);
  }

  .movie-related-row {
    gap: 14px;
  }
}

@media (max-width: 900px) {
  :root {
    --mobile-topbar-safe-top: max(
      env(safe-area-inset-top),
      var(--tg-safe-area-inset-top),
      var(--tg-content-safe-area-inset-top),
      var(--tg-content-safe-area-top),
      var(--tg-fullscreen-controls-top)
    );
    --mobile-content-edge: 36px;
    --mobile-topbar-control-size: 44px;
    --mobile-topbar-icon-size: 25px;
    --mobile-topbar-edge-padding: 18px;
    --mobile-topbar-row-height: 44px;
    --mobile-topbar-top-gap: 18px;
    --mobile-topbar-bottom-gap: 18px;
    --mobile-bottom-nav-height: 82px;
    --mobile-bottom-safe-area: calc(env(safe-area-inset-bottom) + var(--tg-content-safe-area-bottom));
    --mobile-browser-top-offset: 0px;
    --mobile-browser-bottom-offset: 0px;
    --app-edge-padding: clamp(16px, 4.4vw, 20px);
  }

  html.ios-safari-browser,
  html.telegram-ios-browser {
    --mobile-topbar-safe-top: 0px;
    --mobile-bottom-safe-area: 0px;
  }

  body.ios-safari-browser::before,
  body.ios-safari-browser::after,
  body.telegram-ios-browser::before,
  body.telegram-ios-browser::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    z-index: 33;
    display: block;
    background: #000;
    pointer-events: none;
  }

  body.ios-safari-browser::before,
  body.telegram-ios-browser::before {
    top: 0;
    height: calc(
      var(--mobile-browser-top-offset)
      +
      var(--mobile-topbar-safe-top)
      + var(--mobile-topbar-top-gap)
      + var(--mobile-topbar-row-height)
      + var(--mobile-topbar-bottom-gap)
    );
  }

  body.ios-safari-browser::after,
  body.telegram-ios-browser::after {
    bottom: 0;
    height: calc(var(--mobile-bottom-nav-height) + var(--mobile-bottom-safe-area) + var(--mobile-browser-bottom-offset));
  }

  body {
    background: #000;
  }

  html {
    background: #000;
    scrollbar-gutter: auto;
  }

  .app-shell {
    width: 100dvw;
    max-width: 100dvw;
    padding-top: calc(
      var(--mobile-browser-top-offset)
      +
      var(--mobile-topbar-safe-top)
      + var(--mobile-topbar-top-gap)
      + var(--mobile-topbar-row-height)
      + var(--mobile-topbar-bottom-gap)
    );
    padding-bottom: calc(var(--mobile-bottom-nav-height) + var(--mobile-bottom-safe-area) + var(--mobile-browser-bottom-offset));
  }

  .site-footer {
    margin-top: 64px;
    padding-bottom: 22px;
  }

  .catalog-title {
    display: none;
  }

  .topbar {
    position: fixed;
    top: var(--mobile-browser-top-offset);
    left: 0;
    right: auto;
    z-index: 35;
    width: 100dvw;
    max-width: 100dvw;
    height: calc(
      var(--mobile-topbar-safe-top)
      + var(--mobile-topbar-top-gap)
      + var(--mobile-topbar-row-height)
      + var(--mobile-topbar-bottom-gap)
    );
    display: grid;
    grid-template-columns: var(--mobile-topbar-control-size) minmax(0, 1fr) var(--mobile-topbar-control-size);
    gap: 10px;
    align-items: start;
    margin: 0;
    padding:
      calc(var(--mobile-topbar-safe-top) + var(--mobile-topbar-top-gap))
      var(--mobile-topbar-edge-padding)
      var(--mobile-topbar-bottom-gap)
      var(--mobile-topbar-edge-padding);
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  body.ios-safari-browser .topbar,
  body.telegram-ios-browser .topbar {
    background: #000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .brand,
  .header-nav {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    background: transparent;
  }

  .menu-button.is-back {
    transform: translateX(-17px);
  }

  .topbar .round-button {
    width: var(--mobile-topbar-control-size);
    height: var(--mobile-topbar-control-size);
  }

  .topbar .round-button svg {
    width: var(--mobile-topbar-icon-size);
    height: var(--mobile-topbar-icon-size);
  }

  .mobile-title {
    grid-column: 2;
    grid-row: 1;
    display: block;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    line-height: 44px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin-left: 0;
    gap: 0;
  }

  .top-actions #watchedButton,
  .top-actions #favoritesButton,
  .top-actions #myMoviesButton,
  .top-actions .profile-menu {
    display: none;
  }

  #topSearchButton {
    display: inline-grid;
    background: transparent;
  }

  .search-open #topSearchButton {
    color: var(--accent);
  }

  .search-form {
    position: fixed;
    top: calc(var(--mobile-browser-top-offset) + var(--mobile-topbar-safe-top) + var(--mobile-topbar-top-gap));
    right: var(--mobile-topbar-edge-padding);
    bottom: auto;
    left: var(--mobile-topbar-edge-padding);
    height: 44px;
    z-index: 37;
    grid-template-columns: minmax(0, 1fr) 48px;
    width: auto;
    max-width: none;
    border-color: rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(28, 28, 28, 0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
    transition: opacity 0.14s ease, visibility 0.14s ease;
  }

  .search-suggestions {
    left: 0;
    right: 0;
    width: auto;
    max-height: calc(100dvh - var(--mobile-browser-top-offset) - var(--mobile-topbar-safe-top) - 76px);
    border-radius: 14px;
  }

  .search-open .search-form {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .search-open .menu-button,
  .search-open .mobile-title {
    opacity: 0;
    pointer-events: none;
  }

  .search-form input {
    border: 0;
    border-radius: 12px 0 0 12px;
    background: transparent;
    caret-color: var(--accent);
    padding: 0 14px;
    font-size: 16px;
  }

  .search-open .search-form,
  .search-form:focus-within {
    border-color: rgba(1, 176, 255, 0.75);
  }

  .search-open .search-form {
    filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.34));
  }

  .search-submit {
    display: grid;
    width: 48px;
    border: 0;
    border-radius: 0 12px 12px 0;
    background: transparent;
    color: var(--accent);
  }

  .search-submit svg {
    width: 22px;
    height: 22px;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: auto;
    bottom: var(--mobile-browser-bottom-offset);
    z-index: 34;
    width: 100dvw;
    max-width: 100dvw;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 8px calc(8px + var(--mobile-bottom-safe-area));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(18px);
  }

  body.ios-safari-browser .bottom-nav,
  body.telegram-ios-browser .bottom-nav {
    background: #000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .bottom-nav-button {
    min-width: 0;
    min-height: 68px;
    display: grid;
    grid-template-rows: 30px 28px;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
  }

  .bottom-nav-button > span:last-child {
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .bottom-nav-icon-svg {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
  }

  .bottom-nav-button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .bottom-nav-button.active {
    color: var(--accent);
  }

  .bottom-nav-primary svg {
    width: 28px;
    height: 28px;
  }

  .bottom-nav-primary.active {
    color: var(--accent);
  }

  .bottom-nav-icon.logo {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--muted);
    color: #020202;
    font-size: 16px;
    font-weight: 700;
  }

  .bottom-nav-button.active .bottom-nav-icon.logo {
    background: var(--accent);
  }

  .shelf-arrow {
    z-index: 24;
  }

  .side-menu {
    z-index: 45;
    inset: 0 auto 0 0;
    width: min(80vw, 320px);
    gap: 12px;
    padding: calc(28px + env(safe-area-inset-top) + var(--tg-content-safe-area-top)) 18px calc(22px + env(safe-area-inset-bottom));
  }

  .side-menu-head {
    margin: calc((16px + env(safe-area-inset-top) + var(--tg-content-safe-area-top)) * -1) -18px 0;
    padding: calc(16px + env(safe-area-inset-top) + var(--tg-content-safe-area-top)) 18px 12px;
    font-size: 22px;
  }

  .side-menu-head .round-button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .side-menu-content {
    gap: 12px;
  }

  .side-menu-section {
    gap: 6px;
    padding-bottom: 10px;
  }

  .side-menu-section summary {
    min-height: 52px;
    gap: 12px;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 20px;
  }

  .side-menu-section summary::after {
    width: 10px;
    height: 10px;
    border-right-width: 2px;
    border-bottom-width: 2px;
  }

  .side-menu .nav-option {
    min-height: 44px;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 16px;
  }

  .side-menu-catalog-picker .catalog-picker-tabs .nav-option.clearable {
    min-height: 44px;
    border-radius: 999px;
    padding: 0 14px;
    font-size: 16px;
  }

  .side-menu-catalog-picker {
    gap: 10px;
    padding: 0 0 24px;
  }

  .side-menu-catalog-heading {
    display: none;
  }

  .side-menu-catalog-picker .catalog-picker-tabs,
  .side-menu-catalog-picker .catalog-picker-options {
    gap: 4px;
  }

  .side-menu-catalog-picker .catalog-picker-options {
    gap: 8px;
  }

  .side-menu-catalog-picker .catalog-picker-tabs {
    padding-bottom: 12px;
  }

  .side-menu-catalog-picker .nav-option,
  .side-menu-catalog-picker .catalog-picker-tabs .nav-option.clearable {
    position: relative;
    width: calc(100% - 16px);
    min-height: 44px;
    justify-self: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 40px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
  }

  .side-menu-catalog-picker .nav-option > span:first-child {
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .side-menu-catalog-picker .nav-option-check,
  .side-menu-catalog-picker .nav-option-clear {
    position: absolute;
    right: 16px;
  }

  .side-menu-catalog-picker .nav-option.active,
  .side-menu-catalog-picker .catalog-picker-tabs .nav-option.clearable {
    background: #fff;
    color: #050505;
  }

  .side-menu-catalog-picker .nav-option-clear {
    width: 22px;
    height: 22px;
    color: currentColor;
    font-size: 26px;
  }

  .side-menu .nav-option small {
    min-width: 42px;
  }

  .side-menu-head {
    display: none !important;
  }

  .side-menu-backdrop {
    z-index: 44;
  }

  .movie-actions {
    align-self: start;
    justify-content: flex-end;
    gap: 6px;
  }

  .movie-action {
    min-height: 36px;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 12px;
  }

  .movie-action svg {
    width: 17px;
    height: 17px;
  }

  .movie-action.share {
    width: 36px;
  }

  .movie-action.share span {
    display: none;
  }

  .movie-action.watch-action {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden]))) {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading {
    display: contents;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading-main {
    order: 1;
    display: grid;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading h1 {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(34px, 8.5vw, 46px);
    line-height: 1.05;
    text-wrap: balance;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading p {
    width: 100%;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(15px, 4.2vw, 18px);
    line-height: 1.25;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-meta-full {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-meta-mobile {
    display: inline;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-hero-stats {
    order: 2;
    display: none;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    gap: 8px 14px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-hero-stat {
    gap: 7px;
    font-size: clamp(15px, 4.2vw, 18px);
  }

  .movie-view:not(.is-error):not([hidden]) .movie-hero-stat-icon {
    width: 20px;
    height: 20px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-actions {
    order: 5;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 8px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action.watch-action {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action.watch-action span {
    display: inline;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction {
    display: inline-flex;
    flex: 1 1 auto;
    order: 1;
    width: auto;
    min-width: min(220px, calc(100% - 100px));
    padding: 0 14px;
    background: var(--accent);
    color: #fff;
  }

  .movie-view:not(.is-error):not([hidden]) #movieFavoriteAction {
    order: 2;
  }

  .movie-view:not(.is-error):not([hidden]) #movieWatchedAction {
    order: 3;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action.icon-only span,
  .movie-view:not(.is-error):not([hidden]) #movieFavoriteAction span,
  .movie-view:not(.is-error):not([hidden]) #movieWatchedAction span {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction span {
    display: inline;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-hero-summary {
    order: 4;
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-hero-description {
    max-width: 100%;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(15px, 4.2vw, 17px);
    line-height: 1.35;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-poster-wrap {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) .player {
    order: 3;
    margin-top: 14px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-details {
    order: 5;
    display: grid;
    gap: 18px;
    width: 100%;
    margin: 26px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-details > h2 {
    display: block;
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-related-mount {
    order: 6;
    margin-top: 26px;
  }

  .movie-extra-fact.is-mobile-only {
    display: block;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-extra-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 22px;
    padding: 0;
  }

  .movie-extra-fact {
    min-width: 0;
  }

  .movie-extra-fact.is-wide,
  .movie-extra-fact.is-mobile-only {
    grid-column: 1 / -1;
  }

  .movie-extra-fact.is-wide:not(.is-mobile-only) {
    padding-top: 4px;
  }

  .movie-extra-label {
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 14px;
    line-height: 1.2;
  }

  .movie-extra-value {
    color: rgba(255, 255, 255, 0.92);
    font-size: 16px;
    line-height: 1.28;
  }

  .movie-extra-fact.is-mobile-only .movie-extra-value {
    font-size: 16px;
    line-height: 1.34;
  }

  .movie-extra-description.collapsed {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }

  .movie-extra-description-toggle {
    margin-top: 5px;
    font-size: 16px;
  }

  .movie-extra-ratings {
    gap: 10px;
  }

  .movie-extra-ratings .rating-source-value {
    font-size: 16px;
  }

  .movie-cast {
    gap: 14px;
    padding: 28px 0 0;
  }

  .movie-cast-group {
    gap: 14px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-details .movie-cast-title,
  .movie-cast-title,
  .movie-related-title {
    display: block;
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
  }

  .movie-cast-scroll,
  .movie-related-scroll {
    overflow: visible;
  }

  .movie-cast-scroll,
  .movie-cast-list {
    --shelf-card-inline-size: clamp(94px, 24vw, 118px);
  }

  .movie-related-scroll,
  .movie-related-row {
    --shelf-card-inline-size: var(--catalog-card-width);
  }

  .movie-cast-list,
  .movie-related-row {
    padding: 0;
  }

  .movie-cast-scroll .shelf-arrow,
  .movie-related-scroll .shelf-arrow {
    width: 40px;
    height: 50px;
    border-radius: 8px;
    background: rgba(14, 14, 14, 0.78);
  }

  .movie-cast-scroll .shelf-arrow {
    top: calc(var(--shelf-card-inline-size) * 1.25 / 2);
  }

  .movie-related-scroll .shelf-arrow {
    top: calc(var(--shelf-card-inline-size) * 1.5 / 2);
  }

  .movie-cast-scroll .shelf-arrow.prev,
  .movie-related-scroll .shelf-arrow.prev {
    left: 8px;
  }

  .movie-cast-scroll .shelf-arrow.next,
  .movie-related-scroll .shelf-arrow.next {
    right: 8px;
  }

  .movie-related {
    gap: 8px;
    margin-top: 6px;
    padding: 0;
  }

  .back-link {
    display: none;
  }
}

@media (min-width: 901px) {
  html,
  body {
    min-height: 100%;
  }

  .app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .home-view:not([hidden]),
  .movie-view:not([hidden]) {
    flex: 1 0 auto;
  }

  .movie-view:not([hidden]) {
    padding-top: 0;
  }

  .movie-page {
    gap: 24px;
  }

  .movie-heading {
    gap: 12px 18px;
  }

  .player {
    width: min(100%, 1280px);
    max-height: min(72vh, 720px);
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .movie-view.is-error .movie-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    align-items: start;
  }

  .movie-view.is-error .movie-heading-main {
    grid-column: 1;
    grid-row: 1;
  }

  .movie-view.is-error .movie-actions {
    grid-column: 2;
    grid-row: 1;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
  }

  .movie-view.is-error .movie-action {
    width: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 10px;
  }

  .movie-view.is-error .movie-action span {
    display: none;
  }
}

@media (max-width: 900px) {
  html:has(.watch-party:not([hidden])),
  body:has(.watch-party:not([hidden])),
  html.watch-party-active,
  body.watch-party-active {
    height: auto;
    min-height: var(--watch-party-viewport-height, 100dvh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  body:has(.watch-party:not([hidden])) .app-shell,
  body.watch-party-active .app-shell {
    height: auto;
    min-height: var(--watch-party-viewport-height, 100dvh);
    overflow: visible;
  }

  .movie-view:has(.watch-party:not([hidden])),
  body.watch-party-active .movie-view:not([hidden]),
  .movie-page:has(.watch-party:not([hidden])),
  body.watch-party-active .movie-page,
  .movie-page:has(.watch-party:not([hidden])) .watch-party,
  body.watch-party-active .watch-party,
  .movie-page:has(.watch-party:not([hidden])) .watch-party-body,
  body.watch-party-active .watch-party-body {
    height: auto;
    overflow: visible;
  }

  .movie-page:has(.watch-party:not([hidden])),
  body.watch-party-active .movie-page {
    gap: 18px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-body,
  body.watch-party-active .watch-party-body {
    gap: 12px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-chat,
  body.watch-party-active .watch-party-chat {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-messages,
  body.watch-party-active .watch-party-messages {
    flex: 0 0 auto;
    height: clamp(136px, 24dvh, 220px);
    min-height: 136px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-form,
  body.watch-party-active .watch-party-form {
    flex: 0 0 auto;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-heading,
  body.watch-party-active .movie-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: start;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-heading-main,
  body.watch-party-active .movie-heading-main {
    grid-column: 1;
    grid-row: 1;
    gap: 4px;
    min-width: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-heading h1,
  body.watch-party-active .movie-heading h1 {
    font-size: clamp(28px, 7.2vw, 34px);
    line-height: 1.04;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-heading p,
  body.watch-party-active .movie-heading p {
    font-size: clamp(15px, 4vw, 17px);
    line-height: 1.2;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-actions,
  body.watch-party-active .movie-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-action,
  body.watch-party-active .movie-action {
    flex: 0 0 54px;
    width: 54px;
    min-width: 54px;
    min-height: 54px;
    border-radius: 12px;
    padding: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-action svg,
  body.watch-party-active .movie-action svg {
    width: 25px;
    height: 25px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) #movieWatchedAction,
  body.watch-party-active #movieWatchedAction {
    order: 1;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) #movieFavoriteAction,
  body.watch-party-active #movieFavoriteAction {
    order: 2;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) #moviePartyAction,
  body.watch-party-active #moviePartyAction {
    order: 3;
    flex: 0 0 54px;
    width: 54px;
    min-width: 54px;
    background: rgba(1, 176, 255, 0.1);
    border-color: rgba(1, 176, 255, 0.68);
    color: var(--accent);
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) #movieTheaterAction,
  body.watch-party-active #movieTheaterAction,
  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) #moviePartyAction span,
  body.watch-party-active #moviePartyAction span {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .movie-action.icon-only span,
  body.watch-party-active .movie-action.icon-only span {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:has(.watch-party:not([hidden])) .player,
  body.watch-party-active .player {
    margin-top: 10px;
  }
}

@media (max-width: 900px) {
  .movie-view:not(.is-error):not([hidden]) .movie-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    align-items: start;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading-main {
    grid-column: 1;
    grid-row: 1;
    gap: 3px;
    min-width: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading h1 {
    font-size: clamp(26px, 6.9vw, 32px);
    line-height: 1.03;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading p {
    font-size: clamp(14px, 3.7vw, 16px);
    line-height: 1.18;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action {
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 11px;
    padding: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action svg {
    width: 23px;
    height: 23px;
  }

  .movie-view:not(.is-error):not([hidden]) #movieWatchedAction {
    order: 1;
  }

  .movie-view:not(.is-error):not([hidden]) #movieFavoriteAction {
    order: 2;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction {
    order: 3;
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    background: rgba(1, 176, 255, 0.1);
    border-color: rgba(1, 176, 255, 0.68);
    color: var(--accent);
  }

  .movie-view:not(.is-error):not([hidden]) #movieTheaterAction,
  .movie-view:not(.is-error):not([hidden]) #moviePartyAction span,
  .movie-view:not(.is-error):not([hidden]) .movie-action.icon-only span {
    display: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page,
  .movie-page:has(.watch-party:not([hidden])),
  body.watch-party-active .movie-page {
    gap: 14px;
  }

  .movie-view:not(.is-error):not([hidden]) .player,
  body.watch-party-active .player {
    margin-top: 6px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-body,
  body.watch-party-active .watch-party-body {
    gap: 10px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-room-card .watch-party-main,
  body.watch-party-active .watch-party-room-card .watch-party-main {
    padding: 8px 10px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-section-head,
  body.watch-party-active .watch-party-section-head,
  .movie-page:has(.watch-party:not([hidden])) .watch-party-chat-head,
  body.watch-party-active .watch-party-chat-head {
    padding: 10px 12px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-section-title,
  body.watch-party-active .watch-party-section-title {
    font-size: 20px;
    line-height: 1.1;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-pinned,
  body.watch-party-active .watch-party-pinned {
    margin: 8px 8px 0;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-pinned-slide,
  body.watch-party-active .watch-party-pinned-slide {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    min-height: 54px;
    padding: 8px 34px 8px 8px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-pinned-icon,
  body.watch-party-active .watch-party-pinned-icon {
    width: 32px;
    height: 32px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-messages,
  body.watch-party-active .watch-party-messages {
    height: clamp(110px, 20dvh, 170px);
    min-height: 110px;
  }

  .movie-page:has(.watch-party:not([hidden])) .watch-party-form,
  body.watch-party-active .watch-party-form {
    padding: 10px;
  }
}

body.watch-party-theater .app-shell,
body.watch-party-theater .movie-view:not([hidden]),
body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) {
  transform: none !important;
}

body.watch-party-theater .movie-page:has(.watch-party:not([hidden])) .player {
  margin: 0 !important;
  max-height: none !important;
}

body.watch-party-theater.watch-party-panel-collapsed .movie-page:has(.watch-party:not([hidden])) .player {
  margin-right: 0 !important;
}

body.watch-party-theater .watch-party-pinned {
  position: relative !important;
  margin: 10px 10px 0;
}

body.watch-party-theater .watch-party-pinned-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  bottom: auto !important;
  left: auto !important;
  inset-block-start: 10px !important;
  inset-inline-end: 10px !important;
  z-index: 10;
  margin: 0 !important;
  transform: none !important;
}

.movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden]))) .movie-details-main {
  display: none;
}

.movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden]))) .movie-extra-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px clamp(34px, 4vw, 64px);
  width: 100%;
  max-width: none;
  margin-top: 0;
}

.movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden]))) .movie-extra-fact.is-wide {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .movie-page:has(.watch-party:not([hidden])) .movie-details,
  .movie-page:has(.watch-party:not([hidden])) .movie-details-main,
  .movie-page:has(.watch-party:not([hidden])) .movie-extra-facts,
  .movie-page:has(.watch-party:not([hidden])) .movie-cast,
  .movie-page:has(.watch-party:not([hidden])) .movie-related-mount,
  body.watch-party-active .movie-details,
  body.watch-party-active .movie-details-main,
  body.watch-party-active .movie-extra-facts,
  body.watch-party-active .movie-cast,
  body.watch-party-active .movie-related-mount {
    display: none !important;
  }

  html.watch-party-active:not(.watch-party-keyboard-open),
  body.watch-party-active:not(.watch-party-keyboard-open) {
    height: var(--watch-party-viewport-height, 100dvh);
    min-height: 0;
    overflow: hidden;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .app-shell {
    height: var(--watch-party-viewport-height, 100dvh);
    min-height: 0;
    overflow: hidden;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-view:not([hidden]),
  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page {
    grid-template-rows: auto auto minmax(0, 1fr);
    align-items: stretch;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party,
  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-body {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-body {
    display: flex;
    flex-direction: column;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-chat {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-messages {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-y: auto;
  }
}

@media (max-width: 900px) {
  .app-topbar .back-link,
  .app-topbar .back-link:visited,
  .app-topbar .back-link:hover,
  .app-topbar .back-link:focus,
  .app-topbar .back-link:active {
    color: #fff !important;
    opacity: 1 !important;
  }

  .app-topbar .back-link svg,
  .app-topbar .back-link svg * {
    color: #fff !important;
    stroke: currentColor !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading,
  body.watch-party-active .movie-heading {
    order: 1;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 8px;
    align-items: start;
    width: 100%;
    min-width: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading-main,
  body.watch-party-active .movie-heading-main {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading h1,
  body.watch-party-active .movie-heading h1 {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(30px, 7.7vw, 40px) !important;
    line-height: 1.04 !important;
    text-wrap: balance;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading p,
  body.watch-party-active .movie-heading p {
    width: 100%;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(14px, 3.7vw, 16px) !important;
    line-height: 1.18 !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-actions,
  body.watch-party-active .movie-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    display: inline-flex !important;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    width: auto !important;
    max-width: none;
    min-width: 0;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action,
  body.watch-party-active .movie-action {
    flex: 0 0 48px !important;
    width: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-radius: 11px !important;
    padding: 0 !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action svg,
  body.watch-party-active .movie-action svg {
    width: 23px !important;
    height: 23px !important;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction {
    order: 3;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.13) !important;
    color: #fff !important;
  }

  body.watch-party-active #moviePartyAction {
    order: 3;
    background: rgba(1, 176, 255, 0.1) !important;
    border-color: rgba(1, 176, 255, 0.68) !important;
    color: var(--accent) !important;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction span,
  body.watch-party-active #moviePartyAction span,
  .movie-view:not(.is-error):not([hidden]) .movie-action.icon-only span,
  body.watch-party-active .movie-action.icon-only span {
    display: none !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 12px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party {
    grid-row: 3;
    align-self: stretch;
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-body {
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-chat {
    display: flex !important;
    flex: 1 1 0;
    flex-direction: column;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-messages {
    flex: 1 1 0;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-form {
    flex: 0 0 auto;
  }
}

@media (max-width: 900px) {
  body.watch-party-active:not(.watch-party-keyboard-open) .app-shell {
    height: var(--watch-party-viewport-height, 100dvh) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-left: calc(20px + var(--tg-content-safe-area-left)) !important;
    padding-right: calc(20px + var(--tg-content-safe-area-right)) !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom) + var(--tg-content-safe-area-bottom)) !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-view:not([hidden]) {
    height: 100% !important;
    min-height: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page {
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: 32px !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .player,
  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party,
  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-room-card,
  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-chat {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party {
    display: flex;
    flex-direction: column;
    grid-row: 3;
    align-self: stretch;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 16px;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-main {
    flex: 0 0 auto;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-chat {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-messages {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-form {
    flex: 0 0 auto;
  }
}

@media (min-width: 901px) {
  html.watch-party-active,
  body.watch-party-active {
    height: 100dvh !important;
    overflow: hidden !important;
  }

  body:has(.watch-party:not([hidden])) .desktop-rail,
  body:has(.watch-party:not([hidden])) .bottom-nav,
  body.watch-party-theater .desktop-rail,
  body.watch-party-theater .bottom-nav,
  body.watch-party-active .desktop-rail,
  body.watch-party-active .bottom-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body:has(.watch-party:not([hidden])) .app-shell,
  body.watch-party-theater .app-shell,
  body.watch-party-active .app-shell {
    padding-top: 0 !important;
    padding-left: 0 !important;
  }

  body:has(.watch-party:not([hidden])) .topbar,
  body.watch-party-theater .topbar,
  body.watch-party-active .topbar {
    left: 0 !important;
  }

  body:has(.watch-party:not([hidden])) .side-menu,
  body:has(.watch-party:not([hidden])) .side-menu-backdrop,
  body.watch-party-theater .side-menu,
  body.watch-party-theater .side-menu-backdrop,
  body.watch-party-active .side-menu,
  body.watch-party-active .side-menu-backdrop {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.watch-party-active .movie-page:has(.watch-party:not([hidden])) .movie-actions {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .movie-view:not(.is-error):not([hidden]) .movie-heading h1 {
    color: #fff !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-heading p {
    color: rgba(255, 255, 255, 0.82) !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-actions {
    gap: 8px !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action {
    flex: 0 0 50px !important;
    width: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    border-radius: 11px !important;
    padding: 0 !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-action svg {
    width: 24px !important;
    height: 24px !important;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction {
    flex: 0 0 50px !important;
    width: 50px !important;
    min-width: 50px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.13) !important;
    color: #fff !important;
  }

  body.watch-party-active #moviePartyAction {
    background: rgba(1, 176, 255, 0.1) !important;
    border-color: rgba(1, 176, 255, 0.68) !important;
    color: var(--accent) !important;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction span {
    display: none !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-details,
  .movie-view:not(.is-error):not([hidden]) .movie-details-text,
  .movie-view:not(.is-error):not([hidden]) .description-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden]))) .movie-details-main {
    display: none !important;
  }

  .movie-view:not(.is-error):not([hidden]) .description,
  .movie-view:not(.is-error):not([hidden]) .movie-extra-description {
    width: 100% !important;
    max-width: 100% !important;
    color: #fff !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-extra-fact.is-mobile-only,
  .movie-view:not(.is-error):not([hidden]) .movie-extra-fact.is-wide {
    grid-column: 1 / -1 !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page,
  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page {
    gap: 12px !important;
  }

  .movie-view:not(.is-error):not([hidden]),
  .movie-view:not(.is-error):not([hidden]) .movie-page:not(:has(.watch-party:not([hidden]))) {
    background: #000 !important;
    box-shadow: none !important;
    filter: none !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-page::before,
  .movie-view:not(.is-error):not([hidden]) .movie-page::after {
    content: none !important;
  }

  .movie-view:not(.is-error):not([hidden]) .player {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 2px !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    filter: none !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page {
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .player {
    grid-row: 2 !important;
    align-self: start !important;
    justify-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 2px !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party {
    grid-row: 3 !important;
    height: 100% !important;
    min-height: 0 !important;
    margin-top: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-body {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-chat {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-messages {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  body.watch-party-active.watch-party-keyboard-open .app-shell {
    height: auto !important;
    min-height: var(--watch-party-layout-height, 100dvh) !important;
    overflow: visible !important;
  }

  body.watch-party-active.watch-party-keyboard-open .movie-view:not([hidden]),
  body.watch-party-active.watch-party-keyboard-open .movie-page,
  body.watch-party-active.watch-party-keyboard-open .watch-party,
  body.watch-party-active.watch-party-keyboard-open .watch-party-body {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.watch-party-active.watch-party-keyboard-open .movie-page {
    display: grid !important;
    grid-template-rows: auto auto auto !important;
    gap: 32px !important;
    padding-bottom: 0 !important;
  }

  body.watch-party-active.watch-party-keyboard-open .watch-party {
    max-height: none !important;
    margin-bottom: 0 !important;
  }

  body.watch-party-active.watch-party-keyboard-open .watch-party-body {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
  }

  body.watch-party-active.watch-party-keyboard-open .watch-party-room-card {
    flex: 0 0 auto;
  }

  body.watch-party-active.watch-party-keyboard-open .watch-party-chat {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column;
    height: clamp(360px, 52vh, 520px) !important;
    min-height: 360px !important;
    max-height: none !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-body {
    gap: 10px;
  }

body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-chat {
    height: clamp(420px, 64vh, 640px) !important;
    min-height: 420px !important;
    margin-bottom: 0 !important;
  }

  body.watch-party-active.watch-party-keyboard-open .watch-party-messages {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
  }

  body.watch-party-active.watch-party-keyboard-open .watch-party-form {
    flex: 0 0 auto !important;
  }
}

html.player-overlay-open {
  scrollbar-gutter: auto;
}

html.player-overlay-open,
body.player-overlay-open {
  width: 100%;
  height: 100dvh;
  overflow: hidden !important;
}

body.player-overlay-open .app-shell:has(.player.is-fs),
body.player-overlay-open .app-shell:has(.player.is-watch-open) {
  width: 100%;
  min-height: 100dvh;
  padding: 0 !important;
  overflow: hidden !important;
}

body.player-overlay-open .player.is-fs,
body.player-overlay-open .player.is-watch-open {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483601 !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100dvh !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  aspect-ratio: auto !important;
  justify-self: stretch !important;
  align-self: stretch !important;
}

body.player-overlay-open .player.is-fs .direct-player,
body.player-overlay-open .player.is-watch-open .direct-player {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  border-radius: 0;
}

@media (max-width: 760px) {
  body.player-overlay-open .direct-player-topbar {
    padding: calc(12px + env(safe-area-inset-top)) 54px 50px 14px;
  }

  body.player-overlay-open .direct-player-title-stack {
    max-width: calc(100dvw - 82px);
  }

  body.player-overlay-open .direct-player-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: clamp(18px, 6vw, 24px);
    line-height: 1.08;
    white-space: normal;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  body.player-overlay-open .direct-player-episode-title {
    font-size: 13px;
  }

  body.player-overlay-open .direct-player-bottom-panel {
    min-height: 0 !important;
    padding: 0 10px calc(8px + env(safe-area-inset-bottom)) !important;
    gap: 8px !important;
  }

  body.player-overlay-open .direct-player-progress-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    min-height: 38px;
  }

  body.player-overlay-open .direct-player-time {
    width: max-content;
    min-width: 48px;
    max-width: 100%;
    font-size: 13px;
    line-height: 1;
  }

  body.player-overlay-open .direct-player-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    min-height: 0 !important;
  }

  body.player-overlay-open .direct-player-panel-left,
  body.player-overlay-open .direct-player-panel-right {
    width: 100%;
    min-width: 0;
    gap: 6px;
  }

  body.player-overlay-open .direct-player-panel-left {
    justify-content: flex-start;
  }

  body.player-overlay-open .direct-player-panel-right {
    justify-content: space-between;
    flex-wrap: nowrap;
    align-content: center;
    overflow: visible;
  }

  body.player-overlay-open .direct-player-panel-btn,
  body.player-overlay-open .direct-player-option-btn {
    height: 34px;
    min-width: 34px;
    min-height: 34px;
  }

  body.player-overlay-open .direct-player-panel-btn svg,
  body.player-overlay-open .direct-player-option-icon svg {
    width: 23px;
    height: 23px;
  }

  body.player-overlay-open .direct-player-panel-btn img,
  body.player-overlay-open .direct-player-option-icon img,
  body.player-overlay-open .direct-player-settings-row-icon img,
  body.player-overlay-open .direct-player-settings-quality-icon,
  body.player-overlay-open .direct-player-quality-icon {
    width: 23px;
    height: 23px;
  }

  body.player-overlay-open .direct-player-option-btn {
    flex: 0 1 auto;
    max-width: none;
    gap: 4px;
    padding: 0 4px;
  }

  body.player-overlay-open .direct-player-option-text {
    display: none;
  }

  body.player-overlay-open .direct-player-option-btn small {
    display: block;
    max-width: 44px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.player-overlay-open .direct-player-option-btn.compact {
    max-width: none;
    padding: 0 4px;
  }

  body.player-overlay-open .direct-player-volume-wrap {
    min-width: 34px;
    min-height: 34px;
  }

  body.player-overlay-open .direct-player-menu {
    max-width: calc(100dvw - 20px);
    max-height: 48dvh;
  }

  body.player-overlay-open .direct-player-series-menu {
    left: 0;
    right: auto;
  }

  body.player-overlay-open .direct-player-skip-intro {
    bottom: 118px;
    max-width: calc(100dvw - 24px);
    min-height: 42px;
    font-size: 15px;
  }
}

@media (max-width: 430px) {
  body.player-overlay-open .direct-player-panel-left,
  body.player-overlay-open .direct-player-panel-right {
    gap: 4px;
  }

  body.player-overlay-open .direct-player-panel-btn,
  body.player-overlay-open .direct-player-option-btn {
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  body.player-overlay-open .direct-player-panel-btn svg,
  body.player-overlay-open .direct-player-option-icon svg {
    width: 21px;
    height: 21px;
  }

  body.player-overlay-open .direct-player-option-btn small {
    max-width: 34px;
    font-size: 9px;
  }
}

@media (max-width: 900px) {
  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page {
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: clamp(10px, 2.2dvh, 18px) !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .player {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: min(32dvh, 270px) !important;
    border-radius: 0 !important;
    background: #050505 !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .player iframe {
    background: #050505;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party {
    min-height: 0 !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-body {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: clamp(8px, 1.4dvh, 12px) !important;
    min-height: 0 !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-room-card {
    min-height: 0 !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-chat {
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto !important;
    height: 100% !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-pinned {
    margin-top: 6px !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-messages {
    height: auto !important;
    min-height: 0 !important;
    overscroll-behavior: contain;
    overflow-y: auto !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-form {
    min-height: 66px !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom) + var(--tg-content-safe-area-bottom)) !important;
  }
}

@media (max-width: 430px) {
  body.watch-party-active:not(.watch-party-keyboard-open) .player {
    max-height: 28dvh !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-section-head,
  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-chat-head {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-pinned-slide {
    min-height: 48px !important;
  }
}

@media (max-width: 760px) {
  .direct-player-series-wrap .direct-player-option-btn {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .direct-player-series-wrap .direct-player-option-icon {
    margin: 0 !important;
  }

  .direct-player-series-wrap .direct-player-option-text,
  .direct-player-series-wrap .direct-player-option-btn small {
    display: none !important;
  }
}

@media (max-width: 900px) {
  html.watch-party-active:not(.watch-party-keyboard-open),
  body.watch-party-active:not(.watch-party-keyboard-open) {
    height: var(--watch-party-viewport-height, 100dvh) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    overscroll-behavior-y: none;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .app-shell {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    align-items: stretch !important;
    height: var(--watch-party-viewport-height, 100dvh) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom) + var(--tg-content-safe-area-bottom)) !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .topbar {
    grid-row: 1 !important;
    min-height: 0 !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-view:not([hidden]) {
    grid-row: 2 !important;
    height: var(--watch-party-content-height, 100%) !important;
    max-height: var(--watch-party-content-height, 100%) !important;
    min-height: 0 !important;
    padding-bottom: 0 !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-view:not([hidden]),
  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page,
  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party,
  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-body {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-view:not([hidden]) {
    height: var(--watch-party-content-height, 100%) !important;
    max-height: var(--watch-party-content-height, 100%) !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page {
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    align-items: stretch !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-body {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: clamp(8px, 1.4dvh, 12px) !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-room-card {
    max-height: clamp(62px, 12dvh, 118px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-room-card:not(.is-collapsed) .watch-party-main {
    max-height: clamp(0px, calc(12dvh - 46px), 62px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-room-card:not(.is-collapsed) .watch-party-participants {
    gap: 8px !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-chat {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-messages {
    flex: 1 1 0 !important;
    height: 0 !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-form {
    display: grid !important;
    flex: 0 0 auto !important;
    min-height: 66px !important;
    margin-bottom: 0 !important;
    position: relative !important;
    z-index: 4 !important;
  }
}

@media (max-width: 430px) {
  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-messages {
    height: 0 !important;
    max-height: none !important;
    min-height: 0 !important;
  }
}

@media (max-width: 760px) {
  .player:not(.is-fs):not(.is-watch-open) .direct-player-topbar {
    padding: 14px 14px 58px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-title-stack {
    max-width: calc(100% - 28px) !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-title {
    overflow: hidden !important;
    font-size: clamp(18px, 5.4vw, 24px) !important;
    line-height: 1.08 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-episode-title {
    font-size: clamp(13px, 3.6vw, 16px) !important;
    line-height: 1.1 !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-bottom-panel {
    min-height: 102px !important;
    gap: 4px !important;
    padding: 0 12px 10px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress-row {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 8px !important;
    min-height: 26px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-time {
    min-width: 40px !important;
    font-size: clamp(12px, 3.2vw, 15px) !important;
    white-space: nowrap !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 40px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-left,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-right {
    min-width: 0 !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-left {
    justify-content: flex-start !important;
    overflow: hidden !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-right {
    justify-content: flex-end !important;
    overflow: visible !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-btn {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn svg,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-icon svg {
    width: 23px !important;
    height: 23px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn img,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-icon img,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-settings-quality-icon,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-quality-icon {
    width: 23px !important;
    height: 23px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-volume-wrap {
    min-width: 34px !important;
    min-height: 34px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-volume,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-volume-tip,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-text,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-btn small {
    display: none !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-series-wrap .direct-player-option-btn {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-menu {
    max-width: calc(100vw - 24px) !important;
    max-height: 46dvh !important;
  }
}

@media (max-width: 430px) {
  .player:not(.is-fs):not(.is-watch-open) .direct-player-bottom-panel {
    min-height: 94px !important;
    padding-inline: 10px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-toolbar {
    gap: 4px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-left,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-right {
    gap: 3px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-btn,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-volume-wrap {
    width: 31px !important;
    min-width: 31px !important;
    max-width: 31px !important;
    height: 31px !important;
    min-height: 31px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn svg,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-icon svg {
    width: 21px !important;
    height: 21px !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .direct-player-hover-time {
    display: none !important;
  }

  .direct-player-progress {
    height: 22px;
    touch-action: pan-x;
  }

  .direct-player-toolbar:has(.direct-player-panel-btn:hover, .direct-player-panel-btn:focus-visible, .direct-player-option-btn:hover, .direct-player-option-btn:focus-visible) .direct-player-panel-btn,
  .direct-player-toolbar:has(.direct-player-panel-btn:hover, .direct-player-panel-btn:focus-visible, .direct-player-option-btn:hover, .direct-player-option-btn:focus-visible) .direct-player-option-btn {
    color: #fff;
    opacity: 1;
  }

  .player.has-player-menu-open .direct-player-panel-btn,
  .player.has-player-menu-open .direct-player-option-btn {
    color: rgba(255, 255, 255, 0.56) !important;
    opacity: 0.72 !important;
  }

  .player.has-player-settings-window .direct-player-settings-btn,
  .player.has-player-serial-window .direct-player-series-wrap .direct-player-option-btn {
    color: #fff !important;
    opacity: 1 !important;
  }
}

@media (max-width: 760px) {
  body.player-overlay-open .direct-player-progress-row,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress-row {
    grid-template-columns: auto minmax(72px, 1fr) auto !important;
    gap: 8px !important;
  }

  body.player-overlay-open .direct-player-time,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-time {
    min-width: 44px !important;
    font-size: 13px !important;
  }

  body.player-overlay-open .direct-player-progress-wrap,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress-wrap {
    height: 30px;
  }

  body.player-overlay-open .direct-player-menu,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-menu {
    max-height: min(52dvh, 430px) !important;
  }
}

@media (max-width: 430px) {
  body.player-overlay-open .direct-player-panel-btn,
  body.player-overlay-open .direct-player-option-btn {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 36px;
  }

  body.player-overlay-open .direct-player-progress-row,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress-row {
    grid-template-columns: auto minmax(58px, 1fr) auto !important;
    gap: 6px !important;
  }

  body.player-overlay-open .direct-player-time,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-time {
    min-width: 38px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 360px) {
  body.player-overlay-open .direct-player-bottom-panel,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-bottom-panel {
    padding-inline: 8px !important;
  }

  body.player-overlay-open .direct-player-progress-row,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress-row {
    grid-template-columns: auto minmax(46px, 1fr) auto !important;
    gap: 4px !important;
  }

  body.player-overlay-open .direct-player-time,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-time {
    min-width: 34px !important;
    font-size: 11px !important;
  }

  body.player-overlay-open .direct-player-panel-btn,
  body.player-overlay-open .direct-player-option-btn,
  body.player-overlay-open .direct-player-volume-wrap {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 34px;
    min-height: 34px;
  }
}

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  body.player-overlay-open .direct-player-topbar {
    padding: calc(8px + env(safe-area-inset-top)) 52px 36px 12px;
  }

  body.player-overlay-open .direct-player-bottom-panel {
    padding: 0 10px calc(5px + env(safe-area-inset-bottom)) !important;
    gap: 4px !important;
  }

  body.player-overlay-open .direct-player-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  body.player-overlay-open .direct-player-panel-left,
  body.player-overlay-open .direct-player-panel-right {
    width: auto;
    flex: 0 1 auto;
    gap: 5px;
  }

  body.player-overlay-open .direct-player-panel-right {
    justify-content: flex-end;
  }

  body.player-overlay-open .direct-player-menu {
    bottom: calc(100% + 6px);
    max-height: min(48dvh, 250px) !important;
  }

  body.player-overlay-open .direct-player-series-menu {
    left: auto;
    right: -2px;
  }

  body.player-overlay-open .direct-player-resume,
  body.player-overlay-open .direct-player-next,
  body.player-overlay-open .direct-player-ended,
  body.player-overlay-open .direct-player-skip-intro {
    bottom: 92px;
  }
}

@media (max-width: 760px) {
  .direct-player-topbar,
  .player-title-overlay {
    display: none !important;
  }

  body.player-overlay-open .direct-player-resume {
    width: min(340px, calc(100dvw - 24px)) !important;
    min-width: 0 !important;
    max-width: calc(100dvw - 24px) !important;
    gap: 11px !important;
    padding: 14px !important;
  }

  body.player-overlay-open .direct-player-resume-text {
    max-width: 100% !important;
    font-size: clamp(14px, 4vw, 16px) !important;
    line-height: 1.14 !important;
  }

  body.player-overlay-open .direct-player-resume-actions {
    width: 100% !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  body.player-overlay-open .direct-player-resume-action {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-bottom-panel {
    min-height: 76px !important;
    gap: 2px !important;
    padding: 0 8px 6px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress-row {
    grid-template-columns: auto minmax(64px, 1fr) auto !important;
    gap: 6px !important;
    min-height: 22px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-time {
    min-width: 36px !important;
    font-size: 12px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress-wrap {
    height: 20px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress {
    height: 12px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress::-webkit-slider-runnable-track {
    height: 4px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress::-webkit-slider-thumb {
    width: 12px !important;
    height: 12px !important;
    margin-top: -4px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress::-moz-range-track {
    height: 4px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-progress::-moz-range-thumb {
    width: 12px !important;
    height: 12px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-toolbar {
    gap: 4px !important;
    min-height: 32px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-left,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-right {
    gap: 3px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-btn,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-volume-wrap,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-series-wrap .direct-player-option-btn {
    width: 31px !important;
    min-width: 31px !important;
    max-width: 31px !important;
    height: 31px !important;
    min-height: 31px !important;
    padding: 0 !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn svg,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-icon svg,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn img,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-icon img,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-settings-quality-icon,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-quality-icon {
    width: 20px !important;
    height: 20px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-resume {
    top: 50% !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(300px, calc(100% - 24px)) !important;
    min-width: 0 !important;
    max-width: calc(100% - 24px) !important;
    gap: 10px !important;
    padding: 12px !important;
    transform: translate(-50%, -50%) !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-resume-text {
    max-width: 100% !important;
    font-size: clamp(13px, 3.7vw, 15px) !important;
    line-height: 1.12 !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-resume-actions {
    width: 100% !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-resume-action {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-menu {
    bottom: calc(100% + 5px) !important;
    width: min(280px, calc(100vw - 18px)) !important;
    min-width: min(230px, calc(100vw - 18px)) !important;
    max-width: calc(100vw - 18px) !important;
    max-height: min(42dvh, 260px) !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-menu-item,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-settings-row,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-settings-header {
    min-height: 42px !important;
    padding-inline: 10px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-settings-title {
    font-size: 18px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-settings-row-title,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-menu-label {
    font-size: 14px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-settings-row-value,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-menu-value {
    font-size: 13px !important;
  }
}

@media (max-width: 430px) {
  body.player-overlay-open .direct-player-resume,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-resume {
    width: calc(100% - 18px) !important;
    max-width: calc(100% - 18px) !important;
    padding: 10px !important;
  }

  body.player-overlay-open .direct-player-resume-text,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-resume-text {
    font-size: 13px !important;
  }

  body.player-overlay-open .direct-player-resume-action,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-resume-action {
    min-height: 36px !important;
    padding-inline: 8px !important;
    font-size: 13px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-bottom-panel {
    min-height: 70px !important;
    padding: 0 7px 5px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-time {
    min-width: 34px !important;
    font-size: 11px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-btn,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-volume-wrap,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-series-wrap .direct-player-option-btn {
    width: 29px !important;
    min-width: 29px !important;
    max-width: 29px !important;
    height: 29px !important;
    min-height: 29px !important;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn svg,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-icon svg,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-panel-btn img,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-option-icon img,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-settings-quality-icon,
  .player:not(.is-fs):not(.is-watch-open) .direct-player-quality-icon {
    width: 18px !important;
    height: 18px !important;
  }
}

@media (max-width: 900px) {
  body.watch-party-active:not(.watch-party-keyboard-open) .movie-page {
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: 32px !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    gap: 10px !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-body {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    gap: 16px !important;
    overflow: hidden !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-room-card {
    flex: 0 0 auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-room-card:not(.is-collapsed) .watch-party-main,
  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-room-card .watch-party-main {
    max-height: 64px !important;
    overflow: visible !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-chat {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
    position: relative !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-messages {
    flex: 1 1 0 !important;
    height: 0 !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding-bottom: 10px !important;
  }

  body.watch-party-active:not(.watch-party-keyboard-open) .watch-party-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 42px !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
    margin-bottom: 0 !important;
    padding: 12px !important;
    position: relative !important;
    z-index: 1 !important;
  }

  body.watch-party-active.ios-safari-browser::after,
  body.watch-party-active.telegram-ios-browser::after {
    content: none !important;
    display: none !important;
  }

  body.watch-party-active .bottom-nav,
  body.watch-party-active .site-footer {
    display: none !important;
  }

  body.watch-party-active::after {
    content: none !important;
    display: none !important;
  }

  body.watch-party-active .app-shell {
    padding-bottom: 0 !important;
  }

  body.watch-party-active.watch-party-keyboard-open .watch-party-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  body.watch-party-active.watch-party-keyboard-open .watch-party-room-card {
    flex: 0 0 auto !important;
  }

  body.watch-party-active.watch-party-keyboard-open .watch-party-chat {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    height: clamp(560px, 72vh, 720px) !important;
    min-height: min(560px, calc(var(--watch-party-layout-height, 100dvh) - 260px)) !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-chat {
    height: clamp(560px, 72vh, 720px) !important;
    min-height: min(560px, calc(var(--watch-party-layout-height, 100dvh) - 260px)) !important;
  }
}

@media (max-width: 900px) {
  html.watch-party-active,
  body.watch-party-active {
    width: 100% !important;
    height: var(--watch-party-viewport-height, 100dvh) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    overscroll-behavior-y: none !important;
  }

  body.watch-party-active {
    position: static !important;
    inset: auto !important;
  }

  body.watch-party-active .app-shell,
  body.watch-party-active .movie-view:not([hidden]),
  body.watch-party-active .movie-page,
  body.watch-party-active .watch-party,
  body.watch-party-active .watch-party-body {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active .app-shell {
    padding-bottom: 0 !important;
  }

  body.watch-party-active .watch-party-chat {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-active .watch-party-messages {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 900px) {
  html.watch-party-active,
  body.watch-party-active {
    width: 100% !important;
    height: var(--watch-party-viewport-height, 100dvh) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    overscroll-behavior-y: none !important;
  }

  html.watch-party-keyboard-open,
  body.watch-party-keyboard-open {
    height: var(--watch-party-layout-height, 100dvh) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
  }

  body.watch-party-active {
    position: static !important;
    inset: auto !important;
  }

  body.watch-party-active .bottom-nav,
  body.watch-party-active .site-footer {
    display: none !important;
  }

  body.watch-party-active::after,
  body.watch-party-active.ios-safari-browser::after,
  body.watch-party-active.telegram-ios-browser::after {
    content: none !important;
    display: none !important;
  }

  body.watch-party-active .app-shell {
    height: var(--watch-party-viewport-height, 100dvh) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom) + var(--tg-content-safe-area-bottom)) !important;
  }

  body.watch-party-keyboard-open .app-shell {
    height: auto !important;
    min-height: var(--watch-party-layout-height, 100dvh) !important;
    overflow: visible !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(18px + env(safe-area-inset-bottom) + var(--tg-content-safe-area-bottom)) !important;
  }

  body.watch-party-active .movie-view:not([hidden]) {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transition: none !important;
  }

  body.watch-party-keyboard-open .movie-view:not([hidden]) {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.watch-party-active .movie-page {
    height: 100% !important;
    min-height: 0 !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: 32px !important;
    align-items: stretch !important;
    overflow: hidden !important;
    transform: translate3d(0, calc(-1 * var(--watch-party-keyboard-shift, 0px)), 0) !important;
    transition: none !important;
  }

  body.watch-party-keyboard-open .movie-page {
    height: auto !important;
    min-height: 0 !important;
    grid-template-rows: auto auto auto !important;
    gap: 32px !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
  }

  body.watch-party-active .watch-party {
    align-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-keyboard-open .watch-party {
    height: auto !important;
    max-height: 100% !important;
    overflow: visible !important;
  }

  body.watch-party-active .watch-party-body {
    display: flex !important;
    flex-direction: column !important;
    order: 1 !important;
    flex: 1 1 auto !important;
    gap: 16px !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.watch-party-keyboard-open .watch-party-body {
    height: auto !important;
    min-height: 0 !important;
    gap: 16px !important;
    overflow: visible !important;
  }

  body.watch-party-keyboard-open .watch-party-room-card {
    flex: 0 0 auto !important;
  }

  body.watch-party-active .watch-party-chat {
    order: 1 !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    height: auto !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
  }

  body.watch-party-keyboard-open .watch-party-chat {
    flex: 0 0 auto !important;
    height: clamp(360px, 52vh, 520px) !important;
    min-height: 360px !important;
    max-height: none !important;
    margin-bottom: 12px !important;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-chat {
    flex: 0 0 auto !important;
    height: clamp(380px, 54vh, 560px) !important;
    min-height: 380px !important;
    max-height: none !important;
    margin-bottom: 18px !important;
  }

  body.watch-party-active .watch-party-messages {
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px !important;
  }

  body.watch-party-active .watch-party-form {
    grid-template-columns: minmax(0, 1fr) 42px !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 12px !important;
    margin-bottom: 0 !important;
    background: rgba(255, 255, 255, 0.025) !important;
  }
}

@media (min-width: 901px) and (orientation: landscape) and (max-height: 720px) {
  html.filmach-android-app {
    --android-rail-edge-top: calc(max(18px, env(safe-area-inset-top)) + 8px);
    --android-rail-edge-bottom: calc(max(18px, env(safe-area-inset-bottom)) + 8px);
    --android-rail-logo-size: 40px;
    --android-rail-profile-size: 44px;
  }

  html.filmach-android-app .app-shell {
    padding-top: var(--android-rail-edge-top);
  }

  html.filmach-android-app .home-view:not([hidden]) {
    padding-top: 0;
  }

  html.filmach-android-app .topbar {
    height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }

  html.filmach-android-app body.search-open .topbar,
  html.filmach-android-app .profile-menu {
    pointer-events: auto;
  }

  html.filmach-android-app body:not(.search-open) .search-form {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -8px);
  }

  html.filmach-android-app body.search-open .search-form {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%);
  }

  html.filmach-android-app .desktop-rail {
    position: fixed;
  }

  html.filmach-android-app .desktop-rail-top {
    position: absolute;
    top: var(--android-rail-edge-top);
    left: 0;
    width: 100%;
    height: var(--android-rail-logo-size);
    min-height: var(--android-rail-logo-size);
  }

  html.filmach-android-app .desktop-rail-nav {
    position: absolute;
    top: calc(var(--android-rail-edge-top) + var(--android-rail-logo-size));
    right: 0;
    bottom: calc(var(--android-rail-edge-bottom) + var(--android-rail-profile-size));
    left: 0;
    width: 100%;
    align-items: center;
    justify-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
  }

  html.filmach-android-app .desktop-rail-category {
    width: 100%;
    place-items: center;
  }

  html.filmach-android-app .desktop-rail-category .nav-options {
    top: 0;
    bottom: 0;
    left: var(--desktop-rail-width);
    width: var(--desktop-catalog-panel-width);
    border-radius: 0;
    padding: 22px 16px 18px;
    box-shadow: 18px 0 34px rgba(0, 0, 0, 0.32);
  }

  html.filmach-android-app .desktop-rail,
  html.filmach-android-app .desktop-rail-category .nav-options,
  html.filmach-android-app .side-menu-backdrop,
  html.filmach-android-app .side-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html.filmach-android-app .side-menu-backdrop {
    background: rgba(0, 0, 0, 0.18);
  }

  html.filmach-android-app .desktop-rail-search-button {
    display: grid;
  }

  html.filmach-android-app .desktop-rail-button[data-mobile-nav="my"] {
    display: none;
  }

  html.filmach-android-app .profile-menu {
    position: fixed;
    left: 0;
    right: auto;
    bottom: var(--android-rail-edge-bottom);
    z-index: 84;
    width: var(--desktop-rail-width);
    display: grid;
    justify-items: center;
  }

  html.filmach-android-app .profile-popover {
    top: auto;
    right: auto;
    bottom: 0;
    left: calc(100% + 12px);
    transform: translateX(-6px);
  }

  html.filmach-android-app .profile-popover::before {
    top: 0;
    right: 100%;
    bottom: auto;
    width: 18px;
    height: 100%;
  }

  html.filmach-android-app .profile-menu:hover .profile-popover:not(:empty),
  html.filmach-android-app .profile-button:hover ~ .profile-popover:not(:empty),
  html.filmach-android-app .profile-popover:not(:empty):hover {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-6px);
  }

  html.filmach-android-app body.profile-popover-open .profile-popover:not(:empty),
  html.filmach-android-app body.profile-popover-open .profile-menu:hover .profile-popover:not(:empty),
  html.filmach-android-app body.profile-popover-open .profile-button:hover ~ .profile-popover:not(:empty),
  html.filmach-android-app body.profile-popover-open .profile-popover:not(:empty):hover {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }
}

@media (min-width: 1180px) and (orientation: landscape) {
  html.tv-mode {
    --desktop-rail-width: clamp(118px, 7vw, 146px);
    --catalog-card-width: clamp(210px, 10.8vw, 246px);
    --app-edge-padding: clamp(38px, 3.6vw, 72px);
    --tv-focus-ring: 0 0 0 4px rgba(1, 176, 255, 0.95), 0 18px 44px rgba(1, 176, 255, 0.2);
  }

  html.tv-mode body {
    background: #050505;
  }

  html.tv-mode .app-shell {
    padding-top: clamp(38px, 4.8vh, 64px);
    padding-left: calc(var(--desktop-rail-width) + var(--app-edge-padding));
  }

  html.tv-mode .home-sections {
    gap: clamp(52px, 6.4vh, 78px);
  }

  html.tv-mode .desktop-rail {
    width: var(--desktop-rail-width);
    padding-inline: 16px;
    background: #050505;
    box-shadow: 18px 0 36px rgba(0, 0, 0, 0.38);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html.tv-mode .desktop-rail-top {
    height: clamp(118px, 14vh, 150px);
    min-height: clamp(118px, 14vh, 150px);
  }

  html.tv-mode .desktop-rail-brand {
    width: 58px;
    height: 58px;
  }

  html.tv-mode .desktop-rail-nav {
    gap: clamp(12px, 1.8vh, 18px);
    padding-bottom: clamp(116px, 14vh, 152px);
  }

  html.tv-mode .desktop-rail-button,
  html.tv-mode .profile-button {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  html.tv-mode .desktop-rail-button svg,
  html.tv-mode .profile-button svg {
    width: 34px;
    height: 34px;
  }

  html.tv-mode .desktop-rail-button.active,
  html.tv-mode .desktop-rail-button:focus-visible,
  html.tv-mode .desktop-rail-brand:focus-visible,
  html.tv-mode .profile-button:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: var(--tv-focus-ring);
    outline: none;
  }

  html.tv-mode .shelf-head {
    margin-bottom: 26px;
  }

  html.tv-mode .shelf-head h2,
  html.tv-mode .catalog-title {
    font-size: clamp(32px, 3vw, 44px);
    line-height: 1.08;
  }

  html.tv-mode .shelf-head button {
    min-height: 44px;
    font-size: 22px;
  }

  html.tv-mode .shelf-row {
    gap: 22px;
    padding: 8px 10px 24px;
    scroll-padding-inline: 10px;
  }

  html.tv-mode .content-grid {
    --catalog-card-width: clamp(210px, 10.8vw, 246px);
    gap: 44px 22px;
  }

  html.tv-mode .catalog-result-section-title {
    margin: 16px 0 -16px;
    font-size: clamp(26px, 2.2vw, 34px);
  }

  html.tv-mode .catalog-result-section-title:first-child {
    margin-top: 0;
  }

  html.tv-mode .movie-card,
  html.tv-mode .movie-person-card,
  html.tv-mode .shelf-show-all-card {
    border-radius: 12px;
    transition: transform 0.16s ease, filter 0.16s ease;
  }

  html.tv-mode .movie-card:focus-visible,
  html.tv-mode .movie-person-card:focus-visible,
  html.tv-mode .shelf-show-all-card:focus-visible {
    outline: none;
    transform: translateY(-6px) scale(1.035);
    z-index: 6;
  }

  html.tv-mode .movie-card:focus-visible .poster-wrap,
  html.tv-mode .movie-person-card:focus-visible .movie-person-photo,
  html.tv-mode .shelf-show-all-card:focus-visible .shelf-show-all-poster {
    box-shadow: var(--tv-focus-ring);
  }

  html.tv-mode .poster-wrap,
  html.tv-mode .shelf-show-all-poster {
    border-radius: 12px;
  }

  html.tv-mode .card-body {
    padding-top: 14px;
  }

  html.tv-mode .card-title {
    font-size: clamp(22px, 1.85vw, 28px);
    line-height: 1.18;
  }

  html.tv-mode .card-meta {
    margin-top: 6px;
    font-size: clamp(17px, 1.35vw, 21px);
  }

  html.tv-mode .rating-badge {
    top: 10px;
    left: 10px;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 17px;
  }

  html.tv-mode .watch-status {
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    font-size: 15px;
  }

  html.tv-mode .shelf-arrow {
    width: 58px;
    height: 76px;
    border-radius: 14px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html.tv-mode .shelf-arrow svg {
    width: 34px;
    height: 34px;
  }

  html.tv-mode .desktop-rail-category .nav-options {
    width: min(430px, calc(100vw - var(--desktop-rail-width) - 56px));
    padding: 24px;
    background: #111;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html.tv-mode .desktop-rail-category .nav-option,
  html.tv-mode .side-menu .nav-option,
  html.tv-mode .side-menu-section summary,
  html.tv-mode .side-menu-catalog-title {
    min-height: 58px;
    font-size: 22px;
  }

  html.tv-mode .search-form {
    height: 64px;
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  html.tv-mode .search-form input {
    border-radius: 14px 0 0 14px;
    font-size: 24px;
    padding-inline: 24px;
  }

  html.tv-mode .search-submit {
    border-radius: 0 14px 14px 0;
  }
}

@media (max-width: 900px) {
  html.ios-device.watch-party-active.watch-party-keyboard-open,
  body.ios-device.watch-party-active.watch-party-keyboard-open {
    height: auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .app-shell,
  body.ios-device.watch-party-active.watch-party-keyboard-open .movie-view:not([hidden]),
  body.ios-device.watch-party-active.watch-party-keyboard-open .movie-page,
  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party,
  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-body {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .app-shell {
    padding-bottom: 8px !important;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .movie-page {
    grid-template-rows: auto auto auto !important;
    gap: 24px !important;
    padding-bottom: 0 !important;
    transform: none !important;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party {
    max-height: none !important;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  body.ios-device.watch-party-active.watch-party-keyboard-open .watch-party-chat {
    flex: 0 0 auto !important;
    height: clamp(380px, 54vh, 560px) !important;
    min-height: 380px !important;
    max-height: none !important;
    margin-bottom: 18px !important;
  }
}

.player-picker-option-last {
  color: #32bfff !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.movie-action.download-action {
  order: 3;
  text-decoration: none;
}

.player-picker-together-divider {
  width: 100%;
  height: 1px;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.12);
}

.player-picker-together {
  width: 100%;
  flex: 0 0 auto;
}

@media (hover: hover) and (pointer: fine) {
  .player-picker-panel > .feedback-close[data-tooltip-label]::after {
    right: 0;
    left: auto;
    top: calc(100% + 12px);
    bottom: auto;
    z-index: 1000;
    transform: translateY(-8px);
  }

  .player-picker-panel > .feedback-close[data-tooltip-label]:hover::after,
  .player-picker-panel > .feedback-close[data-tooltip-label]:focus-visible::after {
    transform: translateY(0);
  }
}

.player-picker-section-label {
  margin: 0;
  color: #9299a8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: uppercase;
}

.player-picker-section-label + .player-picker-options {
  margin-top: 10px;
}

.player-picker-options {
  gap: 12px;
}

.player-picker-option {
  grid-template-columns: 42px minmax(0, 1fr) 14px;
  min-height: 76px;
  padding: 12px 14px;
  border-color: rgba(146, 160, 181, 0.2);
  background: linear-gradient(135deg, rgba(13, 24, 38, 0.78), rgba(14, 17, 25, 0.94));
}

.player-picker-option-copy {
  gap: 3px;
}

.player-picker-option-title {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.player-picker-option-title .player-picker-option-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
}

.player-picker-option-last {
  color: #9aa2b1 !important;
}

.player-picker-together-divider {
  margin: 26px 0 20px;
  background: rgba(146, 160, 181, 0.18);
}

.player-picker-together {
  margin-top: 10px;
  border-width: 2px;
  border-color: rgba(169, 109, 255, 0.58);
  background: linear-gradient(135deg, rgba(29, 21, 50, 0.7), rgba(14, 17, 25, 0.94));
}

.player-picker-together .player-picker-option-icon {
  border-color: rgba(158, 102, 255, 0.48);
  background: rgba(139, 92, 246, 0.13);
  color: #a96dff;
  box-shadow: inset 0 0 18px rgba(139, 92, 246, 0.08);
}

.player-picker-together .player-picker-option-arrow {
  color: #a96dff;
}

.player-picker-together:not(:disabled):hover .player-picker-option-arrow,
.player-picker-together:not(:disabled):focus-visible .player-picker-option-arrow {
  color: #bd8aff;
}

.player-picker-together .player-picker-option-copy small {
  max-width: 280px;
  color: #a8afbd;
  line-height: 1.35;
}

.player-picker-together:not(:disabled):hover,
.player-picker-together:not(:disabled):focus-visible {
  border-color: rgba(169, 109, 255, 0.72);
  background: linear-gradient(135deg, rgba(44, 29, 72, 0.78), rgba(17, 21, 31, 0.96));
}

@media (max-width: 640px) {
  .player-picker-option {
    grid-template-columns: 38px minmax(0, 1fr) 12px;
    min-height: 68px;
  }

  .player-picker-together .player-picker-option-copy small {
    max-width: 230px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .player-picker-panel > .feedback-close[data-tooltip-label]::after {
    position: fixed;
    right: auto;
    left: var(--player-picker-close-tooltip-left);
    top: var(--player-picker-close-tooltip-top);
    bottom: auto;
    z-index: 1000;
    transform: translate(8px, -50%);
  }

  .player-picker-panel > .feedback-close[data-tooltip-label]:hover::after,
  .player-picker-panel > .feedback-close[data-tooltip-label]:focus-visible::after {
    transform: translate(0, -50%);
  }

  .movie-actions a.download-action[data-tooltip-label]::after {
    left: 50%;
    right: auto;
    top: calc(100% + 12px);
    bottom: auto;
    transform: translate(-50%, -8px);
  }

  .movie-actions a.download-action[data-tooltip-label]:hover::after,
  .movie-actions a.download-action[data-tooltip-label]:focus-visible::after {
    transform: translate(-50%, 0);
  }
}

.player-picker-option[data-player-provider="alloha"],
.player-picker-option[data-player-provider="collaps"] {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.13);
}


.player-picker-together-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  height: auto;
  margin: 26px 0 20px;
  background: none;
  color: #a7a7aa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: none;
}

.player-picker-together-divider::before,
.player-picker-together-divider::after {
  content: "";
  height: 1px;
  background: rgba(146, 160, 181, 0.22);
}

.player-picker-option[data-player-provider],
.player-picker-together {
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.14);
}

.player-picker-option[data-player-provider] {
  transform: none !important;
}


.player-picker-option[data-player-provider]:not(:disabled):hover,
.player-picker-option[data-player-provider]:not(:disabled):focus-visible {
  border-width: 2px;
  border-color: rgba(1, 176, 255, 0.78);
}

.player-picker-together:not(:disabled):hover,
.player-picker-together:not(:disabled):focus-visible {
  border-width: 2px;
  border-color: rgba(169, 109, 255, 0.78);
}

.player-picker-option-title .player-picker-option-state {
  transform: translateY(-4px);
}
.player-picker-friends-line {
  display: block;
}

.player-picker-option-copy small,
.player-picker-option-last,
.player-picker-together .player-picker-option-copy small,
.player-picker-together-divider,
.player-picker-section-label {
  color: var(--muted) !important;
}





/* Mobile inline player selector and compact movie actions */
.movie-more-wrap,
.movie-more-menu {
  display: contents;
}

.movie-more-action,
.mobile-party-action,
.mobile-player-toolbar {
  display: none;
}

@media (max-width: 900px) {
  .movie-view:not(.is-error):not([hidden]) .movie-more-wrap {
    position: relative;
    display: block;
    flex: 0 0 50px;
    width: 50px;
    min-width: 50px;
    order: 2;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction.mobile-party-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    order: 1 !important;
    flex: 0 0 50px !important;
    width: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    padding: 0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: #151515 !important;
    color: #fff !important;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction.mobile-party-action:hover,
  .movie-view:not(.is-error):not([hidden]) #moviePartyAction.mobile-party-action:focus-visible {
    border-color: rgba(255, 255, 255, 0.26) !important;
    background: rgba(255, 255, 255, 0.12) !important;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction.mobile-party-action.active,
  body.watch-party-active .movie-view:not(.is-error):not([hidden]) #moviePartyAction.mobile-party-action {
    border-color: rgba(1, 176, 255, 0.68) !important;
    background: rgba(1, 176, 255, 0.1) !important;
    color: var(--accent) !important;
  }

  .movie-view:not(.is-error):not([hidden]) #moviePartyAction.mobile-party-action span {
    display: none !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-more-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 50px !important;
    min-width: 50px !important;
    height: 50px;
  }

  .movie-more-action svg {
    fill: currentColor;
    stroke: none;
  }

  .movie-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 90;
    display: none;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: #171717;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.56);
  }

  .movie-more-wrap.is-open .movie-more-menu {
    display: grid;
    gap: 4px;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-more-menu .movie-action {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    order: initial !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 48px !important;
    flex: 0 0 auto !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    text-decoration: none;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-more-menu .movie-action:hover,
  .movie-view:not(.is-error):not([hidden]) .movie-more-menu .movie-action:focus-visible {
    background: rgba(255, 255, 255, 0.08) !important;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-more-menu .movie-action span {
    display: inline !important;
    font-size: 15px;
    font-weight: 700;
  }

  .movie-view:not(.is-error):not([hidden]) .movie-more-menu .movie-action svg {
    width: 22px !important;
    height: 22px !important;
  }

  .movie-more-menu #movieTheaterAction[hidden] {
    display: none !important;
  }

  .movie-view:not(.is-error):not([hidden]) .mobile-player-toolbar:not([hidden]) {
    order: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-items: start;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
  }

  .mobile-player-select {
    position: relative;
    width: max-content;
    max-width: 100%;
    min-width: 0;
  }

  .mobile-player-select-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: #191919;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-player-select-action {
    justify-content: space-between;
    gap: 8px;
  }

  .mobile-player-select-action strong {
    color: inherit;
    font-weight: 700;
  }

  .mobile-player-select-action svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.16s ease;
  }

  .mobile-player-select.is-open .mobile-player-select-action {
    border-color: rgba(255, 255, 255, 0.2);
    background: #191919;
    color: #fff;
  }

  .mobile-player-select.is-open .mobile-player-select-action svg {
    transform: rotate(180deg);
  }

  .mobile-player-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 100%;
    z-index: 95;
    display: grid;
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: #171717;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55);
  }

  .mobile-player-list[hidden] {
    display: none !important;
  }

  .mobile-player-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.86);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
  }

  .mobile-player-option small {
    margin-left: 5px;
    color: #55c8ff;
    font-size: 9px;
    font-weight: 700;
  }

  .mobile-player-option:not(:disabled):hover,
  .mobile-player-option:not(:disabled):focus-visible,
  .mobile-player-option.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
  }

  .mobile-player-option.is-active {
    color: #fff;
  }

  .mobile-player-option:disabled {
    opacity: 0.42;
  }

  .movie-view:not(.is-error):not([hidden]) .player {
    order: 3;
  }

  body.watch-party-active .mobile-player-toolbar {
    display: none !important;
  }
}


/* Mobile Filmach player menu and startup fixes v28 */
.direct-player-menu-backdrop,
.direct-player-menu-close {
  display: none;
}

.direct-player-settings-header-main {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.player.is-mobile-player-preparing {
  display: grid !important;
  min-height: 180px;
  background: #080808;
  isolation: isolate;
}

.player.is-mobile-player-preparing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background-image: linear-gradient(rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.48)), var(--mobile-player-preparing-poster, none);
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .direct-player-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.58);
    padding: 0;
    cursor: default;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .direct-player-menu {
    z-index: 41 !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(20, 20, 21, 0.98);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.68);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .direct-player-menu::-webkit-scrollbar {
    display: none;
  }

  .player:not(.is-fs):not(.is-watch-open) .direct-player-menu {
    position: absolute !important;
    left: auto !important;
    right: 0 !important;
    top: auto !important;
    bottom: calc(100% + 6px) !important;
    width: min(280px, calc(100vw - 24px)) !important;
    min-width: min(230px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: min(42dvh, 260px) !important;
    transform: none !important;
    animation: none !important;
  }

  .player.is-fs .direct-player-menu,
  .player.is-watch-open .direct-player-menu {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
    width: min(360px, calc(100dvw - 32px)) !important;
    min-width: 0 !important;
    max-width: calc(100dvw - 32px) !important;
    max-height: min(58dvh, 440px) !important;
    transform: translateX(-50%) !important;
    border-radius: 14px;
    animation: direct-player-mobile-menu-in 0.18s ease-out;
  }

  .direct-player-menu-close {
    display: grid;
    place-items: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    padding: 0;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .direct-player-menu-close:hover,
  .direct-player-menu-close:focus-visible,
  .direct-player-menu-close:active {
    background: rgba(255, 255, 255, 0.14);
    outline: none;
  }

  .direct-player-menu-close svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  .direct-player-settings-header,
  .direct-player-settings-header-main,
  .direct-player-series-header {
    min-height: 50px;
    background: rgba(20, 20, 21, 0.98);
  }

  .direct-player-settings-header-main,
  .direct-player-series-header {
    padding: 7px 8px 7px 13px;
  }

  .direct-player-settings-title,
  .direct-player-series-title {
    font-size: 16px;
  }

  .direct-player-settings-back {
    min-height: 48px;
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 0 12px;
  }

  .direct-player-settings-list {
    padding: 4px 0 7px;
  }

  .direct-player-settings-row,
  .direct-player-settings-choice,
  .direct-player-menu-item,
  .direct-player-series-menu .direct-player-season-row,
  .direct-player-series-menu .direct-player-episode-row {
    min-height: 46px;
  }

  .direct-player-settings-row,
  .direct-player-settings-choice,
  .direct-player-menu-item {
    padding-right: 13px;
    padding-left: 13px;
  }

  .direct-player-menu-item.active,
  .direct-player-settings-choice.active {
    background: rgba(22, 184, 255, 0.13);
  }

  .player.is-fs .direct-player-settings-row,
  .player.is-watch-open .direct-player-settings-row,
  .player.is-fs .direct-player-settings-choice,
  .player.is-watch-open .direct-player-settings-choice,
  .player.is-fs .direct-player-menu-item,
  .player.is-watch-open .direct-player-menu-item {
    min-height: 50px;
  }

  .direct-player-panel-btn,
  .direct-player-option-btn {
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .direct-player-volume-wrap {
    min-width: 40px;
  }

  .direct-player-progress {
    height: 30px;
  }

  .direct-player-progress::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
  }

  .direct-player-progress::-moz-range-thumb {
    width: 18px;
    height: 18px;
  }
}

@media (max-height: 560px) and (hover: none),
       (max-height: 560px) and (pointer: coarse) {
  .player.is-fs .direct-player-menu,
  .player.is-watch-open .direct-player-menu {
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: min(390px, calc(100dvw - 24px)) !important;
    max-width: calc(100dvw - 24px) !important;
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) !important;
  }
}

@keyframes direct-player-mobile-menu-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .player.is-fs .direct-player-menu,
  .player.is-watch-open .direct-player-menu {
    animation: none;
  }
}


/* Mobile Filmach player menu containment v30 */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .player:not(.is-fs):not(.is-watch-open) .direct-player-menu {
    position: fixed !important;
    left: auto !important;
    right: var(--direct-player-inline-menu-right, 12px) !important;
    top: var(--direct-player-inline-menu-top, 12px) !important;
    bottom: auto !important;
    max-height: var(--direct-player-inline-menu-max-height, 220px) !important;
    transform: none !important;
    animation: none !important;
    contain: layout paint;
  }

  .player:not(.has-player-menu-open) .direct-player-menu-backdrop {
    display: none !important;
  }

  .player.is-player-menu-closing .direct-player-topbar,
  .player.is-player-menu-closing .direct-player-bottom-panel,
  .player.is-player-menu-closing .direct-player-progress-row,
  .player.is-player-menu-closing .direct-player-center-play,
  .player.is-player-menu-closing .direct-player-feedback,
  .player.is-player-menu-closing .direct-player-toast,
  .player.is-player-menu-closing .player-title-overlay,
  .player.is-player-menu-closing .player-overlay-btn,
  .player.is-player-menu-closing .direct-player-panel-btn,
  .player.is-player-menu-closing .direct-player-option-btn {
    transition: none !important;
  }
}
