:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #3b0764 0%, #0b1020 58%);
  color: #f5f3ff;
}

.header, .hud, .controls {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 0.6rem 0.8rem;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1rem;
}

.header h1, .header p { margin: 0; }
.header p { opacity: 0.8; }

.back {
  color: #ddd6fe;
  font-weight: 700;
  text-decoration: none;
}

.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-weight: 800;
}

.hud div {
  background: rgba(15, 10, 30, 0.72);
  border: 1px solid rgba(196, 181, 253, 0.3);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
}

.stage {
  position: relative;
  width: min(960px, 100%);
  margin: 0 auto;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #14532d;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  touch-action: none;
  cursor: crosshair;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.2rem;
  text-align: center;
  background: rgba(10, 8, 24, 0.84);
  border-radius: 14px;
}

.overlay.hidden { display: none; }

#overlay-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
}

.hint {
  max-width: 36rem;
  margin: 0.2rem 0 0.4rem;
  line-height: 1.4;
}

#start {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #facc15;
  color: #422006;
}

.controls {
  opacity: 0.75;
  font-size: 0.92rem;
}
