* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #fff;
  overscroll-behavior: none;
}

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

#camera {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#info-panel {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  background: rgba(0, 0, 0, 0.55);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}

#toast {
  position: absolute;
  top: max(64px, env(safe-area-inset-top) + 64px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  max-width: 80vw;
  text-align: center;
  pointer-events: none;
  z-index: 5;
}

.fab {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(26, 26, 26, 0.87);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

#menu-button { right: 12px; }
#settings-button { right: 68px; }
#fullscreen-button { right: 124px; }

.capture-fab {
  position: absolute;
  bottom: max(80px, env(safe-area-inset-bottom) + 68px);
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: #ff4444;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

#recording-status {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #ff4444;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

#mode-toggle {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  background: rgba(26, 26, 26, 0.87);
  border-radius: 20px;
  padding: 4px;
  gap: 4px;
}

.mode-btn {
  border: none;
  background: transparent;
  color: #aaa;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
}

.mode-btn.active {
  background: #2a7fff;
  color: #fff;
}

#rotate-notice {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 18px;
  padding: 24px;
  z-index: 20;
}

/* Enforce landscape usage: show a rotate prompt over everything in portrait. */
@media (orientation: portrait) {
  #rotate-notice {
    display: flex;
  }
}

.hidden { display: none !important; }

#login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 30;
}

#login-form {
  width: min(320px, 85vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#login-form h1 {
  font-size: 22px;
  text-align: center;
  margin: 0 0 8px;
}

#login-form input[type="password"] {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #111;
  color: #fff;
  font-size: 15px;
}

#login-form button {
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
}

#login-error {
  color: #ff5555;
  font-size: 13px;
  text-align: center;
  min-height: 16px;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.dialog {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 20px;
  width: min(420px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
}

.dialog h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.dialog input[type="text"] {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #111;
  color: #fff;
  font-size: 14px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.dialog-actions button, .trajectory-item {
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.primary { background: #2a7fff; color: #fff; }
.secondary { background: #333; color: #fff; }

.trajectory-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #262626;
  color: #fff;
  margin-bottom: 6px;
}
.trajectory-item:hover { background: #333; }

.dialog p {
  font-size: 14px;
  color: #ccc;
  margin: 0 0 12px;
}

.dialog input[type="text"] {
  margin-bottom: 4px;
}

#upload-progress {
  width: 100%;
  margin-top: 12px;
  height: 8px;
}

/* deploy-test marker: 2026-09-03T10:23:33Z */
