/* VR Photo Camera: dark brutalist theme matching the viewer and exporter. */

:root {
  --bg: #0b0c0e;
  --panel: #16181c;
  --fg: #f2f4f7;
  --muted: #9aa2ad;
  --accent: #4c8dff;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

/* Header: same layout as the reel exporter. */
#topbar {
  padding: 0.5rem 0 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}
.brand-glyph {
  flex: none;
  display: block;
}
#topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}
.tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  background: var(--panel);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 0.75rem;
}
.panel p {
  margin: 0 0 1rem;
  line-height: 1.55;
}
.panel code {
  background: #1f2228;
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

.button {
  display: inline-block;
  appearance: none;
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 12px;
  padding: 0.7rem 1.3rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background: #fff;
  color: #16181c;
}
.button:disabled {
  opacity: 0.5;
  cursor: default;
}
.button.small {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.checkline input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.privacy,
.hint {
  color: var(--muted);
  font-size: 0.85rem;
}
.hint a {
  color: var(--accent);
}
.page-foot {
  margin: 1.25rem 0 0;
}
.back-link {
  color: #fff;
}

/* Live capture layout. */
#viewport {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 9 / 14;
  background: #000;
}
#preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#progress {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 92px;
  height: 92px;
}
#progress-arc {
  transition: stroke-dashoffset 0.12s linear;
}
#progress-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Level guide: two fixed center ticks and a sensor-driven horizon line. */
#level {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#level .tick {
  position: absolute;
  top: 50%;
  width: 14%;
  height: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}
#level .tick-left {
  left: 4%;
}
#level .tick-right {
  right: 4%;
}
#horizon-line {
  position: absolute;
  top: 50%;
  left: 22%;
  width: 56%;
  height: 0;
  border-top: 3px solid #ffd166;
  border-radius: 2px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
  transition: border-color 0.15s ease;
  will-change: transform;
}
#horizon-line.level {
  border-top-color: #7dffa0;
}

/* Capture coach pill. */
#coach {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 12, 14, 0.85);
  border: 2px solid #ffd166;
  color: #ffd166;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

#result-strip {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: #000;
}

#status {
  margin-top: 1rem;
  min-height: 1.3em;
  color: var(--muted);
  font-size: 0.9rem;
}
#status.error {
  color: #ff8f8f;
}
