:root {
  color-scheme: dark;
  --panel: rgba(8, 14, 26, 0.68);
  --line: rgba(130, 222, 255, 0.36);
  --cyan: #58e4ff;
  --amber: #ffbf48;
  --red: #ff4f6d;
  --green: #74ff9d;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #02040a;
}

button,
input {
  font: inherit;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  color: #effaff;
  text-shadow: 0 0 18px rgba(88, 228, 255, 0.34);
}

.start-panel,
.gameover {
  position: absolute;
  left: clamp(20px, 6vw, 84px);
  bottom: clamp(80px, 12vh, 140px);
  width: min(620px, calc(100vw - 40px));
  pointer-events: auto;
}

.kicker {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: 0;
}

h1 {
  max-width: 9ch;
  font-size: clamp(58px, 11vw, 142px);
}

h2 {
  font-size: clamp(38px, 7vw, 84px);
}

.tagline,
#resultText {
  max-width: 560px;
  margin: 22px 0 28px;
  color: rgba(239, 250, 255, 0.82);
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.48;
}

.launch {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 18px 0 22px;
  border: 1px solid rgba(255, 191, 72, 0.72);
  border-radius: 6px;
  color: #190f00;
  background: linear-gradient(180deg, #ffd66f, #ff9f31);
  box-shadow: 0 0 32px rgba(255, 162, 49, 0.24);
  cursor: pointer;
  font-weight: 900;
  pointer-events: auto;
}

.launch:hover {
  filter: brightness(1.1);
}

.key {
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 4px;
  color: rgba(20, 15, 4, 0.74);
  background: rgba(255, 255, 255, 0.46);
  font-size: 12px;
}

.hud {
  position: absolute;
  inset: 0;
}

.topbar {
  position: absolute;
  top: 18px;
  left: 50%;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.metric,
.readouts,
.status {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: inset 0 0 24px rgba(88, 228, 255, 0.09);
  backdrop-filter: blur(12px);
}

.metric {
  min-width: 106px;
  padding: 9px 12px;
  text-align: center;
}

.metric span,
.readouts label {
  display: block;
  color: rgba(239, 250, 255, 0.62);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  color: var(--cyan);
  font-size: 24px;
}

.reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(88, 228, 255, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(88, 228, 255, 0.24);
}

.reticle::before,
.reticle::after,
.reticle i,
.reticle b {
  content: "";
  position: absolute;
  background: rgba(88, 228, 255, 0.8);
}

.reticle::before {
  left: 50%;
  top: -18px;
  width: 1px;
  height: 132px;
}

.reticle::after {
  left: -18px;
  top: 50%;
  width: 132px;
  height: 1px;
}

.reticle i {
  left: 35px;
  top: 35px;
  width: 26px;
  height: 26px;
  border: 2px solid var(--amber);
  border-radius: 50%;
  background: transparent;
}

.reticle b {
  left: 46px;
  top: 46px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

.readouts {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(130px, 180px) 86px;
  gap: 14px;
  padding: 12px;
  pointer-events: none;
}

.readouts strong {
  color: var(--amber);
  font-size: 27px;
  line-height: 1.2;
}

meter {
  width: 100%;
  height: 18px;
  margin-top: 5px;
}

meter::-webkit-meter-bar {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

#heat::-webkit-meter-optimum-value {
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.status {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  min-height: 44px;
  padding: 12px 14px;
  color: rgba(239, 250, 255, 0.88);
  font-weight: 800;
}

.briefing {
  position: absolute;
  right: 18px;
  top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(560px, calc(100vw - 36px));
  color: rgba(239, 250, 255, 0.7);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.briefing span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  background: rgba(4, 9, 17, 0.55);
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .topbar {
    top: 10px;
    width: calc(100vw - 20px);
    justify-content: center;
  }

  .metric {
    min-width: 0;
    flex: 1;
    padding: 7px 8px;
  }

  .metric strong {
    font-size: 19px;
  }

  .briefing {
    display: none;
  }

  .readouts {
    right: 10px;
    left: 10px;
    bottom: 10px;
    grid-template-columns: 1fr 1fr 68px;
    gap: 8px;
  }

  .status {
    right: 10px;
    bottom: 86px;
    font-size: 13px;
  }

  .start-panel,
  .gameover {
    left: 20px;
    bottom: 96px;
  }
}
