:root {
  color-scheme: dark;
  --control-size: clamp(68px, 10vw, 96px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}
body { touch-action: manipulation; }

.gradient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: 400% 400%;
  animation: chromatic-drift 90s ease-in-out infinite;
}

@keyframes chromatic-drift {
  0%   { background-position: 0% 0%; }
  42%  { background-position: 100% 100%; }
  54%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

@media (prefers-reduced-motion: reduce) {
  .gradient { animation: none; background-position: 50% 50%; }
}

.start-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.13);
  cursor: pointer;
  transition: opacity 800ms ease, visibility 800ms ease;
  -webkit-tap-highlight-color: transparent;
}
.start-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-symbol {
  width: 0;
  height: 0;
  border-top: calc(var(--control-size) * .22) solid transparent;
  border-bottom: calc(var(--control-size) * .22) solid transparent;
  border-left: calc(var(--control-size) * .35) solid rgba(255, 255, 255, .9);
  margin-left: calc(var(--control-size) * .09);
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, .28));
  transition: transform 240ms ease, opacity 240ms ease;
}
.start-layer:hover .play-symbol,
.start-layer:focus-visible .play-symbol { transform: scale(1.08); }
.start-layer:focus-visible { outline: 2px solid rgba(255,255,255,.82); outline-offset: -8px; }

.transport {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  translate: -50% 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.transport.is-visible { opacity: .72; pointer-events: auto; }
.transport:hover, .transport:focus-visible { opacity: 1; }
.transport:focus-visible { outline: 2px solid rgba(255,255,255,.82); outline-offset: 3px; }

.transport-icon,
.transport-icon::before {
  display: block;
}
.transport-icon.pause {
  width: 12px;
  height: 16px;
  border-left: 4px solid #fff;
  border-right: 4px solid #fff;
}
.transport-icon.play {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
  margin-left: 3px;
}

.youtube-host {
  position: fixed;
  left: -320px;
  top: 0;
  width: 240px;
  height: 240px;
  opacity: .001;
  pointer-events: none;
}

.status-dot {
  position: fixed;
  z-index: 5;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.78);
  opacity: 0;
  transition: opacity 300ms ease;
}
.status-dot.is-visible { opacity: .45; }
