* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#video, #overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#overlay { pointer-events: none; }

#hud-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: max(env(safe-area-inset-top), 12px) 16px 12px;
  background: linear-gradient(rgba(0,0,0,0.6), transparent);
  z-index: 2;
}

#status {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: .02em;
}

#hud-bot {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 16px max(env(safe-area-inset-bottom), 16px);
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  z-index: 2;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

button, .upload {
  background: rgba(31, 36, 48, 0.85);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  min-width: 110px;
  text-align: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

button:not(:disabled):active,
.upload:active {
  transform: scale(0.97);
}

#solveBtn:not(:disabled) {
  background: rgba(123, 216, 143, 0.85);
  color: #0a1a0e;
  border-color: rgba(123, 216, 143, 1);
  font-weight: 600;
}
