html {
  box-sizing: border-box;
  font-size: 10px;
  background: #9BE651;
  background-image: url('assets/grass.webp');
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  padding: 0;
  margin: 0;
  font-family: 'Amatic SC', cursive;
}

h1 {
  text-align: center;
  font-size: 10rem;
  line-height: 1;
  margin-bottom: 0;
}

h2 {
  font-size: 5rem;
}

.score {
  background: rgba(255, 255, 255, 0.2);
  padding: 0 3rem;
  line-height: 1;
  border-radius: 1rem;
}

.actions {
  margin-top: 7rem;
}

.cheer {
  display: none;
}

.btn {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0 auto;
  background: #E56F4C;
  border: none;
  padding: 2rem 3rem;
  border-radius: 5px;
  font-size: 2rem;
  cursor: pointer;
  text-transform: uppercase;
  color: #fff;
}

.start {
  background: #443029;
}

.btn img {
  height: 30px;
  width: 30px;
}

.game {
  width: 600px;
  height: 400px;
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
}

.hole {
  flex: 1 0 33.33%;
  overflow: hidden;
  position: relative;
}

.hole:after {
  display: block;
  background: url(assets/dirt.svg) bottom center no-repeat;
  background-size: contain;
  content: '';
  width: 100%;
  height: 70px;
  position: absolute;
  z-index: 2;
  bottom: -30px;
}

.mole {
  background: url('assets/mole.svg') bottom center no-repeat;
  background-size: 60%;
  position: absolute;
  top: 100%;
  width: 100%;
  height: 100%;
  transition: all 0.4s;
  cursor: pointer;
}

.hole.up .mole {
  top: 0;
}

.hole.up .mole.shake {
  transition: .2s;
  top: 50%;
}

.hammer {
  position: absolute;
  top: 60px;
  left: 30px;
  transform: translate(-30%, -50%);
  transition: transform .1s;
  z-index: 3;
  pointer-events: none;
}

.hammer.active {
  transform: translate(-20%, -20%) rotate(-45deg);
}

.game-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 999;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}

.game-over.active {
  display: flex;
}

/* animations */
.shake {
  animation: move .5s ease-in;
}

@keyframes move {

  10%,
  90% {
    transform: translate3d(-8px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(8px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-12px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(12px, 0, 0);
  }
}

.animated {
  animation-duration: 1s;
  animation-iteration-count: infinite;
}

@keyframes tada {
  0% {
    transform: scale3d(1, 1, 1);
  }

  10%,
  20% {
    transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
  }

  30%,
  50%,
  70%,
  90% {
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
  }

  40%,
  60%,
  80% {
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
  }

  100% {
    transform: scale3d(1, 1, 1);
  }
}

.tada {
  animation-name: tada;
}