/* SUNSHINE STATE GT — shell styling.
   Design language (ROADMAP 10.1): Florida deco — neon cyan/magenta on deep
   navy, chrome accents, condensed display type, a whisper of scanline. */

:root {
  --navy-900: #05070f;
  --navy-800: #0a1020;
  --navy-700: #101a33;
  --cyan: #35e8ff;
  --cyan-dim: #1a7f92;
  --magenta: #ff3d9a;
  --sun: #ffb43d;
  --chrome: #d8e2f0;
  --ink: #e8f2ff;
  --ink-dim: #7f92ad;
  --ui: 'Bahnschrift', 'DIN Alternate', 'Oswald', 'Arial Narrow', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--navy-900);
  color: var(--ink);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--navy-900);
}

/* ── boot / loading ─────────────────────────────────────────────────────── */

#boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 50% 8%, #17284d 0%, #080d1c 55%, #04060d 100%);
  transition: opacity .5s ease, transform .5s ease;
}
#boot.boot-out { opacity: 0; transform: scale(1.04); pointer-events: none; }

.boot-grid {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background-image:
    linear-gradient(transparent 0 calc(100% - 1px), rgba(53, 232, 255, .30) 100%),
    linear-gradient(90deg, transparent 0 calc(100% - 1px), rgba(53, 232, 255, .22) 100%);
  background-size: 100% 34px, 46px 100%;
  transform: perspective(340px) rotateX(66deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, #000 5%, transparent 92%);
  opacity: .55;
  pointer-events: none;
}

.boot-inner {
  position: relative;
  z-index: 1;
  width: min(560px, 84vw);
  text-align: center;
}

.boot-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: .92;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.boot-logo-sun {
  font-size: clamp(26px, 6.4vw, 44px);
  color: var(--sun);
  text-shadow: 0 0 22px rgba(255, 180, 61, .45);
}
.boot-logo-state {
  font-size: clamp(38px, 9.6vw, 68px);
  font-weight: 700;
  color: var(--ink);
  text-shadow: 0 0 26px rgba(53, 232, 255, .35);
}
.boot-logo-gt {
  font-size: clamp(30px, 7.4vw, 52px);
  font-weight: 700;
  letter-spacing: .34em;
  color: var(--magenta);
  text-shadow: 0 0 26px rgba(255, 61, 154, .45);
}

.boot-rule {
  height: 2px;
  margin: 22px auto 26px;
  width: 78%;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
  opacity: .8;
}

.boot-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(53, 232, 255, .18);
}
.boot-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: 0 0 16px rgba(53, 232, 255, .65);
  transition: width .22s ease-out;
}

.boot-status {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.boot-tip {
  margin: 34px auto 0;
  max-width: 46ch;
  min-height: 3.2em;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-dim);
  transition: opacity .3s ease;
}

/* ── fatal panel ────────────────────────────────────────────────────────── */

.fatal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 6, 13, .94);
  backdrop-filter: blur(6px);
}
.fatal-card {
  width: min(520px, 92vw);
  padding: 30px 32px 26px;
  text-align: center;
  border: 1px solid rgba(255, 61, 154, .35);
  border-radius: 14px;
  background: linear-gradient(180deg, #101a33, #080d1c);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.fatal-mark { font-size: 34px; color: var(--sun); }
.fatal-card h1 {
  margin: 10px 0 12px;
  font-size: 22px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.fatal-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-dim);
  word-break: break-word;
}
.fatal-retry {
  margin-top: 22px;
  padding: 11px 26px;
  font: inherit;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--navy-900);
  background: var(--cyan);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.fatal-retry:hover { background: #7ff0ff; }

/* ── perf hud ───────────────────────────────────────────────────────────── */

#perf {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 40;
  padding: 7px 10px;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
  color: #9ff7ff;
  background: rgba(5, 7, 15, .72);
  border: 1px solid rgba(53, 232, 255, .22);
  border-radius: 7px;
  white-space: pre;
  pointer-events: none;
}

#inputdbg {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 40;
  padding: 7px 10px;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #ffc6e6;
  background: rgba(5, 7, 15, .72);
  border: 1px solid rgba(255, 61, 154, .24);
  border-radius: 7px;
  white-space: pre;
  pointer-events: none;
}

#telemetry {
  position: fixed;
  bottom: 8px;
  left: 8px;
  z-index: 40;
  padding: 7px 10px;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #b6ffd0;
  background: rgba(5, 7, 15, .74);
  border: 1px solid rgba(120, 255, 180, .22);
  border-radius: 7px;
  white-space: pre;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  #boot, .boot-bar-fill, .boot-tip { transition: none; }
}
