/* Ruohokenttä — sivun tyylit. Canvas piirtää itse pelin, CSS hoitaa ulkoasun. */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #16210f;
  font-family: "Segoe UI", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  color: #eef3e8;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  background: #16210f;
}

/* ---------- HUD ---------- */

.hud {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 190px;
  padding: 10px 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(12, 22, 10, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 13px;
  line-height: 1.55;
  user-select: none;
  pointer-events: none;
}

.hud.hidden {
  display: none;
}

.hud-title {
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.85;
}

.hud-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hud-row span {
  flex: 1;
  opacity: 0.7;
}

.hud-row b {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.hud-row i {
  opacity: 0.55;
  font-style: normal;
  font-size: 11px;
  width: 34px;
}

#hud-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(12, 22, 10, 0.62);
  color: #eef3e8;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
}

#hud-toggle:hover {
  background: rgba(30, 60, 25, 0.8);
}

/* ---------- Vihje ---------- */

.hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(12, 22, 10, 0.55);
  font-size: 13px;
  opacity: 0.85;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hint.gone {
  opacity: 0;
}
