:root {
  color-scheme: dark;
  --ink: #101512;
  --panel: rgba(17, 23, 19, 0.78);
  --line: rgba(255, 255, 255, 0.16);
  --text: #fbf7ec;
  --muted: #b8c9bd;
  --coral: #f06c4f;
  --gold: #f0c35a;
  --mint: #63d8b8;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(240, 108, 79, 0.14), transparent 36%),
    linear-gradient(315deg, rgba(99, 216, 184, 0.10), transparent 42%),
    var(--ink);
}

#game-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.hud {
  position: absolute;
  top: 18px;
  left: 18px;
  width: min(430px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
}

.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hud p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.42;
}

.hud strong {
  color: var(--text);
  font-weight: 800;
}

#restart-button {
  min-width: 94px;
  min-height: 42px;
  border: 1px solid rgba(240, 195, 90, 0.52);
  border-radius: 8px;
  background: rgba(240, 195, 90, 0.12);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

#restart-button:hover,
#restart-button:focus-visible {
  border-color: var(--gold);
  outline: none;
  background: rgba(240, 195, 90, 0.22);
}

.meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.meters div {
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

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

.meters span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.meters strong {
  margin-top: 5px;
  font-size: 1.06rem;
  line-height: 1.1;
}

.status {
  min-height: 2.8em;
  color: #ffe1bc;
}

@media (max-width: 660px) {
  .hud {
    top: auto;
    bottom: 12px;
    left: 12px;
    width: calc(100vw - 24px);
    padding: 12px;
  }

  .title-row {
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
  }

  h1 {
    font-size: 1.55rem;
  }

  .hud p {
    font-size: 0.88rem;
    line-height: 1.32;
  }

  .meters {
    gap: 6px;
    margin-top: 10px;
  }

  .meters div {
    min-height: 56px;
    padding: 8px;
  }

  .meters strong {
    font-size: 0.98rem;
  }

  #restart-button {
    min-width: 86px;
  }
}
