* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  touch-action: manipulation;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  background: #111;
}

#game {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;

  background:
    linear-gradient(
      to bottom,
      #8bd8ff 0%,
      #dff5ff 70%,
      #80c96b 70%,
      #4a8b3c 100%
    );
}


/* LIQUID CANVAS */

#liquidCanvas {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 25;

  pointer-events: none;
}


/* HUD */

#hud {
  position: absolute;
  top: 20px;
  left: 0;

  width: 100%;

  display: flex;
  justify-content: space-around;

  z-index: 40;

  font-size: 22px;
  font-weight: 900;
  color: #111;

  pointer-events: none;
}


/* START + GAME OVER */

.screen {
  position: absolute;
  z-index: 100;

  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, 0.75);
  color: white;

  text-align: center;
}

.screen h1 {
  font-size: clamp(54px, 15vw, 110px);
  margin-bottom: 10px;
}

.screen p {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
}

button {
  border: none;
  border-radius: 14px;

  padding: 18px 42px;

  font-size: 24px;
  font-weight: 900;

  cursor: pointer;

  background: #dfff00;
  color: #111;
}

button:active {
  transform: scale(0.95);
}

.hidden {
  display: none;
}


/* FOOD */

.food {
  position: absolute;

  font-size: 72px;

  cursor: pointer;
  user-select: none;

  z-index: 10;

  transform: translate(-50%, -50%);

  filter:
    drop-shadow(
      0 5px 3px rgba(0, 0, 0, 0.25)
    );
}

.hit {
  animation: hitPop 0.3s ease-out forwards;
}

@keyframes hitPop {
  0% {
    transform:
      translate(-50%, -50%)
      scale(1);
  }

  35% {
    transform:
      translate(-50%, -50%)
      scale(1.3)
      rotate(8deg);
  }

  100% {
    transform:
      translate(-50%, -50%)
      scale(0);
  }
}


/* BOTTLE */

#bottle {
  position: absolute;

  bottom: 0;
  left: 50%;

  transform: translateX(-50%);

  z-index: 30;

  pointer-events: none;
}

#bottle img {
  display: block;

  width: clamp(170px, 45vw, 240px);
  height: auto;
}


/* MOBILE */

@media (max-width: 600px) {

  #bottle {
    bottom: 0;
  }

  #bottle img {
    width: 190px;
  }

}
