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

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

body {
  height: 100vh;
  background: linear-gradient(to top left, #027bce, #00487c) no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
}

.container {
  width: 96%;
  max-width: 1120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.4);
  box-shadow: 1rem 1rem 2rem black;
  border-radius: 20px;
  overflow: hidden;
}

.player {
  width: 50%;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 500px;
  position: relative;
  transition: all 0.75s;
}

.player-label {
  color: black;
  font-size: 1.5rem;
  padding-bottom: 5rem;
  padding-top: 2rem;
}

.score0,
.score1 {
  font-size: 3rem;
  color: rgba(2, 123, 206, 0.9);
  margin-top: -10px;
  padding-bottom: 3rem;
}

.current-score1,
.current-score0 {
  font-size: 1.8rem;
  margin-top: 18px;
}
.current-container {
  margin-top: 60px;
  opacity: 0.6;
  font-size: 1rem;
  padding: 10px 10px;
  border-radius: 10px;
  color: #fff;
  background-color: rgba(2, 123, 206, 0.4);
}

@media (min-width: 992px) {
  .container {
    width: 60%;
    height: 600px;
  }

  .player {
    height: 600px;
  }

  .player-label {
    font-size: 2.7rem;
    padding-bottom: 6.5rem;
  }

  .score0,
  .score1 {
    font-size: 5rem;
    margin-top: -60px;
    padding-bottom: 0;
  }

  .current-container {
    margin-top: 120px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    padding: 20px 50px;
  }

  .current-score0,
  .current-score1 {
    font-size: 2.6rem;
    margin-top: 0;
  }
}

button {
  padding: 10px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 1;
  border: none;
  border-radius: 15px;
  box-shadow: 4px 4px 3px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  color: black;
  font-size: 1rem;
}

button::first-letter {
  display: inline-block;
  font-size: 1rem;
  margin-right: 0.2rem;
}

.button-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.new-game {
  margin-bottom: 80px;
}

.hold {
  margin-top: 10px;
}

.dice {
  width: 90px;
  position: absolute;
  top: 10px;
  z-index: 1;
}

.lang {
  position: absolute;
  top: 40px;
  right: 20px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 7px;
  padding: 3px;
}

.lang-buttons {
  font-size: 1rem;
}

.lang-buttons a {
  text-decoration: none;
  color: black;
  font-weight: bold;
}

.lang-buttons a.active {
  color: darkcyan;
}

.fa-language {
  font-size: 2rem;
}

@media (min-width: 992px) {
  .new-game {
    margin-bottom: 450px;
    margin-top: -50px;
  }

  button {
    font-size: 1.3rem;
  }

  button::first-letter {
    display: inline-block;
    font-size: 1.3rem;
    margin-right: 0.2rem;
  }

  .dice {
    width: 110px;
    position: absolute;
    top: 260px;
    z-index: 1;
  }

  .roll-dice {
    margin-top: -140px;
  }

  .lang {
    top: 20px;
    right: 150px;
  }

  .fa-language {
    font-size: 3.5rem;
  }

  .lang-buttons {
    font-size: 2rem;
  }
}

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

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

.player-active .player-label {
  font-weight: 800;
}

.player-active .score0,
.player-active .score1,
.player-active .current-container {
  font-weight: 500;
}

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

.hidden {
  display: none !important;
}

.player-winner .player-label {
  color: #f8f7f7;
}

.player-winner .score0,
.player-winner .score1 {
  color: white;
}

.player-winner .current-container {
  background-color: rgba(2, 123, 206, 0.5);
}

/* -------------------------     MODAL    --------------------------*/

#open-modal {
  cursor: pointer;
  position: absolute;
  font-size: 1.6rem;
  bottom: -135px;
  color: white;
  background-color: #00487c;
  padding: 9px;
  border-radius: 7px;
  z-index: 3;
  transition: 0.4s all;
}

#open-modal:hover {
  background-color: white;
  color: #00487c;
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 1.5rem;
  cursor: pointer;
  color: darkred;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background-color: white;
  width: 300px;
  height: 350px;
  z-index: 5;
  box-shadow: 0 6px 6px rgba(0, 0, 0, 0.6);
  padding: 10px;
  border-radius: 13px;
}

.overlay {
  position: absolute;
  top: 0;
  top: 0;
  z-index: 4;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
}

.modal-text {
  margin-top: 12px;
  text-align: justify;
}

@media (min-width: 992px) {
  #open-modal {
    bottom: -80px;
    font-size: 2rem;
    padding: 13px;
  }

  .modal {
    width: 600px;
    height: auto;
    padding: 3rem 2rem;
  }

  .modal-text {
    font-size: 1.3rem;
    margin: 1.4rem 0;
  }

  .modal h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    margin-top: 0;
  }

  .close-modal {
    font-size: 2rem;
    right: 23px;
    top: 23px;
  }

  .overlay {
    backdrop-filter: blur(3px);
  }
}

/* -----------------------   colors  --------------------------- */

.lightgreen {
  color: lightgreen;
}

.red {
  color: red;
}

.darkBlue {
  color: #00487c;
}

.lightGray {
  color: #9b9696;
}

.yellow {
  color: goldenrod;
}

.darkGray {
  color: #525252;
}

.darkRed {
  color: darkred;
}

span {
  font-weight: 600;
}

.zero-opacity {
  background-color: rgba(255, 255, 255, 0.9);
}
