:root {
  color-scheme: dark;
  --bg: #1a2410;
  --grass: #7fc04e;
  --outline: #1a1a1a;
  --accent: #ffd74a;
  --danger: #e84b3c;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: var(--bg);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior: none;
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #2f4a1d 0%, #0f180a 80%);
}

#game {
  display: block;
  background: #000;
  box-shadow:
    0 0 0 3px #111,
    0 10px 40px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
}

#ui-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#hiscore-form {
  position: fixed;
  left: 50%;
  bottom: 12%;
  transform: translate(-50%, 20px);
  display: none;
  pointer-events: auto;
  background: #14210B;
  border: 3px solid #FFD74A;
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  width: min(300px, 80vw);
  color: #fff;
  text-align: center;
  z-index: 20;
}
#hiscore-form.visible {
  display: block;
}
#hiscore-form .hf-title {
  font: 900 18px -apple-system, sans-serif;
  color: #FFD74A;
  margin-bottom: 10px;
  letter-spacing: 0.4px;
  text-shadow: 0 2px 0 #000;
}
#hiscore-form .hf-row {
  display: flex;
  gap: 8px;
}
#hiscore-form input {
  flex: 1;
  padding: 10px 10px;
  border: 2px solid #FFD74A;
  border-radius: 8px;
  background: #0B1207;
  color: #fff;
  font: bold 15px -apple-system, sans-serif;
  outline: none;
  min-width: 0;
  -webkit-user-select: auto;
  user-select: auto;
}
#hiscore-form input::placeholder {
  color: #777;
}
#hiscore-form button {
  padding: 10px 14px;
  border: 2px solid #1A1A1A;
  border-radius: 8px;
  background: #FFD74A;
  color: #1A1A1A;
  font: bold 14px -apple-system, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
}
#hiscore-form button:active {
  transform: translateY(1px);
}
