:root {
  --bg-top: #f7e6b5;
  --bg-bottom: #78b257;
  --text: #1f2937;
  --panel: rgba(255, 248, 220, 0.76);
  --panel-border: rgba(96, 65, 17, 0.25);
  --leaf: #205f2b;
  --sun: #f6c445;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 247, 196, 0.85) 0%, rgba(255, 247, 196, 0) 32%),
    linear-gradient(180deg, #cbe9ff 0%, #daf6b5 32%, #90d36c 62%, #5f9544 100%);
}

.app {
  width: min(950px, 100%);
  text-align: center;
}

.hero {
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.75rem;
  color: #7c5d10;
}

h1 {
  margin: 0 0 6px;
  color: #174d20;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.35);
}

.help {
  margin: 0;
  font-size: 1rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  background: var(--panel);
  border: 2px solid var(--panel-border);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 10px 25px rgba(51, 65, 12, 0.08);
}

.difficulty,
.audio {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.difficulty span {
  font-weight: 700;
  color: var(--leaf);
}

.stage {
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.16));
  box-shadow: 0 18px 40px rgba(43, 67, 20, 0.18);
}

canvas {
  width: 100%;
  max-width: 900px;
  display: block;
  border: 4px solid #174d20;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(20, 83, 45, 0.22);
  background: linear-gradient(var(--bg-top), var(--bg-bottom));
  touch-action: none;
}

.status-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #365314;
}

.status-strip span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 251, 235, 0.8);
  border: 1px solid rgba(133, 77, 14, 0.16);
}

.controls {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  border: 2px solid #14532d;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff5be, #f9db73);
  color: #14532d;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(20, 83, 45, 0.14);
  transition: transform 120ms ease, filter 120ms ease;
}

button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(1px);
}

.diff-btn.active {
  background: linear-gradient(180deg, #ffc78a, #ef8f44);
  color: #4a2303;
}

#startBtn {
  background: linear-gradient(180deg, #b6f378, #58b83a);
  color: #123b19;
}

#pauseBtn {
  background: linear-gradient(180deg, #dbeafe, #93c5fd);
}

#musicBtn.off,
#sfxBtn.off {
  background: linear-gradient(180deg, #e5e7eb, #cbd5e1);
  color: #475569;
}

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

  .toolbar {
    justify-content: center;
  }

  .status-strip {
    font-size: 0.82rem;
  }

  button {
    padding: 7px 10px;
    font-size: 0.88rem;
  }
}
