/* The display is additive: black is transparent, so everything is drawn on pure black. */
html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #fff;
  font-family: system-ui, sans-serif;
  overflow: hidden;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#screen {
  width: min(100vw, 100vh);
  height: min(100vw, 100vh);
  outline: none;
}

#status {
  position: fixed;
  left: 12px;
  bottom: 10px;
  font-size: 22px;
  font-weight: 600;
  color: #7dff9a;
  pointer-events: none;
}

#status:empty {
  display: none;
}

#pairing {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#pairing[hidden],
#debug[hidden] {
  display: none;
}

#pair-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 80%;
  font-size: 24px;
}

#pair-msg {
  margin: 0;
  line-height: 1.35;
}

#code,
#pair-btn {
  font-size: 28px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid #fff;
  background: #000;
  color: #fff;
}

#code {
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#pair-btn:focus,
#code:focus,
#debug-off:focus {
  outline: 3px solid #7dff9a;
}

#debug {
  position: fixed;
  top: 6px;
  left: 8px;
  right: 8px;
  font-size: 14px;
  color: #ffd27d;
}

#debug pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

#debug-off {
  margin-top: 4px;
  font-size: 14px;
  background: #000;
  color: #ffd27d;
  border: 1px solid #ffd27d;
  border-radius: 6px;
}
