/* css/styles.css — layout + typography for landing/permission/complete
   screens. Mobile-first (this is a phone-camera experience).
   The #view-ar overlay itself is styled by css/ar-ui.css (AR stream) —
   not touched here beyond making sure #view-ar can fill the viewport. */

:root {
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-accent: #38bdf8;
  --color-accent-text: #0f172a;
  --color-danger-bg: #fee2e2;
  --color-danger-text: #7f1d1d;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --radius: 0.75rem;
  --max-width: 28rem;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: block;
}

/* Generic view-panel layout for the non-AR screens. #view-ar overrides
   this to fill the viewport edge-to-edge for the camera feed. */
.view-panel {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  text-align: center;
}

.view-panel > * {
  max-width: var(--max-width);
  width: 100%;
}

#view-landing h1,
#view-loading h2,
#view-complete h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
}

#view-landing p,
#view-permission p,
#view-complete p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* Loading screen -------------------------------------------------------- */

.progress-track {
  width: 100%;
  height: 0.5rem;
  background: var(--color-surface);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}

#loading-progress-text {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

/* Buttons ------------------------------------------------------------- */

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

button:active {
  transform: scale(0.98);
}

#btn-enter,
#btn-request-permission,
#btn-share {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

#btn-restart {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text-muted);
}

#permission-denied-hint {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
  border-radius: var(--radius);
  padding: var(--space-2);
  font-size: 0.9rem;
}

#view-complete {
  gap: var(--space-2);
}

#view-complete button {
  width: 100%;
}

/* AR view: only the panel-level sizing belongs here (fill viewport for the
   camera feed); everything inside #ar-overlay is owned by ar-ui.css. */
#view-ar {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  position: relative;
}

@media (min-width: 480px) {
  .view-panel {
    gap: var(--space-3);
  }
}
