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

html {
  font-size: 62.5%;
  box-sizing: border-box;
}

body {
  font-family: 'Quicksand', sans-serif;
  background: linear-gradient(
    135deg,
    rgba(7, 174, 234, 1) 0%,
    rgba(43, 245, 152, 1) 100%
  );
  width: 100vw;
  height: 100vh;
}

h1 {
  text-transform: uppercase;
  font-size: 4.8rem;
  text-align: center;
  padding-top: 8rem;
  padding-bottom: 3rem;
}

h2 {
  font-size: 4rem;
  font-weight: 600;
}

main {
  background-color: #d3ecf5;
  max-width: 100rem;
  height: 50rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
  box-shadow: 2rem 2rem 3rem rgba(108, 108, 108, 0.2);
}

.player {
  flex: 50%;
  height: 50rem;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.player--active {
  background-color: rgba(182, 197, 214, 0.6);
}

.player--winner {
  background-color: #b5ea07;
  animation: blink 0.5s 8 backwards;
}

.invisible {
  display: none;
}

.confetti {
  font-size: 4rem;
  position: absolute;
  top: 8rem;
  animation: confetti-fall 5s linear 1;
}

.score {
  font-size: 8rem;
  font-weight: 700;
  text-align: center;
  color: #07aeea;
}

.current {
  margin-top: 5rem;
  width: 20rem;
  height: 15rem;
  border-radius: 10px;
  background-color: #07aeea;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: center;
  color: #fff;
}

.current-label {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.current-score {
  font-size: 4rem;
  font-weight: 600;
}

.img {
  width: 10rem;
  height: 10rem;
  position: absolute;
  top: 15rem;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.2s;
}

.btn {
  background-color: #fff;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: none;
  padding: 1.2rem 2.4rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.8rem;
}

.btn--new {
  position: absolute;
  top: 3rem;
}

.btn--roll {
  position: absolute;
  bottom: 10rem;
}

.btn--hold {
  position: absolute;
  bottom: 3rem;
}

/* Footer */
footer {
  color: #fff;
  text-align: center;
  font-size: 1.4rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.footer-link,
.footer-link:link,
.footer-link:visited {
  color: #fff;
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.6s;
}

.footer-link:hover,
.footer-link:active {
  transform: scale(1.2);
}

@keyframes blink {
  from {
    background-color: #b5ea07;
  }
  to {
    background-color: #d6ffa1;
  }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100%) rotate(0);
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
  }
}

@media (max-width: 800px) {
  main {
    height: 100rem;
    margin: 0 auto;
    flex-direction: column;
  }

  .player {
    width: 100%;
  }

  .img {
    width: 8rem;
    height: 8rem;
    top: 46rem;
  }

  .btn--new {
    top: 47.6rem;
    left: 1rem;
  }

  .btn--roll {
    bottom: 50.4rem;
    right: 1rem;
  }

  .btn--hold {
    bottom: 44.8rem;
    right: 1rem;
  }

  .confetti {
    animation: confetti-fall 5s linear 1 forwards;
  }
}

@media (max-width: 453px) {
  .btn {
    font-size: 1.4rem;
    padding: 1rem 2rem;
  }

  .btn--new {
    top: 48.2rem;
  }

  .btn--roll {
    bottom: 50.4rem;
  }

  .btn--hold {
    bottom: 45.8rem;
  }
}
