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

html {
  font-family: 'Alexandria', sans-serif;
  font-size: 62.5%;
  letter-spacing: 2px;
  color: #f8f9fa;
}

body {
  /* background-image: linear-gradient(120deg, #8f4a4a 0%, #ebedee 100%); */
  background-color: #f1f3f5;
}

/******* <MODAL> ********/
.modal-rules {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40rem;
  padding: 4.8rem;
  background-color: #fff;
  border-radius: 8px;
  color: #212529;
  z-index: 100;

  box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
    rgba(0, 0, 0, 0.3) 0px 30px 60px -30px,
    rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
  animation: showUp 0.3s;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  z-index: 5;
}

.close-modal {
  position: absolute;
  border: none;
  background: none;
  top: 0.5rem;
  right: 1.75rem;
  font-size: 6rem;
  cursor: pointer;
  transition: all 0.1s ease;
}

.close-modal:active {
  transform: translateY(0.3rem);
}

.modal-rules h1 {
  margin-bottom: 2.4rem;
  font-size: 3.6rem;
}

.modal-rules p {
  font-size: 1.6rem;
}
/******* </MODAL> ********/

main {
  margin-top: 25rem;

  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.6rem;
}

.player {
  position: relative;
  width: 40rem;
  height: 50rem;
  text-align: center;
  padding: 3.2rem;
  border-radius: 16px;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
    rgba(0, 0, 0, 0.3) 0px 30px 60px -30px,
    rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;

  background-image: linear-gradient(
    -225deg,
    hsl(243, 100%, 92%) 0%,
    hsl(240, 100%, 76%) 100%
  );
}

.player::after {
  content: '🔴';
  position: absolute;
  top: 5%;
  right: 5%;
  font-size: 2rem;
  animation: showUp 0.5s ease;
}

.player--active::after {
  content: '🟢';
  position: absolute;
  top: 5%;
  right: 5%;
  font-size: 2rem;
  animation: showIn 0.4s ease;
}

.player--1 {
  background-image: linear-gradient(
    -225deg,
    hsl(243, 100%, 82%) 0%,
    hsl(240, 100%, 66%) 100%
  );
}

.player--winner {
  background-image: linear-gradient(to right, #ffc3a0 0%, #ffafbd 100%);
}

.name {
  margin-top: 2.4rem;
  font-size: 3.6rem;
  text-shadow: 0 2px 4px#212529;
}

.score {
  margin-top: 4.8rem;
  font-size: 6.2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px#212529;
}

.current-label {
  margin-top: 12.8rem;
  font-size: 2rem;
  text-shadow: 0 2px 4px#212529;
}

.current-score {
  margin-top: 2.4rem;
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 0 2px 4px#212529;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.btn {
  display: inline-block;
  width: 18rem;
  padding: 1.2rem;
  border-radius: 8px;
  margin: 0 auto;
  border: 1px solid transparent;

  font-family: inherit;
  background-color: transparent;
  font-size: 2rem;
  cursor: pointer;
  transition: 0.1s ease;
  background-color: #f8f9fa;
  box-shadow: rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
}

.btn::first-letter {
  font-size: 2.4rem;
}

.btn:hover {
  background-color: #f1f3f5;
}

.btn:active {
  transform: translateY(0.3rem);
  background-color: #dee2e6;
}

.dice {
  display: block;
  margin: 0 auto;
  width: 15.8rem;
  height: 15.8rem;
  animation: showUp 0.1s ease forwards;
}

.hidden {
  display: none;
}

footer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin-top: 1.2rem;
  font-size: 1.3rem;
  text-align: center;
  color: #adb5bd;
}

footer a {
  color: #adb5bd;
}

/******* ANIMATIONS *********/
.player--0 {
  transition: all ease;
  animation: showIn 0.6s;
}

.controls {
  transition: all ease;
  animation: showIn 0.7s;
}

.player--1 {
  transition: all ease;
  animation: showIn 0.8s;
}

@keyframes showIn {
  0% {
    transform: translate(0, -5rem);
    opacity: 0;
  }
  100% {
    transform: translate(0, 0);
    opacity: 1;
  }
}

@keyframes showUp {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* - FONT SIZE SYSTEM (px) 10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98

- SPACING SYSTEM (px) 2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128 */
