*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
  font-family: 'Nata Sans';
  min-height: 100vh;
  text-align: center;
  color: black;
  background-color: white;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 2rem;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
}

h1 {
  font-size: clamp(3vw, 2.5rem, 5vw);
}

.cat-btn {
  cursor: pointer;
  border: none;
  background: transparent;
}

.cat-picture {
  width: 250px;
  aspect-ratio: 1;
  object-fit: cover;
}

.cat-picture.normal-state {
  content: url("../assets/pictures/normal.jpg");
}

.cat-picture.happy-state {
  content: url("../assets/pictures/happy.jpg");
}

.cat-picture.angry-state {
  content: url("../assets/pictures/angry.jpg");
}

.warning {
  font-size: .875rem;
  color: red;
}

@media (max-width: 28rem) {
  .warning {
    font-size: .625rem;
  }
}

.warning.hidden {
  display: none;
}

@keyframes shaking {
  0% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(20px)
  }

  50% {
    transform: translateX(-20px)
  }

  75% {
    transform: translateX(20px)
  }

  100% {
    transform: translateX(0)
  }
}

.shake-animation {
  animation-name: shaking;
  animation-duration: 500ms;
  animation-timing-function: ease-in-out;
}

.scratch-container {
  position: fixed;
  inset: 0;
  background-color: rgba(180, 0, 0, 0.5);
  display: grid;
  place-items: center;
}

.scratch-container.hidden {
  display: none;
}

@keyframes scratch {
  0% {
    opacity: 1;
  }

  10% {
    opacity: 0.8;
  }

  20% {
    opacity: 0.7;
  }

  100% {
    opacity: 0;
  }
}

.scratch-animation {
  animation-name: scratch;
  animation-duration: 3000ms;
}