:root {
  color-scheme: dark;
  background: #000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

body {
  display: grid;
  place-items: center;
}

.player {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  user-select: none;
}

video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.center-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 18, 18, .72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}

.center-play:hover {
  background: rgba(28, 28, 28, .88);
  transform: translate(-50%, -50%) scale(1.04);
}

.center-play svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
  margin-left: 4px;
}

.player.playing .center-play {
  opacity: 0;
  pointer-events: none;
}

.controls {
  position: absolute;
  inset: auto 0 0 0;
  padding: 36px 18px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.86), rgba(0,0,0,.46) 58%, transparent);
  opacity: 1;
  transition: opacity .2s ease;
}

.player.playing.idle .controls {
  opacity: 0;
  pointer-events: none;
}

.progress {
  position: relative;
  width: 100%;
  height: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}

.buffered,
.played {
  position: absolute;
  left: 0;
  height: 4px;
  border-radius: 999px;
  pointer-events: none;
}

.buffered {
  background: rgba(255,255,255,.28);
  width: 0%;
}

.played {
  background: #fff;
  width: 0%;
}

.thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(.8);
  opacity: 0;
  transition: transform .12s ease, opacity .12s ease;
  pointer-events: none;
}

.progress:hover .thumb,
.progress:focus-visible .thumb {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.progress:hover::before,
.progress:hover .buffered,
.progress:hover .played {
  height: 6px;
}

.controls-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  color: rgba(255,255,255,.92);
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.icon-btn svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.pause-icon,
.muted-icon {
  display: none;
}

.player.playing .play-icon {
  display: none;
}

.player.playing .pause-icon {
  display: block;
}

.player.muted .volume-icon {
  display: none;
}

.player.muted .muted-icon {
  display: block;
}

.time {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.86);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.slash {
  color: rgba(255,255,255,.42);
}

.spacer {
  flex: 1;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.volume {
  width: 86px;
  accent-color: #fff;
  cursor: pointer;
}

@media (max-width: 640px) {
  .controls {
    padding: 28px 10px 8px;
  }

  .center-play {
    width: 60px;
    height: 60px;
  }

  .volume {
    width: 62px;
  }

  .time {
    font-size: .78rem;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }
}
