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

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

*::selection {
  background-color: #6a0dad;
  color: #fff;
}

body {
  font-family: "Nunito", sans-serif;
  color: #333;
  height: 100dvh;
  background: linear-gradient(to top left, #c573ff, #6a0dad);
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  position: relative;
  display: flex;
  width: 1000px;
  height: 600px;
  background-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(200px);
  border-radius: 16px;
  box-shadow: 0 32px 48px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 50%;
  padding: 80px;
  transition: all 0.75s ease;
}

.name {
  position: relative;
  font-size: 40px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.score {
  font-size: 80px;
  font-weight: 300;
  color: #6a0dad;
  margin-bottom: auto;
}

.current {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-align: center;
  width: 65%;
  background-color: #6a0dad;
  padding: 20px;
  border-radius: 16px;
  opacity: 0.8;
  transition: all 0.75s ease;
}

.current-label {
  font-size: 18px;
  color: #ddd;
  text-transform: uppercase;
}

.current-score {
  font-size: 36px;
}

.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;
}

.player--winner {
  background-color: #171725;
}

.player--winner .name {
  font-weight: 700;
  color: #6a0dad;
}

.dice {
  position: absolute;
  left: 50%;
  top: 170px;
  transform: translateX(-50%);
  height: 100px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: inherit;
  font-size: 18px;
  color: #444;
  text-transform: uppercase;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  padding: 8px 24px;
  border: none;
  border-radius: 99px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn--new {
  top: 40px;
}

.btn--roll {
  top: 393px;
}

.btn--hold {
  top: 478px;
}

.btn:active {
  transform: translate(-50%, 4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn:focus {
  outline: none;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.1),
    0 0 0 6px #6a0dad;
}

.hidden {
  display: none;
}
