:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

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

.brand-watermark {
  position: absolute;
  z-index: 1;
  max-width: 55%;
  padding: 0;
  color: #000;
  background: transparent;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  text-shadow: none;
  pointer-events: none;
  user-select: none;
}

.brand-watermark.brand-position-0 { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.brand-watermark.brand-position-1 { top: 14px; left: 14px; transform: none; }
.brand-watermark.brand-position-2 { top: 14px; left: calc(100% - 14px); transform: translateX(-100%); }
.brand-watermark.brand-position-3 { top: calc(100% - 68px); left: calc(100% - 14px); transform: translateX(-100%); }
.brand-watermark.brand-position-4 { top: calc(100% - 68px); left: 14px; transform: none; }
.brand-watermark.brand-hidden { opacity: 0; }

@media (max-width: 600px) {
  .brand-watermark { font-size: 7px; }
}

.controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.72);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.stage.controls-hidden .controls {
  pointer-events: none;
  opacity: 0;
  transform: translateY(100%);
}

.stage.brand-blocked .controls { display: none; }

.control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.control-button:hover,
.control-button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.control-button-right {
  margin-left: auto;
}

.icon {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-play,
.icon-pause {
  fill: currentColor;
  stroke: none;
}

.icon-play,
.icon-muted,
.control-button.is-paused .icon-pause,
.control-button.is-muted .icon-volume {
  display: none;
}

.control-button.is-paused .icon-play,
.control-button.is-muted .icon-muted {
  display: block;
}

.status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 24px 72px;
  color: #f5f5f5;
  background: #000;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  pointer-events: none;
}

.status[hidden] {
  display: none;
}

.spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.status.is-static .spinner {
  display: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}
