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

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

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

body {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  background-image: linear-gradient(90deg, #a0383d 70%, #753682);
  color: #333;
  background-repeat: no-repeat;
  position: relative;
  height: 110vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.overall {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  height: 90%;
}

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

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

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

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

.player--active {
  background-color: rgba(237, 249, 236, 0.4);
  box-shadow: inset 0 0 0 0.2rem white;
  border-radius: 9px;
}
.player--active .name {
  font-weight: 700;
}
.player--active .score {
  font-weight: 400;
}

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

.current {
  background-color: #c7365f;
  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;
}

/* ABSOLUTE POSITIONED ELEMENTS */
.btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #444;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.8rem;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 400;
  transition: all 0.2s;

  background-color: white;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);

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

.btn--instruction {
  width: 3.6rem;
  height: 3.6rem;
  font-size: 2rem;
  font-weight: 600;
  color: #000;
  border: 1px solid #fff;
  border-radius: 50%;
  background-color: #d2c344;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: 0 1.75rem 3.5rem rgba(0, 0, 0, 0.1);
}

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

.current,
.dice {
  z-index: 999;
}

.dice {
  position: absolute;
  left: 50%;
  top: 16.5rem;
  transform: translateX(-50%);
  height: 10rem;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.2);
}

.player--winner {
  background-color: #63c535c9;
  border-radius: 0px;
}

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

.hidden {
  display: none;
}

.instruction-overlay {
  padding: 3rem;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.653);
  backdrop-filter: blur(2rem);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* transform: scale(0.8); */
  transition: all 0.3s ease-out;
}

.open-instruct {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.instruction-box {
  position: relative;
  width: 80vw;
  margin: 0 auto;
  padding: 5rem;
  background-color: rgba(229, 240, 231, 0.705);
  backdrop-filter: blur(2rem);
  border-radius: 0.9rem;
  border: 2px solid #fff;
}

.instruction {
  list-style: none;
  font-size: 2.4rem;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  color: #000000;
  font-weight: 600;
}

.instruction li:last-child {
  margin-top: 4rem;
}

.btn-close {
  width: 4rem;
  height: 4rem;
  background-color: #4d9859;
  color: #000;
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1.75rem 3.5rem rgba(0, 0, 0, 0.1);
  position: absolute;
  font-size: 2.4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
}

.gradient-text {
  background-image: linear-gradient(90deg, #bc2e37, #79357e);
  background-clip: text;
  color: transparent;
}

.btn--author:link,
.btn--author:visited {
  text-decoration: underline;
  text-decoration-color: #c7365f;
}
