html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0b1114;
  color: #f3f7f2;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  text-rendering: optimizeLegibility;
}

#game {
  display: block;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.hud {
  position: fixed;
  top: 16px;
  left: 16px;
  width: min(300px, calc(100vw - 32px));
  padding: 12px;
  background: rgba(7, 11, 13, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  z-index: 10;
}

.hud-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 15px;
  font-weight: 700;
}

#wanted-stars {
  color: #f5c143;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
}

.hud-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  min-height: 25px;
  font-size: 14px;
}

.meter {
  margin-top: 7px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  color: #aab7b3;
  font-size: 11px;
  text-transform: uppercase;
}

.meter-track {
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.meter-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transition: width 120ms linear;
}

.health-fill {
  background: linear-gradient(90deg, #e34d4d, #f2c14e, #67cc7a);
}

.nitro-fill {
  background: linear-gradient(90deg, #4fc3e6, #5ee6e6);
  box-shadow: 0 0 12px rgba(94, 230, 230, 0.45);
}

.fuel-fill {
  background: linear-gradient(90deg, #c94d3b, #f0b642, #73bf68);
}

.label {
  color: #aab7b3;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.mission {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #d9f1c6;
  font-size: 13px;
  line-height: 1.35;
}

#radar {
  display: block;
  width: 136px;
  height: 136px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(6, 12, 14, 0.64);
}

.reticle {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.7;
  z-index: 9;
}

.wanted-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 48%, transparent 42%, rgba(120, 18, 24, 0.22) 72%, rgba(189, 29, 38, 0.42) 100%),
    linear-gradient(90deg, rgba(58, 96, 255, 0.08), transparent 28%, transparent 72%, rgba(255, 42, 42, 0.08));
  mix-blend-mode: screen;
  transition: opacity 160ms linear;
  z-index: 8;
}

.reticle::before,
.reticle::after {
  content: "";
  position: absolute;
  background: rgba(246, 245, 220, 0.72);
  box-shadow: 0 0 8px rgba(248, 224, 138, 0.44);
}

.reticle::before {
  left: 8px;
  top: 0;
  width: 2px;
  height: 18px;
}

.reticle::after {
  left: 0;
  top: 8px;
  width: 18px;
  height: 2px;
}

.corner-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 12px;
  background: rgba(7, 11, 13, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #d2dad6;
  font-size: 13px;
  backdrop-filter: blur(12px);
  z-index: 10;
}

.story-briefing {
  position: fixed;
  left: 50%;
  bottom: 22px;
  width: min(520px, calc(100vw - 380px));
  min-width: 320px;
  transform: translateX(-50%);
  padding: 12px 14px;
  background: rgba(7, 11, 13, 0.78);
  border: 1px solid rgba(245, 193, 67, 0.36);
  border-left: 4px solid #f5c143;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.briefing-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #f5c143;
  font-size: 11px;
  text-transform: uppercase;
}

.briefing-title {
  margin-top: 4px;
  color: #f3f7f2;
  font-size: 16px;
  font-weight: 700;
}

.briefing-body {
  margin-top: 4px;
  color: #cbd8d3;
  font-size: 13px;
  line-height: 1.35;
}

[hidden] {
  display: none !important;
}

@media (max-width: 620px) {
  .hud {
    top: 10px;
    left: 10px;
    width: calc(100vw - 20px);
    box-sizing: border-box;
  }

  .corner-panel {
    right: 10px;
    bottom: 10px;
    max-width: calc(100vw - 20px);
  }

  .story-briefing {
    left: 10px;
    right: 10px;
    bottom: 76px;
    width: auto;
    min-width: 0;
    transform: none;
  }

  #radar {
    width: 112px;
    height: 112px;
  }
}
