@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Poppins:wght@400;700&display=swap");

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

html {
  font-size: 62.5%;
}

body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0.6),
      rgba(0, 0, 0, 0)
    ),
    url(assets/nik-NYpOl-PJDkM-unsplash.jpg);
  background-size: cover;
}

main {
  position: relative;
  width: 100rem;
  filter: blur();
  height: 60rem;
  backdrop-filter: blur(30px);
  box-shadow: 0 3rem 5rem rgba(0, 0, 0, 0.25);
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  -webkit-border-radius: 9px;
  -moz-border-radius: 9px;
  -ms-border-radius: 9px;
  -o-border-radius: 9px;
  font-family: "Poppins", sans-serif;
}

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

.name {
  font-size: 4rem;
  font-weight: 700;
  word-spacing: 2px;
  letter-spacing: 1px;
  color: #ffd700;
  text-shadow: 0 0 2px #b22222;
}

.score {
  font-size: 10rem;
  text-shadow: 1px 1px 2px #ffd700;

  color: white;
  margin: auto;
}

.current {
  background: linear-gradient(
    to bottom right,
    #f3e5ab,
    #ffe4b5
  ); /* kuning muda gradasi */
  box-shadow: 0 0.4rem 1rem rgba(255, 223, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background-color: bisque;
  width: 65%;
  padding: 2rem;
  border-radius: 1rem;
  -webkit-border-radius: 1rem;
  -moz-border-radius: 1rem;
  -ms-border-radius: 1rem;
  -o-border-radius: 1rem;
}

.current-label {
  font-size: 1.7rem;
}

.current-score {
  font-size: 3.5rem;
  text-shadow: 1px 1px 2px #ffd700;
  font-weight: 700;
  color: #8b0000;
}

.player-active {
  background-color: rgba(255, 255, 255, 0.4);
}

button {
  position: absolute;
  left: 50%;
  transform: translate(-50%);
  -webkit-transform: translate(-50%);
  -moz-transform: translate(-50%);
  -ms-transform: translate(-50%);
  -o-transform: translate(-50%);
  transition: all 0.15s;
  -webkit-transition: all 0.15s;
  -moz-transition: all 0.15s;
  -ms-transition: all 0.15s;
  -o-transition: all 0.15s;
}

button:hover {
  background-color: transparent;
}

.button-new-game {
  bottom: 9rem;
  padding: 1.3rem 5rem;
  font-size: 1.7rem;
  font-weight: 600;
  background-color: #eb5273;
  border: 0;
  border-radius: 1.5rem;
  cursor: pointer;
  color: white;
  -webkit-border-radius: 1.5rem;
  -moz-border-radius: 1.5rem;
  -ms-border-radius: 1.5rem;
  -o-border-radius: 1.5rem;
  transition: all 0.75s;
  -webkit-transition: all 0.75s;
  -moz-transition: all 0.75s;
  -ms-transition: all 0.75s;
  -o-transition: all 0.75s;
}

.button-new-game:hover {
  background-color: #ffb347;
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.7);
}

.button-roll {
  top: 39.3rem;
  padding: 1.1rem 4rem;
  font-size: 1.7rem;
  font-weight: 600;
  background-color: #ffb347;
  border: 0;
  border-radius: 1.5rem;
  cursor: pointer;
  color: white;
  /* background: linear-gradient(to right bottom, #d87d41 0%, #ffb347 100%); */
  transition: background 0.75s, color 0.785s;
  -webkit-transition: background 0.75s, color 0.785s;
  -moz-transition: background 0.75s, color 0.785s;
  -ms-transition: background 0.75s, color 0.785s;
  -o-transition: background 0.75s, color 0.785s;
}

.button-roll:hover {
  background-color: #eb5273;
}

.button-hold {
  top: 46.1rem;
  padding: 1.3rem 1.5rem;
  font-size: 1.7rem;
  font-weight: 600;
  background-color: #d87d41;
  border: 0;
  border-radius: 1.5rem;
  cursor: pointer;
  color: white;
}

.card {
  position: absolute;
  max-width: 15rem;
  left: 50%;
  transform: translate(-50%);
  top: 25%;
  -webkit-transform: translate(-50%);
  -moz-transform: translate(-50%);
  -ms-transform: translate(-50%);
  -o-transform: translate(-50%);
}

.card1 {
  z-index: 10;
  transition: all 0.5s ease-out;
  -webkit-transition: all 0.5s ease-out;
  -moz-transition: all 0.5s ease-out;
  -ms-transition: all 0.5s ease-out;
  -o-transition: all 0.5s ease-out;
}

/* .card1position {
  left: 53%;
} */

.card2 {
  z-index: 5;
  transform: rotate(15deg);
  -webkit-transform: rotate(15deg);
  -moz-transform: rotate(15deg);
  -ms-transform: rotate(15deg);
  -o-transform: rotate(15deg);
  transition: all 0.5s ease-out;
  -webkit-transition: all 0.5s ease-out;
  -moz-transition: all 0.5s ease-out;
  -ms-transition: all 0.5s ease-out;
  -o-transition: all 0.5s ease-out;
}

.card3 {
  z-index: 3;
  left: 35%;
  transform: rotate(-15deg);
  -webkit-transform: rotate(-15deg);
  -moz-transform: rotate(-15deg);
  -ms-transform: rotate(-15deg);
  -o-transform: rotate(-15deg);
  transition: all 0.5s ease-out;
  -webkit-transition: all 0.5s ease-out;
  -moz-transition: all 0.5s ease-out;
  -ms-transition: all 0.5s ease-out;
  -o-transition: all 0.5s ease-out;
}

.card1-end-game {
  top: 27%;
  transform: scale(2) translate(-23%);
  -webkit-transform: scale(2) translate(-23%);
  -moz-transform: scale(2) translate(-23%);
  -ms-transform: scale(2) translate(-23%);
  -o-transform: scale(2) translate(-23%);
}

.card2-end-game {
  top: 28%;
  transform: scale(2) rotate(15deg);
  -webkit-transform: scale(2) rotate(15deg);
  -moz-transform: scale(2) rotate(15deg);
  -ms-transform: scale(2) rotate(15deg);
  -o-transform: scale(2) rotate(15deg);
}

.card3-end-game {
  top: 28%;
  transform: scale(2) rotate(-15deg);
  -webkit-transform: scale(2) rotate(-15deg);
  -moz-transform: scale(2) rotate(-15deg);
  -ms-transform: scale(2) rotate(-15deg);
  -o-transform: scale(2) rotate(-15deg);
}

.button-end {
  top: 53.1rem;
  padding: 1.3rem 7rem;
  font-size: 1.7rem;
  font-weight: 600;
  background-color: #8b0000;
  border: 0;
  border-radius: 1.5rem;
  cursor: pointer;
  color: white;
  transition: background 0.3s ease-in, box-shadow 0.3s ease-in,
    color 0.3s ease-in;
  -webkit-transition: background 0.3s ease-in, box-shadow 0.3s ease-in,
    color 0.3s ease-in;
  -moz-transition: background 0.3s ease-in, box-shadow 0.3s ease-in,
    color 0.3s ease-in;
  -ms-transition: background 0.3s ease-in, box-shadow 0.3s ease-in,
    color 0.3s ease-in;
  -o-transition: background 0.3s ease-in, box-shadow 0.3s ease-in,
    color 0.3s ease-in;
}

.button-end:hover {
  background: linear-gradient(to bottom right, #b22222, #ffd700);
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.7);
  color: #ffd700;
}

/* winner */
.winner {
  background: linear-gradient(
    to bottom right,
    rgba(139, 0, 0, 0.824),
    rgba(255, 217, 0, 0.463)
  );
  padding: 9rem;
  z-index: 100;
  position: absolute;
  width: 100rem;
  filter: blur();
  height: 60rem;
  backdrop-filter: blur(50px);
  box-shadow: 0 3rem 5rem rgba(226, 107, 107, 0.75);
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  -webkit-border-radius: 9px;
  -moz-border-radius: 9px;
  -ms-border-radius: 9px;
  -o-border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-filter: blur();
  transition: all 0.5s ease-in;
  -webkit-transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
  -moz-transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
  -ms-transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
  -o-transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
}

.winner.show {
  opacity: 1;
  visibility: visible;
}

.player-winner {
  font-size: 5rem;
  font-weight: 700;
  word-spacing: 2px;
  letter-spacing: 1px;
  color: #ffd700;
  text-shadow: 0 0 2px #b22222;
}

.winner-player {
  font-size: 4rem;
  color: #ffd700;
  text-shadow: 0 0 2px #b22222;
  font-weight: 700;
  word-spacing: 2px;
  letter-spacing: 1px;
}

.winner-score {
  font-size: 10rem;
  color: #ffd700;
  text-shadow: 0 0 2px #b22222;
  margin-top: 2rem;
}
