/* Additive display: black = transparent. Keep backgrounds black and use bright,
   high-contrast foregrounds. The lens area is 600x600. */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#stage {
  position: relative;
  width: 600px;
  height: 600px;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- address / status bar --- */
#bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 2px solid #2a2a2a;
}
.dot {
  width: 14px; height: 14px; border-radius: 50%;
  flex: 0 0 auto;
}
.dot.on { background: #2bff7a; box-shadow: 0 0 10px #2bff7a; }
.dot.off { background: #555; }

#address {
  flex: 1 1 auto;
  background: #000;
  color: #fff;
  border: 2px solid #444;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 600;
  padding: 8px 12px;
  outline: none;
}
#address::placeholder { color: #888; }

/* D-pad focus ring — bright and obvious on the lens */
.focusable:focus,
.focusable.focused {
  border-color: #2bff7a;
  box-shadow: 0 0 0 3px rgba(43,255,122,.5);
}

/* --- page view --- */
#view {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: #000;
}

/* --- pairing overlay --- */
#pairing {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}
#pairing.hidden { display: none; }
#pairing .title { font-size: 34px; font-weight: 800; letter-spacing: 2px; color: #2bff7a; }
#pairing .sub   { font-size: 20px; color: #bbb; }
#pairing .url   { font-size: 22px; font-weight: 700; color: #7cf; word-break: break-all; }
#pairing .code  { font-size: 84px; font-weight: 900; letter-spacing: 14px; color: #fff; }
#pairing .status{ font-size: 18px; color: #ffae42; margin-top: 8px; }

/* --- toast --- */
#toast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: #111;
  border: 2px solid #2bff7a;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  max-width: 90%;
}
#toast.show { opacity: 1; }
