:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #05070a;
  color: #f5fbff;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #05070a;
}

body.is-playing {
  cursor: crosshair;
}

body.is-locked {
  cursor: none;
}

body.is-damaged #app::after {
  opacity: 1;
}

#app::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0;
  background:
    radial-gradient(circle at center, transparent 40%, rgb(255 85 85 / 0.16) 78%),
    linear-gradient(rgb(255 90 90 / 0.12), rgb(255 90 90 / 0.04));
  transition: opacity 180ms ease;
}

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

.hud__cluster {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100vw - 32px);
}

.chip {
  min-width: 88px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgb(7 12 18 / 0.72);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.2);
  backdrop-filter: blur(12px);
}

.chip--primary {
  border-color: rgb(112 224 181 / 0.45);
}

.label {
  display: block;
  color: #9ab0bd;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.chip strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  line-height: 1;
}

.message {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px));
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgb(4 8 13 / 0.7);
  color: #d8e8ef;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(10px);
}

.wave-panel,
.boss-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}

.wave-panel {
  top: 16px;
}

.boss-panel {
  top: 76px;
}

.wave-panel span,
.boss-panel span {
  display: block;
  margin-bottom: 6px;
  color: #d8e8ef;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.wave-meter,
.boss-meter {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  background: rgb(6 13 18 / 0.72);
  box-shadow: 0 10px 26px rgb(0 0 0 / 0.22);
}

.wave-meter i,
.boss-meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #51d99d, #9be7ff);
  transition: width 180ms ease;
}

.boss-meter i {
  width: 100%;
  background: linear-gradient(90deg, #ff6b57, #d95eff, #f7f0a0);
}

.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.crosshair.is-hit {
  transform: translate(-50%, -50%) scale(1.32);
}

.crosshair.is-hit::before,
.crosshair.is-hit::after {
  background: #f7f0a0;
  box-shadow: 0 0 16px rgb(247 240 160 / 0.95);
}

.crosshair::before,
.crosshair::after {
  position: absolute;
  content: "";
  background: #f8fffb;
  box-shadow: 0 0 12px rgb(111 239 191 / 0.8);
}

.crosshair::before {
  top: 11px;
  left: 0;
  width: 24px;
  height: 2px;
}

.crosshair::after {
  top: 0;
  left: 11px;
  width: 2px;
  height: 24px;
}

.start-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 148px;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 8px;
  padding: 13px 18px;
  background: #51d99d;
  color: #04110d;
  font: inherit;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 18px 44px rgb(81 217 157 / 0.28);
}

.start-button[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .hud__cluster {
    top: 10px;
    left: 10px;
    gap: 6px;
    max-width: calc(100vw - 20px);
  }

  .chip {
    min-width: 78px;
    padding: 7px 8px;
  }

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

  .message {
    bottom: 14px;
    font-size: 13px;
  }

  .wave-panel,
  .boss-panel {
    right: 10px;
    left: auto;
    width: min(220px, calc(100vw - 20px));
    transform: none;
  }

  .wave-panel {
    top: 86px;
  }

  .boss-panel {
    top: 132px;
  }
}
