.film-player {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: #eeeae1;
  background: transparent;
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}

.film-player::backdrop { background: transparent; }
.film-player *, .film-player *::before, .film-player *::after { box-sizing: border-box; }
.film-player [hidden] { display: none !important; }
.film-player button { color: inherit; font: inherit; }
.film-player button:focus-visible { outline: 1px solid #eeeae1; outline-offset: 7px; }

.film-player__shade {
  position: fixed;
  inset: 0;
  background: #0b0c0b;
}

.film-player__header,
.film-player__footer {
  position: fixed;
  z-index: 3;
  left: clamp(40px, 5.5vw, 88px);
  right: clamp(40px, 5.5vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.film-player__header { top: 31px; }
.film-player__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #8c8d85;
  font-size: 9px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.14em;
}
.film-player__title {
  margin: 0;
  font-size: clamp(13px, 1.2vw, 17px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.015em;
}
.film-player__close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 19px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 11px !important;
}
.film-player__cross { position: relative; display: block; width: 17px; height: 17px; }
.film-player__cross::before,
.film-player__cross::after {
  position: absolute;
  top: 8px;
  left: 0;
  width: 17px;
  height: 1px;
  background: currentColor;
  content: '';
  transform: rotate(45deg);
  transition: transform 0.35s ease;
}
.film-player__cross::after { transform: rotate(-45deg); }
.film-player__close:hover .film-player__cross::before { transform: rotate(135deg); }
.film-player__close:hover .film-player__cross::after { transform: rotate(45deg); }

.film-player__frame {
  position: fixed;
  z-index: 2;
  overflow: hidden;
  background: #050605;
  isolation: isolate;
}
.film-player__video,
.film-player__cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.film-player__video { object-fit: contain; }
.film-player__cover { z-index: 2; object-fit: cover; pointer-events: none; }
.film-player__status {
  position: absolute;
  z-index: 3;
  inset: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  background: linear-gradient(transparent, #05060580, transparent);
  color: #eeeae1;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
}
.film-player__retry {
  min-height: 42px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #eeeae170;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.film-player__footer {
  bottom: max(29px, env(safe-area-inset-bottom));
  align-items: flex-start;
  padding-top: 18px;
  border-top: 1px solid #eeeae129;
}
.film-player__details { max-width: min(50%, 520px); }
.film-player__description {
  margin: 0 0 8px;
  color: #c2c0b8;
  font-size: 12px;
  line-height: 1.6;
  text-wrap: pretty;
}
.film-player__metadata {
  margin: 0;
  color: #777b73;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.film-player__meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; }
.film-player__project { font-size: 9px; color: #ccc9c0; text-underline-offset: 4px; }
.film-player__project:hover { text-decoration: underline; }
.film-player__project:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; }
.film-player__navigation {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: -8px;
}
.film-player__navigation button {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}
.film-player__arrow {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 22px;
  line-height: 1;
  font-weight: 300;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}
.film-player__arrow--back { transform: rotate(-135deg); }
.film-player__next:hover .film-player__arrow { transform: translateX(4px) rotate(45deg); }
.film-player__previous:hover .film-player__arrow { transform: translateX(-4px) rotate(-135deg); }
.film-player__count { color: #777b73; font-size: 9px; letter-spacing: 0.06em; white-space: nowrap; }

@media (max-width: 639px) {
  .film-player__header, .film-player__footer { left: 20px; right: 20px; gap: 20px; }
  .film-player__header { top: max(20px, env(safe-area-inset-top)); align-items: flex-start; }
  .film-player__identity { max-width: calc(100% - 63px); }
  .film-player__eyebrow { margin-bottom: 9px; font-size: 8px; letter-spacing: 0.08em; }
  .film-player__title { font-size: 12px; line-height: 1.55; }
  .film-player__close { gap: 10px; margin-top: -9px; font-size: 10px !important; }
  .film-player__cross, .film-player__cross::before, .film-player__cross::after { width: 13px; }
  .film-player__footer { bottom: max(18px, env(safe-area-inset-bottom)); display: block; padding-top: 13px; }
  .film-player__details { max-width: none; }
  .film-player__description { max-width: 42ch; margin-bottom: 5px; font-size: 10px; line-height: 1.5; }
  .film-player__metadata { font-size: 8px; }
  .film-player__navigation { justify-content: space-between; gap: 16px; margin-top: 8px; }
  .film-player__navigation button { font-size: 9px; gap: 10px; }
  .film-player__status { font-size: 10px; }
}

@media (max-height: 519px) {
  .film-player__header { top: 14px; }
  .film-player__eyebrow { display: none; }
  .film-player__footer { bottom: 12px; padding-top: 7px; display: flex; align-items: center; }
  .film-player__description { display: none; }
  .film-player__navigation { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .film-player *, .film-player *::before, .film-player *::after { transition: none !important; }
}
