:root {
  color-scheme: dark;
  --ink: #eef4ff;
  --muted: rgba(238, 244, 255, 0.68);
  --panel: rgba(7, 13, 22, 0.62);
  --edge: rgba(255, 255, 255, 0.18);
  --hot: #ffcf5d;
  --cyan: #62e8ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #02040a;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
}

.hud {
  position: fixed;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.hud-top {
  top: 18px;
  left: 18px;
  right: 18px;
  justify-content: space-between;
}

.hud-bottom {
  right: 18px;
  bottom: 18px;
  left: 18px;
  justify-content: space-between;
}

.brand,
.meters,
.controls,
.message {
  border: 1px solid var(--edge);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.brand {
  min-width: 170px;
  padding: 11px 14px;
  border-radius: 8px;
  line-height: 1;
}

.brand-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand strong {
  font-size: 22px;
}

.brand small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.meters {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 1px;
  min-width: min(560px, calc(100vw - 236px));
  overflow: hidden;
  border-radius: 8px;
}

.meters div {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.045);
}

.meters span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.meters strong {
  color: var(--hot);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
}

button {
  min-width: 128px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff2a9, #ffb646);
  color: #17100a;
  font: inherit;
  font-weight: 900;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(255, 181, 66, 0.28);
}

button:active {
  transform: translateY(1px);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(760px, calc(100vw - 172px));
  padding: 10px;
  border-radius: 8px;
}

.controls span {
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.message {
  position: fixed;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: min(500px, calc(100vw - 32px));
  padding: 18px 20px;
  border-radius: 8px;
  transform: translate(-50%, -50%);
  text-align: center;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.message strong,
.message span {
  display: block;
}

.message strong {
  margin-bottom: 8px;
  font-size: clamp(22px, 4vw, 34px);
}

.message span {
  color: var(--muted);
  line-height: 1.45;
}

.message.hidden {
  opacity: 0;
  transform: translate(-50%, calc(-50% + 10px));
  pointer-events: none;
}

@media (max-width: 760px) {
  .hud-top,
  .hud-bottom {
    left: 10px;
    right: 10px;
  }

  .hud-top {
    top: 10px;
    align-items: stretch;
  }

  .hud-bottom {
    bottom: 10px;
  }

  .brand {
    display: none;
  }

  .meters {
    width: 100%;
    min-width: 0;
  }

  .meters div {
    padding: 8px 9px;
  }

  .meters strong {
    font-size: 18px;
  }

  .controls {
    display: none;
  }
}
