@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Fredoka', cursive;
  background: linear-gradient(#a3d9ff, #e0f7fa);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game {
  background: #fff8e1;
  padding: 20px 30px 40px;
  border-radius: 25px;
  box-shadow: 0 8px 25px rgba(0,0,0,.2);
  text-align: center;
}

h1 { margin: 0 0 15px; font-size: 2.3rem; color: #ff7043; }

#hud {
  display: flex;
  justify-content: space-around;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

#board {
  display: grid;
  grid-template-columns: repeat(3, 90px);
  gap: 12px;
}

.hole {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, #8bc34a 0%, #5d4037 80%);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 4px 10px rgba(0,0,0,.3);
}

.hole.hit {
    animation: shake .15s;
  }
  @keyframes shake {
    0% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    100% { transform: translateX(0); }
  }

.mole {
  position: absolute;
  bottom: 100%; /* sembunyi */
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 50px;
  line-height: 90px;
  cursor: pointer;
  transition: bottom .15s ease;
  user-select: none;
}

.mole.up {
  bottom: 0;
  animation: pop .3s ease;
}

@keyframes pop {
  0%   { transform: scale(.5) translateY(20px); }
  60%  { transform: scale(1.1) translateY(-5px); }
  100% { transform: scale(1) translateY(0); }
}

button {
  margin-top: 20px;
  padding: 12px 28px;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  background: #ff7043;
  color: #fff;
  cursor: pointer;
  transition: .2s;
}

button:hover { transform: scale(1.05); }
button:active { transform: scale(.95); }