* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #05080b;
  color: #f6f1df;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
}

.shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-rows: auto minmax(360px, 70vh) auto;
  gap: 12px;
}

.hud,
.controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.hud > div,
.controls > div,
button {
  min-height: 54px;
  border: 1px solid #2f4858;
  background: #101a22;
  border-radius: 8px;
}

.hud > div {
  display: grid;
  align-content: center;
  padding: 8px 12px;
}

span {
  color: #9ab1bd;
  font-size: 12px;
}

strong {
  font-size: 22px;
  line-height: 1.1;
}

#game {
  width: 100%;
  height: 100%;
  border: 1px solid #2f4858;
  border-radius: 8px;
  background: #07111b;
  touch-action: none;
}

.controls {
  grid-template-columns: minmax(0, 2fr) minmax(130px, 1fr) 110px;
}

.controls > div:first-child {
  display: grid;
  align-content: center;
  padding: 8px 12px;
}

.shield {
  position: relative;
  overflow: hidden;
}

.shield::before {
  content: "Shield";
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #d9fff4;
  font-size: 13px;
}

#shield {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #1a756d, #7fffd4);
  transition: width 120ms ease;
}

button {
  cursor: pointer;
  color: #07111b;
  background: #f7d66b;
  border-color: #f7d66b;
  font-weight: 800;
  font-size: 15px;
}

button:hover {
  filter: brightness(1.08);
}

@media (max-width: 620px) {
  body {
    padding: 8px;
  }

  .shell {
    grid-template-rows: auto minmax(320px, 64vh) auto;
  }

  .hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .controls {
    grid-template-columns: 1fr;
  }
}

