/* 打地鼠 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #c5e1a5, #7cb342);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

#stage { position: relative; width: 500px; transform-origin: center; }

#topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px;
  color: #33691e;
}
#topbar a, #topbar button {
  font-size: 20px;
  width: 40px; height: 40px;
  border: none; border-radius: 12px;
  background: rgba(255, 255, 255, .75);
  cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 6px rgba(51, 105, 30, .25);
}
#topbar button:hover, #topbar a:hover { background: #fff; }

#statScore, #statTime {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .75);
  padding: 6px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 3px 6px rgba(51, 105, 30, .25);
}
#statScore b, #statTime b { font-size: 20px; color: #e65100; }
#ctrlBtns { margin-left: auto; display: flex; gap: 8px; }

#lawn {
  background: linear-gradient(180deg, #aed581, #8bc34a);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(51, 105, 30, .35);
}

#holes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hole {
  position: relative;
  aspect-ratio: 1;
  background: none; border: none; padding: 0;
  cursor: pointer;
  overflow: hidden;
  border-radius: 14px;
}
.hole::after {
  content: '';
  position: absolute; left: 12%; right: 12%; bottom: 6%;
  height: 18%;
  background: #6d4c41;
  border-radius: 50%;
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, .45);
}

.mole {
  position: absolute;
  left: 18%; right: 18%; bottom: 12%;
  font-size: clamp(30px, 9vw, 46px);
  transform: translateY(110%);
  transition: transform .12s ease-out;
  z-index: 1;
}
.hole.up .mole { transform: translateY(0); }
.hole.hit .mole { transform: translateY(10%) scale(.9); }
.hole.up:not(.hit):active .mole { filter: brightness(1.2); }

#hint {
  text-align: center;
  margin-top: 12px;
  font-size: 13px; font-weight: 700;
  color: #33691e;
}

#overlay {
  position: absolute; inset: 44px 0 0 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27, 60, 10, .45);
  border-radius: 18px;
  z-index: 2;
}
#overlay.hidden { display: none; }

.screen {
  background: #fff;
  border-radius: 20px;
  padding: 26px 34px;
  text-align: center;
  color: #33691e;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
  animation: pop .22s ease;
}
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
.screen h2 { font-size: 26px; margin-bottom: 10px; }
.screen p { font-size: 14px; color: #556; margin-bottom: 16px; line-height: 1.8; }
.screen button {
  display: block; width: 200px; margin: 8px auto 0;
  padding: 10px 0;
  font-size: 16px; font-weight: 700;
  border: none; border-radius: 12px;
  background: #e8f5e9; color: #33691e;
  cursor: pointer;
}
.screen button:hover { background: #dcedc8; }
.screen button.big { background: #7cb342; color: #fff; font-size: 18px; padding: 12px 0; }
.screen button.big:hover { background: #689f38; }
