@import url("https://fonts.googleapis.com/css2?family=Nunito&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
  user-select: none;
}

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

body {
  font-family: "Nunito", sans-serif;
  font-weight: 400;
  height: 100vh;
  color: #333;
  background-color: #cc5de8;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* LAYOUT */
main {
  position: relative;
  width: 100rem;
  height: 60rem;
  background-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(200px);
  filter: blur();
  box-shadow: 0 3rem 5rem rgba(0, 0, 0, 0.25);
  border-radius: 2rem;
  overflow: hidden;
  display: flex;
}

.player {
  flex: 50%;
  padding: 9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.75s;
}

.name {
  position: relative;
  font-size: 4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  word-spacing: 2px;
  font-weight: 300;
  margin-bottom: 1rem;
}

.score {
  font-size: 8rem;
  font-weight: 300;
  color: #9c36b5;
  margin-bottom: auto;
}

.player--active {
  background-color: rgba(255, 255, 255, 0.4);
}
.player--active .name {
  font-weight: 700;
}
.player--active .score {
  font-weight: 400;
}

.player--active .current {
  opacity: 1;
}

.current {
  background-color: #9c36b5;
  opacity: 0.8;
  border-radius: 9px;
  color: #fff;
  width: 65%;
  padding: 2rem;
  text-align: center;
  transition: all 0.75s;
}

.current-label {
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-size: 1.7rem;
  color: #ddd;
}

.current-score {
  font-size: 3.5rem;
}

.btn,
.btn--target {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #444;
  background: none;
  border: none;
  font-size: 1.8rem;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 400;
  transition: all 0.2s;

  background-color: rgba(255, 255, 255);

  padding: 0.7rem 2.5rem;
  border-radius: 50rem;
  box-shadow: 0 1.75rem 3.5rem rgba(0, 0, 0, 0.1);
}

.btn--target::first-letter {
  font-size: 2.4rem;
  display: inline-block;
  margin-right: 0.7rem;
}

.btn::first-letter {
  font-size: 2.4rem;
  display: inline-block;
  margin-right: 0.7rem;
}

.btn--new {
  top: 4rem;
}
.btn--roll {
  top: 39.3rem;
}
.btn--hold {
  top: 46.1rem;
}

.btn:active {
  transform: translate(-50%, 3px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.btn:focus {
  outline: none;
}

.dice {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%);
  height: 10rem;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.2);
  border-radius: 1.2rem;
}

.player--winner {
  background: linear-gradient(to left, lightgreen, #40c057);
}

.player--winner .name {
  font-weight: 700;
  color: #9c36b5;
}

.hidden {
  display: none;
}

.diceMove {
  animation: rotate 0.3s infinite linear;
  transform-origin: center center;
  transform: translate(-50%);
  transition: all 0.3s ease;
}
@keyframes rotate {
  0% {
    transform: translate(-50%) rotate(0deg) scale(1.2);
  }
  100% {
    transform: translate(-50%) rotate(360deg) scale(1.2);
  }
}

.sound {
  position: absolute;
  top: 5%;
  right: 5%;
  height: 24px;
  width: 24px;
  cursor: pointer;
  filter: invert(100%);
}

.btn--target {
  position: absolute;
  top: 20%;
  padding: 0.9rem 2.8rem;
}

.color {
  position: absolute;
  top: 2%;
  left: 2%;
  cursor: pointer;
}

.target {
  width: 50px;
  background-color: rgba(255, 255, 255);
  color: #444;
  border: none;
  font-size: 2rem;
  text-transform: uppercase;
  font-weight: 400;
  outline: none;
  caret-color: #9c36b5;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.badge {
  position: absolute;
  top: 17%;
  right: 45%;
  background-color: #9c36b5;
  color: white;
  padding: 3px 15px;
  font-size: 14px;
  border-radius: 24px;
  z-index: 999999;
  animation: move 0.5s alternate infinite;
}
@keyframes move {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-3px);
  }
}

.cancle {
  z-index: 99999;
  filter: invert(15%);
}
