:root {
  --ink: #07080b;
  --ink-soft: #12151b;
  --mist: #f5f5f7;
  --muted: #aaadb6;
  --red: #ff4d58;
  --red-dark: #b81d2a;
  --gold: #f1ca72;
  --green: #74e19b;
  --panel: rgba(18, 21, 27, 0.86);
  --hairline: rgba(255, 255, 255, 0.18);
  font-family: "SamsungOne", "Helvetica Neue", Arial, sans-serif;
  color: var(--mist);
  background: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

body {
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  background: var(--ink);
}

.screen.is-active {
  display: block;
}

.screen--centered.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ambient {
  position: absolute;
  inset: 0;
  background-color: var(--ink);
}

.ambient--space {
  background:
    radial-gradient(circle at 68% 35%, rgba(89, 94, 178, 0.62), transparent 24%),
    radial-gradient(circle at 74% 39%, #d79d6e 0 7%, transparent 7.2%),
    linear-gradient(145deg, #11163b, #07080b 68%);
}

.ambient--space::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 15% 17%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 43% 22%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 81% 12%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 28% 66%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 67% 75%, #fff 0 1px, transparent 2px);
  background-size: 230px 170px;
}

.ambient--noir {
  background:
    radial-gradient(circle at 72% 37%, rgba(231, 209, 162, 0.52), transparent 25%),
    linear-gradient(110deg, #090909 0 35%, #5d5242 64%, #151311 100%);
}

.ambient--noir::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 8, 11, 0.98), rgba(7, 8, 11, 0.78) 48%, rgba(7, 8, 11, 0.32));
}

.local-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: rgba(245, 245, 247, 0.92);
  font-size: 20px;
  font-weight: 800;
}

.local-title__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 25px;
}

.loading-card,
.error-card {
  position: relative;
  z-index: 2;
}

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.spinner {
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: catalog-spin 700ms linear infinite;
}

.spinner--large {
  width: 82px;
  height: 82px;
  border-width: 7px;
}

.loading-card h1 {
  margin: 38px 0 9px;
  font-size: 30px;
}

.loading-card p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.error-card {
  width: 760px;
  margin-right: 820px;
}

.eyebrow {
  color: var(--red);
  letter-spacing: 0.18em;
  font-size: 15px;
  font-weight: 800;
}

.error-card h1 {
  margin: 18px 0;
  font-size: 56px;
  letter-spacing: -0.025em;
}

.error-card p {
  margin: 0 0 14px;
  max-width: 680px;
  color: rgba(245, 245, 247, 0.78);
  font-size: 23px;
  line-height: 1.45;
}

.error-card code {
  display: block;
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 17px;
}

.topbar {
  position: absolute;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 116px;
  padding: 0 64px;
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.98), rgba(7, 8, 11, 0));
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.topbar.is-scrolled {
  background: #000000b5;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item {
  position: relative;
  min-width: 105px;
  padding: 14px 18px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
}

.nav-item.is-selected {
  color: var(--mist);
  font-weight: 800;
}

.nav-item.is-selected::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 28px;
  height: 3px;
  border-radius: 4px;
  background: var(--red);
  transform: translateX(-50%);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.catalog-count {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

.home-content {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: auto;
  scrollbar-width: none;
}

.home-content::-webkit-scrollbar,
.shelf__track::-webkit-scrollbar {
  display: none;
}

.hero {
  position: relative;
  height: 750px;
  overflow: hidden;
  background: var(--ink-soft);
}

.hero__image,
.detail__image,
.player__image,
.player__video,
.player__embed,
.art-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__image,
.detail__image,
.player__image,
.player__video,
.player__embed {
  z-index: 1;
}

.art-fallback {
  z-index: 0;
}

.hero__image {
  left: 34%;
  width: 66%;
}

.hero__image.is-missing,
.detail__image.is-missing,
.player__image.is-missing {
  display: none;
}

.art-fallback {
  background:
    radial-gradient(circle at 72% 30%, #ffe0a0 0 8%, rgba(255, 224, 160, 0.12) 8.3% 15%, transparent 15.4%),
    linear-gradient(165deg, transparent 45%, #9d3a3c 45.3% 62%, #30152d 62.3%),
    linear-gradient(180deg, #321829, #d45c3a 68%, #f2ad63);
}

.art-fallback--1 {
  background:
    radial-gradient(circle at 74% 34%, #e1a36e 0 11%, #6b3f68 11.4% 17%, transparent 17.4%),
    radial-gradient(circle at 28% 60%, #d6dfe7 0 2%, transparent 2.3%),
    radial-gradient(circle at 68% 40%, #2b326d, #090b24 70%);
}

.art-fallback--2 {
  background:
    linear-gradient(90deg, transparent 0 14%, #17101e 14.3% 23%, transparent 23.3% 31%, #211329 31.3% 43%, transparent 43.3% 61%, #17101e 61.3% 73%, transparent 73.3%),
    radial-gradient(circle at 27% 30%, #ff7d72 0 11%, transparent 11.4%),
    linear-gradient(180deg, #35103f, #9b244b 52%, #1a101e);
}

.art-fallback--3 {
  background:
    radial-gradient(ellipse at 58% 60%, #061c31 0 16%, transparent 16.5%),
    linear-gradient(180deg, #b7e6e4, #157c92 34%, #062b4c 66%, #031524);
}

.art-fallback--4 {
  background:
    repeating-linear-gradient(65deg, transparent 0 9%, rgba(8, 39, 29, 0.85) 9.5% 13%, transparent 13.5% 17%),
    radial-gradient(circle at 68% 24%, #ffe8ad 0 10%, transparent 10.4%),
    linear-gradient(180deg, #ebcb87, #4f7152 49%, #0b261e);
}

.art-fallback--5 {
  background:
    linear-gradient(75deg, transparent 0 45%, #ffd24a 45.3% 46%, transparent 46.3%),
    repeating-linear-gradient(180deg, transparent 0 10%, rgba(142, 56, 255, 0.48) 10.3% 10.7%),
    radial-gradient(circle at 50% 28%, #ffd24a 0 8%, #ff3d9a 8.4% 15%, transparent 15.4%),
    linear-gradient(180deg, #140523, #270936 52%, #05040c);
}

.hero__shade,
.player__shade {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.hero__shade--horizontal {
  background: linear-gradient(90deg, var(--ink) 0, rgba(7, 8, 11, 0.96) 28%, rgba(7, 8, 11, 0.35) 62%, transparent 100%);
}

.hero__shade--vertical {
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.5), transparent 34%, var(--ink) 100%);
}

.hero__content {
  position: absolute;
  z-index: 2;
  bottom: 70px;
  left: 64px;
  width: 760px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  letter-spacing: 0.17em;
  font-size: 15px;
  font-weight: 800;
}

.hero h1 {
  margin: 19px 0 16px;
  font-size: 72px;
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 900;
  text-shadow: 0 8px 35px rgba(0, 0, 0, 0.35);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 19px;
}

.hero__meta strong {
  color: var(--green);
}

.meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.quality {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
}

.hero__category {
  margin: 18px 0 10px;
  color: rgba(245, 245, 247, 0.85);
  font-size: 19px;
  font-weight: 700;
}

.hero__description {
  display: -webkit-box;
  max-width: 700px;
  margin: 0;
  overflow: hidden;
  color: rgba(245, 245, 247, 0.76);
  font-size: 20px;
  line-height: 1.43;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 24px;
  gap: 12px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: rgba(18, 21, 27, 0.84);
  color: var(--mist);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.pill--light {
  background: var(--mist);
  color: var(--ink);
}

.pill.is-active {
  border-color: rgba(255, 77, 88, 0.75);
  background: rgba(255, 77, 88, 0.32);
}

.pill__icon {
  min-width: 19px;
  font-size: 25px;
  line-height: 1;
}

.round-button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: var(--mist);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.round-button.is-active {
  border-color: var(--red);
  background: rgba(255, 77, 88, 0.42);
}

.round-button--large {
  width: 64px;
  height: 64px;
  font-size: 30px;
}

.round-button--media {
  width: 76px;
  height: 76px;
  font-size: 20px;
}

.round-button--play {
  width: 96px;
  height: 96px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.18),
    0 12px 35px rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 38px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.round-button.round-button--play:focus {
  outline: 4px solid #fff;
  outline-offset: 7px;
  background: rgba(0, 0, 0, 0.16);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 0 26px rgba(255, 255, 255, 0.2),
    0 14px 38px rgba(0, 0, 0, 0.42);
  color: #fff;
  transform: scale(1.04);
}

.icon--search {
  position: relative;
  display: block;
  width: 21px;
  height: 21px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.icon--search::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 10px;
  height: 3px;
  border-radius: 3px;
  background: currentColor;
  transform: rotate(45deg);
}

.search-panel {
  display: none;
  padding: 150px 64px 40px;
  min-height: 620px;
  background: linear-gradient(180deg, #0c0e13, var(--ink));
}

.search-panel.is-active {
  display: block;
}

.search-panel__header {
  display: flex;
  align-items: center;
  gap: 24px;
}

.search-input {
  flex: 1;
  height: 72px;
  padding: 0 24px;
  border: 2px solid var(--hairline);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--mist);
  font-size: 26px;
}

.search-input::placeholder {
  color: #858994;
}

.search-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 48px;
  color: var(--muted);
  font-size: 17px;
}

.search-status.is-loading::before {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--red);
  border-radius: 50%;
  content: "";
  animation: catalog-spin 700ms linear infinite;
}

.search-results {
  display: flex;
  gap: 18px;
  min-height: 330px;
  overflow: hidden;
  padding: 14px 48px 24px;
}

.shelves {
  position: relative;
  z-index: 3;
  margin-top: -8px;
  padding-bottom: 65px;
  background: var(--ink);
}

.view-header {
  display: none;
  min-height: 300px;
  padding: 158px 64px 52px;
  background:
    radial-gradient(circle at 82% 30%, rgba(255, 77, 88, 0.13), transparent 27%),
    linear-gradient(180deg, #10131a, var(--ink));
}

.view-header.is-active {
  display: block;
}

.view-header > span {
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.view-header h1 {
  margin: 12px 0 8px;
  font-size: 54px;
  letter-spacing: -0.035em;
}

.view-header p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.shelves--page {
  min-height: 520px;
  margin-top: 0;
  padding: 10px 64px 72px;
}

.shelf {
  margin-bottom: 50px;
}

.shelf__header {
  display: flex;
  align-items: flex-end;
  padding: 0 64px 18px;
}

.shelf__header h2 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -0.015em;
}

.shelf__header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.shelf__all {
  margin: 0 0 3px auto;
  color: var(--red);
  font-size: 17px;
  font-weight: 800;
}

.shelf__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 64px 20px;
  scroll-behavior: auto;
  scrollbar-width: none;
}

.movie-card {
  position: relative;
  flex: 0 0 226px;
  width: 226px;
  padding: 0;
  border-radius: 15px;
  outline: 0 solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}

.movie-card--wide {
  flex-basis: 330px;
  width: 330px;
}

.shelf-more {
  position: relative;
  display: flex;
  min-height: 318px;
  flex: 0 0 226px;
  width: 226px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 77, 88, 0.24), transparent 42%),
    linear-gradient(150deg, #242832, #111318);
  color: var(--mist);
  text-align: center;
  cursor: pointer;
}

.shelf-more--wide {
  min-height: 186px;
  flex-basis: 330px;
  width: 330px;
}

.shelf-more__icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--ink);
  font-size: 29px;
  font-weight: 900;
}

.shelf-more strong {
  font-size: 22px;
}

.shelf-more > span:last-child {
  max-width: 180px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.shelf-more:focus {
  border-color: #fff;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 77, 88, 0.4), transparent 48%),
    linear-gradient(150deg, #303641, #171a20);
}

.movie-card__art {
  position: relative;
  height: 318px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  background: var(--ink-soft);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.movie-card--wide .movie-card__art {
  height: 186px;
}

.movie-card__art img,
.movie-card__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card__shade {
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
}

.movie-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.movie-card__favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  font-size: 18px;
}

.movie-card.is-favorite .movie-card__favorite {
  display: grid;
}

.movie-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 50%;
  opacity: 0;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 26px;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 150ms ease, transform 150ms ease;
}

.movie-card__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
}

.movie-card.has-progress .movie-card__progress {
  display: block;
}

.movie-card__progress span {
  display: block;
  height: 100%;
  background: var(--red);
}

.movie-card h3 {
  overflow: hidden;
  margin: 13px 0 5px;
  color: rgba(245, 245, 247, 0.94);
  font-size: 18px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  margin: 10px 64px 80px;
  padding: 65px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--panel);
  color: var(--muted);
  font-size: 21px;
  text-align: center;
}

.section-end {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 4px 64px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  text-align: center;
}

.section-end span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(71, 202, 133, 0.14);
  color: var(--green);
  font-size: 15px;
}

.section-end strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.content-loading {
  display: flex;
  min-height: 360px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 38px 22px;
}

.movie-grid .movie-card {
  width: 100%;
  min-width: 0;
}

.movie-grid .movie-card__art {
  height: 320px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.category-card {
  position: relative;
  display: flex;
  min-height: 176px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  padding: 27px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: linear-gradient(145deg, #24354e, #131821);
  text-align: left;
}

.category-card::before {
  position: absolute;
  top: -60px;
  right: -35px;
  width: 190px;
  height: 190px;
  border: 30px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.category-card--1 { background: linear-gradient(145deg, #503145, #19131a); }
.category-card--2 { background: linear-gradient(145deg, #2a4d45, #101a18); }
.category-card--3 { background: linear-gradient(145deg, #514429, #1d1910); }
.category-card--4 { background: linear-gradient(145deg, #3d3158, #16121f); }
.category-card--5 { background: linear-gradient(145deg, #514038, #1d1714); }

.category-card strong {
  position: relative;
  font-size: 28px;
}

.category-card span {
  position: relative;
  margin-top: 8px;
  color: rgba(245, 245, 247, 0.66);
  font-size: 16px;
}

.category-card b {
  position: absolute;
  right: 24px;
  bottom: 24px;
  font-size: 28px;
}

.catalog-loader {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: -20px 64px 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.catalog-loader.is-loading::before {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--red);
  border-radius: 50%;
  content: "";
  animation: catalog-spin 700ms linear infinite;
}

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

.footer {
  display: flex;
  align-items: center;
  gap: 25px;
  height: 150px;
  padding: 0 64px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: #6f737d;
}

.detail {
  background: var(--ink);
}

.detail__image {
  left: 38%;
  width: 62%;
}

.detail__shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, var(--ink) 0 34%, rgba(7, 8, 11, 0.82) 54%, rgba(7, 8, 11, 0.22)),
    linear-gradient(180deg, rgba(7, 8, 11, 0.42), transparent 45%, var(--ink));
}

.detail__back {
  position: absolute;
  z-index: 5;
  top: 50px;
  left: 58px;
}

.detail__content {
  position: absolute;
  z-index: 3;
  top: 140px;
  left: 64px;
  width: 760px;
}

.detail__eyebrow {
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.detail h1 {
  margin: 18px 0 20px;
  font-size: 68px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.detail__meta {
  display: flex;
  align-items: center;
  gap: 15px;
  color: rgba(245, 245, 247, 0.82);
  font-size: 19px;
  font-weight: 700;
}

.detail__description {
  display: none;
}

#detail-description {
  max-width: 700px;
  margin: 28px 0 15px;
  color: rgba(245, 245, 247, 0.72);
  font-size: 21px;
  line-height: 1.5;
}

.detail__progress {
  min-height: 25px;
  margin: 0;
  color: var(--green);
  font-size: 17px;
  font-weight: 800;
}

.detail__actions {
  display: flex;
  gap: 16px;
  margin-top: 34px;
}

.detail-similar {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 24px;
  left: 64px;
}

.detail-similar__header {
  display: flex;
  align-items: flex-end;
  padding-right: 64px;
  padding-bottom: 12px;
}

.detail-similar__header span {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.detail-similar__header h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.detail-similar__header p {
  margin: 0 0 2px auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.detail-similar.is-loading .detail-similar__header p {
  color: rgba(245, 245, 247, 0.7);
}

.detail-similar__track {
  display: flex;
  min-height: 205px;
  gap: 18px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 10px 64px 14px 4px;
  scrollbar-width: none;
}

.detail-similar__track::-webkit-scrollbar {
  display: none;
}

.detail-similar__track .movie-card {
  flex-basis: 254px;
  width: 254px;
}

.detail-similar__track .movie-card__art,
.detail-similar__track .movie-card--wide .movie-card__art {
  height: 143px;
}

.detail-similar__track .movie-card h3 {
  margin-top: 9px;
  font-size: 14px;
}

.detail-similar__track .movie-card p {
  font-size: 12px;
}

.media-loader {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: 26%;
  display: none;
  width: 80px;
  height: 80px;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  transform: translate(50%, -50%);
}

.media-loader.is-visible {
  display: grid;
}

.player {
  background: #000;
}

.player:focus {
  outline: none;
}

.player__video {
  display: none;
  background: #000;
}

.player__embed {
  z-index: 1;
  display: none;
  border: 0;
  background: #000;
}

.player.has-video .player__video {
  display: block;
}

.player.has-embed .player__embed {
  display: block;
}

.player.has-video .player__image,
.player.has-video .art-fallback,
.player.has-embed .player__image,
.player.has-embed .player__video,
.player.has-embed .art-fallback,
.player.has-embed .player__shade,
.player.has-embed .player__center-controls,
.player.has-embed .player__bottom {
  display: none;
}

.player__loading {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: none;
  min-width: 360px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 28px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  transform: translate(-50%, -50%);
}

.player.is-resolving .player__loading,
.player.is-buffering .player__loading,
.player.has-playback-error .player__loading {
  display: flex;
}

.player.has-playback-error .player__loading .spinner {
  display: none;
}

.player.is-resolving .player__center-controls,
.player.is-buffering .player__center-controls {
  opacity: 0;
}

.player__shade {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.76), transparent 30%, transparent 55%, rgba(0, 0, 0, 0.96));
  transition: opacity 180ms ease;
}

.player__center-controls {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease;
}

.player__bottom {
  position: absolute;
  z-index: 3;
  right: 58px;
  bottom: 42px;
  left: 58px;
  transition: opacity 180ms ease;
}

.player.controls-hidden .player__center-controls,
.player.controls-hidden .player__bottom {
  opacity: 0;
  pointer-events: none;
}

.player.has-video.controls-hidden .player__shade {
  opacity: 0;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 20px;
  color: rgba(245, 245, 247, 0.9);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.timeline__track {
  position: relative;
  flex: 1;
  height: 7px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: visible;
  outline: none;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.5),
    0 1px 8px rgba(0, 0, 0, 0.25);
}

.timeline__progress {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff3545, #ff6873);
  box-shadow: 0 0 12px rgba(255, 53, 69, 0.48);
  transition: width 160ms linear;
}

.timeline__thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ff4d58;
  box-shadow:
    0 0 0 3px rgba(255, 77, 88, 0.18),
    0 3px 10px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
  transition: left 160ms linear;
}

.player__info-row {
  display: flex;
  align-items: center;
  margin-top: 25px;
}

.player__movie-info > div {
  display: flex;
  align-items: center;
  gap: 15px;
}

.player__movie-info strong {
  font-size: 25px;
}

.player__movie-info > span {
  display: block;
  margin-top: 7px;
  color: rgba(245, 245, 247, 0.62);
  font-size: 17px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 60px;
  bottom: 55px;
  max-width: 520px;
  padding: 18px 24px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  opacity: 0;
  background: rgba(18, 21, 27, 0.96);
  color: var(--mist);
  font-size: 17px;
  transform: translateY(20px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}



.nav-item:focus,
.round-button:focus {
  background-color: var(--mist);
  color: var(--ink);
}

.category-card:focus {
  border-color: #fff;
  background-color: #283447;
}

.movie-card:focus {
  transform: scale(1.055);
}

.movie-card:focus .movie-card__art {
  border: 3px solid #fff;
}

.movie-card:focus .movie-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.search-input:focus {
  border-color: #fff;
  outline: 3px solid #fff;
  outline-offset: 3px;
  transform: none;
}

@media (max-width: 1400px) {
  .topbar { height: 92px; padding: 0 48px; }
  .local-title { font-size: 16px; }
  .local-title__icon { width: 34px; height: 34px; font-size: 20px; }
  .nav-item { min-width: auto; padding: 11px 13px; font-size: 15px; }
  .catalog-count { display: none; }
  .hero { height: 590px; }
  .hero__content { bottom: 48px; left: 52px; width: 610px; }
  .hero h1 { font-size: 52px; }
  .hero__description { font-size: 16px; }
  .hero__meta, .hero__category { font-size: 15px; }
  .pill { min-height: 46px; padding: 0 18px; font-size: 14px; }
  .shelf__header { padding-inline: 52px; }
  .shelf__track { padding-inline: 52px; }
  .movie-card { flex-basis: 178px; width: 178px; }
  .movie-card__art { height: 250px; }
  .movie-card--wide { flex-basis: 286px; width: 286px; }
  .movie-card--wide .movie-card__art { height: 161px; }
  .shelf-more { min-height: 250px; flex-basis: 178px; width: 178px; }
  .shelf-more--wide { min-height: 161px; flex-basis: 286px; width: 286px; }
  .shelf-more__icon { width: 44px; height: 44px; font-size: 24px; }
  .shelf-more strong { font-size: 18px; }
  .shelf-more > span:last-child { font-size: 11px; }
  .section-end { margin-inline: 52px; }
  .movie-card h3 { font-size: 14px; }
  .movie-card p { font-size: 12px; }
  .shelf__header h2 { font-size: 22px; }
  .view-header { min-height: 235px; padding: 122px 52px 38px; }
  .view-header h1 { font-size: 40px; }
  .shelves--page { padding-inline: 52px; }
  .movie-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px 18px; }
  .movie-grid .movie-card { width: 100%; }
  .movie-grid .movie-card__art { height: 245px; }
  .category-grid { gap: 17px; }
  .category-card { min-height: 135px; padding: 20px; }
  .category-card strong { font-size: 22px; }
  .detail__content { left: 52px; width: 600px; }
  .detail__content { top: 118px; }
  .detail h1 { font-size: 52px; }
  #detail-description { margin-top: 20px; font-size: 17px; line-height: 1.4; }
  .detail__actions { margin-top: 22px; }
  .detail-similar { left: 52px; bottom: 16px; }
  .detail-similar__header { padding-right: 52px; }
  .detail-similar__track { min-height: 176px; padding-right: 52px; }
  .detail-similar__track .movie-card { flex-basis: 214px; width: 214px; }
  .detail-similar__track .movie-card__art,
  .detail-similar__track .movie-card--wide .movie-card__art { height: 120px; }
}

@media (max-height: 760px) {
  .detail__content { top: 96px; }
  .detail h1 { margin-top: 8px; font-size: 44px; }
  #detail-description {
    display: -webkit-box;
    max-width: 640px;
    margin-top: 14px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .detail__actions { margin-top: 16px; }
  .detail-similar { bottom: 8px; }
  .detail-similar__header { padding-bottom: 6px; }
  .detail-similar__header h2 { margin-top: 2px; font-size: 20px; }
  .detail-similar__track { min-height: 153px; padding-top: 6px; padding-bottom: 6px; }
  .detail-similar__track .movie-card { flex-basis: 190px; width: 190px; }
  .detail-similar__track .movie-card__art,
  .detail-similar__track .movie-card--wide .movie-card__art { height: 107px; }
}
