:root {
  --bg: #05080d;
  --fg: #dce8f2;
  --muted: rgba(220, 232, 242, 0.38);
  --blue: rgba(150, 215, 255, 0.82);
  --amber: rgba(255, 190, 100, 0.78);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 28%, rgba(45, 80, 130, 0.1), transparent 34%),
    radial-gradient(circle at 80% 74%, rgba(70, 48, 105, 0.07), transparent 38%),
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: auto, auto, 90px 90px, 90px 90px;
  mask-image: radial-gradient(circle at center, black 25%, transparent 94%);
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scanline {
  position: fixed;
  z-index: 2;
  top: -15%;
  width: 100%;
  height: 12%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(135, 210, 255, 0.025), transparent);
  animation: sensor-sweep 18s linear infinite;
}

@keyframes sensor-sweep {
  0%, 74% { transform: translateY(0); opacity: 0; }
  78%, 96% { opacity: 1; }
  100% { transform: translateY(1050%); opacity: 0; }
}

.hud {
  position: fixed;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 120px;
  height: 44px;
  border-color: rgba(150, 205, 240, 0.28);
}

.tl { top: 28px; left: 32px; border-top: 1px solid; border-left: 1px solid; }
.tr { top: 28px; right: 32px; border-top: 1px solid; border-right: 1px solid; }
.bl { bottom: 28px; left: 32px; border-bottom: 1px solid; border-left: 1px solid; }
.br { bottom: 28px; right: 32px; border-bottom: 1px solid; border-right: 1px solid; }

.meta-left,
.meta-right {
  position: absolute;
  top: 42px;
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(220, 232, 242, 0.34);
}

.meta-left { left: 46px; }
.meta-right { right: 46px; text-align: right; }
.meta-strong { color: rgba(180, 225, 255, 0.72); }
.signal { color: rgba(155, 225, 185, 0.72); }

.center {
  position: fixed;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}

.content { transform: translateY(-1vh); }

h1 {
  margin: 0;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 64px);
  letter-spacing: -0.025em;
  text-shadow: 0 0 24px rgba(120, 200, 255, 0.1);
}

h1 .dim { color: rgba(220, 232, 242, 0.72); }

.ship {
  margin-top: 18px;
  color: rgba(180, 225, 255, 0.6);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.flight-log {
  width: min(760px, 82vw);
  margin: 38px auto 0;
  padding: 13px 18px 15px;
  border-top: 1px solid rgba(150, 205, 240, 0.16);
  border-bottom: 1px solid rgba(150, 205, 240, 0.08);
  background: linear-gradient(90deg, transparent, rgba(8, 18, 28, 0.6), transparent);
}

.log-label {
  color: rgba(255, 190, 100, 0.5);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.flight-log p {
  min-height: 2.8em;
  margin: 9px 0 0;
  color: rgba(220, 232, 242, 0.42);
  font-size: clamp(9px, 0.86vw, 11px);
  line-height: 1.55;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: opacity 350ms ease;
}

.flight-log p.changing { opacity: 0; }

.footer-left,
.footer-right {
  position: fixed;
  z-index: 3;
  bottom: 38px;
  color: rgba(220, 232, 242, 0.25);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-left { left: 46px; }
.footer-right { right: 46px; text-align: right; }

.blink { animation: blink 1.8s steps(1) infinite; }

@keyframes blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0.2; }
}

@media (max-width: 760px) {
  .meta-left,
  .meta-right,
  .footer-right { display: none; }

  .footer-left {
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .corner { width: 70px; }

  .flight-log {
    width: min(90vw, 560px);
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scanline,
  .blink { animation: none; }
}
