:root {
  color-scheme: dark;
  --ink: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.28);
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--ink);
}

button, input { font: inherit; color: inherit; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app {
  position: relative;
  height: 100%;
  height: 100dvh;
  background: #000;
  overflow: hidden;
  cursor: default;
}

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

.login {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  background: #000;
}

.login h1 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.login label {
  display: grid;
  gap: 6px;
  width: min(280px, 100%);
  font-size: 12px;
  color: var(--muted);
}

.login input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c0c0c;
}

.login input:focus-visible,
.slots button:focus-visible,
.watch:focus-visible,
#fullscreen:focus-visible,
.transport button:focus-visible,
#volume:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 2px;
}

.login button,
.watch {
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  cursor: pointer;
}

.login button {
  width: min(280px, 100%);
  margin-top: 6px;
  padding: 10px 16px;
}

.login-error {
  margin: 0;
  width: min(280px, 100%);
  font-size: 12px;
  color: var(--muted);
}

.watch {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  padding: 10px 22px;
  font-size: 14px;
}

.status {
  position: absolute;
  left: 50%;
  bottom: 72px;
  z-index: 3;
  margin: 0;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
  pointer-events: none;
}

.chrome {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 20px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
  opacity: 1;
  transition: opacity 0.35s ease;
}

.app.is-idle .chrome {
  opacity: 0;
  pointer-events: none;
}

.app.is-idle,
.app.is-idle video {
  cursor: none;
}

.slots {
  display: flex;
  gap: 4px;
}

.slots button {
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.slots button[aria-selected="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.transport {
  display: flex;
  align-items: center;
  gap: 6px;
}

.transport button {
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 12px;
}
.transport button:hover, .transport button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.22);
}
.transport button:disabled { opacity: 0.4; cursor: default; }
#volume {
  width: clamp(64px, 15vw, 112px);
  height: 24px;
  margin: 0 4px;
  accent-color: #fff;
  cursor: pointer;
}
.feedback {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(15, 15, 15, 0.85);
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}
@media (max-width: 560px) {
  .chrome { padding: 20px 10px 10px; gap: 6px; flex-wrap: wrap; }
  .slots button { padding: 6px 8px; font-size: 12px; }
}

#fullscreen {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

#fullscreen svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .chrome { transition: none; }
}

