/* Core layout only. UI styling lives in src/ui/ui.css (owned by the UI module). */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #05040a;
  color: #e9e4ff;
  font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

#stage {
  position: fixed;
  inset: 0;
  touch-action: none;
  cursor: none;
}

#stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#overlay {
  pointer-events: none;
}

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, rgba(159, 220, 255, 0.07), rgba(159, 220, 255, 0) 70%),
    #07090b;
  color: #eeebe3;
  transition: opacity 0.7s ease;
}

#boot.hidden {
  opacity: 0;
  pointer-events: none;
}

/* A crescent moon on a hairline orbit: the loading mark. */
#boot .boot-mark {
  position: relative;
  width: 58px;
  height: 58px;
  margin-bottom: 26px;
  border-radius: 50%;
  border: 1px solid rgba(238, 235, 227, 0.16);
  animation: boot-orbit 6s linear infinite;
}
#boot .boot-mark::before {
  content: '';
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  box-shadow: inset -6px 2px 0 0 #eeebe3;
  filter: drop-shadow(0 0 8px rgba(238, 235, 227, 0.35));
  animation: boot-orbit 6s linear infinite reverse;
}
#boot .boot-mark i {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #d5f26b;
  box-shadow: 0 0 10px 2px rgba(213, 242, 107, 0.55);
}

#boot .boot-title {
  font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  font-weight: 400;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.015em;
  color: #eeebe3;
}
#boot .boot-title em {
  font-style: italic;
  color: rgba(238, 235, 227, 0.78);
}

#boot .boot-line {
  position: relative;
  width: 180px;
  height: 1px;
  margin: 26px 0 14px;
  overflow: hidden;
  background: rgba(238, 235, 227, 0.14);
}
#boot .boot-line i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, rgba(213, 242, 107, 0), #d5f26b, rgba(213, 242, 107, 0));
  animation: boot-scan 1.6s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

#boot .boot-sub {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(238, 235, 227, 0.5);
}

@keyframes boot-orbit {
  to {
    transform: rotate(360deg);
  }
}
@keyframes boot-scan {
  from {
    left: -40%;
  }
  to {
    left: 100%;
  }
}

#boot .boot-error {
  max-width: 640px;
  padding: 12px 16px;
  margin-top: 22px;
  border: 1px solid rgba(255, 98, 66, 0.4);
  border-radius: 2px;
  background: rgba(255, 98, 66, 0.06);
  color: #ffc2b4;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 12px;
  white-space: pre-wrap;
}
