@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

main {
  height: 100vh;
  width: 100vw;

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

  border-radius: 15px;

  background-image: linear-gradient(
    to bottom right,
    #4affde 0%,
    #5b9dff 33.33%,
    #d06bff 66.66%,
    #ff34d2 100%
  );
  background-size: 200% 200%;

  animation: shades 5s linear infinite alternate;
}
h1 {
  font-size: 50px;
  font-weight: 500;

  color: #fff;
}
button {
  margin: 2rem;
  background-color: #e3e3e3;
  color: #222;
  padding: 0.5rem 1rem;
  border: none;
  outline: none;
  position: relative;
  cursor: pointer;
}
button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: -1;

  background-color: rgb(34, 132, 180);

  transition: transform 300ms ease-in-out;
  transform: scaleX(0);
  transform-origin: left;
}
button {
  transition: color 300ms ease-in-out;
  z-index: 1;
}
button:hover::before,
button:focus::before {
  transform: scaleX(1);
}
button:hover,
button:focus {
  color: white;
}
h2,
a {
  text-decoration: none;
  font-weight: 500;
  font-size: 25px;
  color: #fff;
}

@keyframes shades {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100% 100%;
  }
}

@media only screen and (max-width: 480px) {
  h1 {
    font-size: 30px;
  }
  button {
    margin: 1.5rem;
  }
  h2 {
    font-size: 20px;
    position: absolute;
    bottom: 5vh;
  }
  a {
    font-size: 20px;
  }
}
