.hls-player {
  position: relative;
  width: 100%;
  margin-inline: auto;
  container-type: inline-size;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #03070a;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .32), 0 0 0 4px #1f5fd6;
  transition: width .75s cubic-bezier(.22, .8, .24, 1);
}

.hls-player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #03070a;
}

.hls-player-start {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  width: 100%;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(3, 7, 10, 0) 45%, rgba(3, 7, 10, .45));
  color: #fff;
  font: inherit;
}

.hls-player-start-icon {
  display: grid;
  place-items: center;
  width: clamp(56px, 27cqw, 208px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  box-shadow: 0 22px 56px rgba(12, 31, 79, .3), 0 0 0 14px rgba(255, 255, 255, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}

.hls-player-start-icon svg {
  width: 42%;
  height: 42%;
  margin-left: 6%;
}

.hls-player-start:hover .hls-player-start-icon,
.hls-player-start:focus-visible .hls-player-start-icon {
  transform: scale(1.06);
  box-shadow: 0 26px 64px rgba(12, 31, 79, .38), 0 0 0 18px rgba(255, 255, 255, .26);
}

.hls-player-start:focus-visible {
  outline: 3px solid #4de7ff;
  outline-offset: -6px;
}

/* The play overlay only exists once the script has taken over. Without JavaScript the native controls and the MP4 fallback do the work. */
.hls-player.is-ready .hls-player-start { display: grid; }

/* Idle size: about half the slot. Pressing play expands to the full slot. Without JavaScript the player stays full width. */
.hls-player.is-ready:not(.is-started) { width: max(50%, min(100%, 280px)); }
.hls-player.is-started .hls-player-start { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hls-player { transition: none; }
  .hls-player-start-icon { transition: none; }
}
