/* Aurora Runner - base page shell. HUD/menu styling lives in src/ui/ui.css (agent A6). */

:root {
  --oao-cyan: #5ce1e6;
  --oao-cyan-2: #00b4d8;
  --oao-orange: #ff6b35;
  --oao-orange-2: #ff8500;
  --oao-danger: #ff2d55;
  --oao-bg: #04040a;
  --oao-panel: rgba(255, 255, 255, 0.05);
  --oao-line: rgba(92, 225, 230, 0.2);
  --ar-mono: ui-monospace, "JetBrains Mono", "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ar-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--oao-bg);
  color: #fff;
  font-family: var(--ar-sans);
  /* none, not contain: kills pull-to-refresh and the rubber-band bounce outright */
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Text inside the menus is still selectable-adjacent content for assistive tooling, but a
   long-press on a control must never raise the copy/define callout mid-run. */
.ar-ui-root button,
.ar-ui-root [data-ar-touch],
.ar-ui-root [data-ar-touch] * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

#ar-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: none;
}

/* Full-bleed on purpose. The overlay's children are absolutely positioned against this box
   and each one applies the safe-area insets itself through the --ar-safe-* custom properties
   in src/ui/ui.css; padding here as well would inset a notched phone twice over. */
.ar-ui-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.ar-ui-root button,
.ar-ui-root a,
.ar-ui-root select,
.ar-ui-root [data-interactive] { pointer-events: auto; }

/* --- boot splash ---------------------------------------------------------- */
.ar-boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(ellipse at 50% 55%, #0d1030 0%, #04040a 70%);
  transition: opacity .5s ease, visibility .5s ease;
}
.ar-boot.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.ar-boot-mark {
  font-family: var(--ar-mono);
  font-size: clamp(22px, 5vw, 40px);
  letter-spacing: .38em;
  text-indent: .38em;
  color: var(--oao-cyan);
  text-shadow: 0 0 24px rgba(92, 225, 230, .55);
}
.ar-boot-mark span { color: var(--oao-orange); text-shadow: 0 0 24px rgba(255, 107, 53, .5); }

.ar-boot-bar {
  width: min(260px, 60vw);
  height: 2px;
  background: rgba(92, 225, 230, .15);
  overflow: hidden;
}
.ar-boot-bar i {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--oao-cyan), transparent);
  animation: ar-boot-sweep 1.1s ease-in-out infinite;
}
@keyframes ar-boot-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.ar-boot-msg {
  font-family: var(--ar-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  max-width: 80vw;
  text-align: center;
  line-height: 1.7;
}
.ar-boot.is-error .ar-boot-msg { color: var(--oao-danger); }
.ar-boot.is-error .ar-boot-bar { display: none; }

.ar-fallback {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-family: var(--ar-mono);
  color: var(--oao-cyan);
}
.ar-fallback a { color: var(--oao-orange); }

@media (prefers-reduced-motion: reduce) {
  .ar-boot-bar i { animation-duration: 3s; }
}
