/* Overlay UI for the browser build of Blinking Worlds. */

#blink-ui {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #e8e8ef;
}

#blink-panel {
  width: 240px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(12, 12, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

#blink-cam-wrap {
  position: relative;
  width: 240px;
  height: 180px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  display: none;
}

#blink-ui.live #blink-cam-wrap {
  display: block;
}

#blink-video {
  width: 240px;
  height: 180px;
  object-fit: cover;
  transform: scaleX(-1); /* mirror, reads naturally on camera */
}

#blink-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#blink-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 4px solid #ffd60a;
  opacity: 0;
}

#blink-flash.on {
  animation: blink-pop 0.45s ease-out;
}

@keyframes blink-pop {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

#blink-stats {
  display: none;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

#blink-ui.live #blink-stats {
  display: flex;
}

#blink-count { color: #ffd60a; }
#blink-ear { color: #34c759; }
#blink-ear.closed { color: #ff3b30; }
#blink-world { color: #fff; }

#blink-enable {
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-radius: 6px;
  background: #ffd60a;
  color: #14141b;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#blink-enable:hover { background: #ffe14d; }
#blink-enable:disabled { background: #6b6b52; cursor: default; }

#blink-status {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #a8a8b8;
}

#blink-status kbd {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  color: #e8e8ef;
}

@media (max-width: 900px) {
  #blink-ui { top: 8px; right: 8px; }
  #blink-panel { width: 168px; }
  #blink-cam-wrap, #blink-video { width: 148px; height: 111px; }
}
