@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@600;700&display=swap');

body{
  background-image: radial-gradient(circle at top, hsl(214, 47%, 23%), hsl(237, 49%, 15%)); /**/
  margin: 0;
  height: 100vh;
  font-family: 'Barlow Semi Condensed', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px
}

/* HEADER */

header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  border: hsl(217, 16%, 45%) solid 2px;
  border-radius: 15px;
  text-transform: uppercase;
  width: 800px;
  height: 125px;
  box-sizing: border-box;
  padding: 20px;
  margin-top: 30px;
}

.title-container > h1{
  margin: 0;
  line-height: .8;
  font-size: 32px;
}
.scoreboard{
  background-color: white;
  width: 115px;
  height: 90px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 2px 2px 0px hsl(220, 82%, 2%);
}
.scoreboard > h4{
  color: hsl(229, 64%, 46%);
  font-weight: 600;
  margin: 0;
  font-size: 15px;
  letter-spacing: 2px;
}
.scoreboard > .score{
  color: hsl(229, 25%, 31%);
  margin: 0;
  font-size: 36px
}

/* CHOICES SECTION */

.choices-section{
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("./images/bg-triangle.svg");
  background-repeat: no-repeat;
  background-size: 300px;
  background-position: 50% 60%;
  flex-wrap: wrap;
  width: 450px;
  height: 450px;
}

.choice,.chosen{
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 90%;
  border: 0;
  width: 175px;
  height: 175px;
  cursor: pointer;
  transition: transform .5s ease-in-out;
}

.choice:hover{
  transform: scale(1.1);
}

.paper-choice-color{
  background: hsl(230, 89%, 65%);
  box-shadow: inset 0 -10px hsl(230, 89%, 62%);
  margin-right: 50px
}
.scissors-choice-color{
  background:hsl(40, 84%, 53%);
  box-shadow: inset 0 -10px hsl(40, 84%, 49%);
  margin-left: 50px
}
.rock-choice-color{
  background:hsl(349, 70%, 56%);
  box-shadow: inset 0 -10px hsl(349, 70%, 52%);
  margin-top: 0
}

.chosen > .inner-choice{
  width: 163px;
  height: 163px;
}
.choice > .inner-choice{
  width: 125px;
  height: 125px;
}
.inner-choice{
  background: hsl(0, 0%, 100%);
  box-shadow: inset 0 10px hsl(0, 0%, 92%);
  border-radius: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rule-section{
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}
.rule-section > button{
  width: 125px;
  height: 40px;
  border-radius: 8px;
  background-color: rgba(0,0,0,0);
  border: hsl(217, 16%, 45%) solid 2px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

/* CHOSEN SECTION */

.chosen-section{
  display: none;
  justify-content: space-between;
  width: 700px;
}
.my-chosen-content, .house-chosen-content{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.chosen-title{
  color: white;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.my-chosen-content > .paper-choice-color{
  margin: 0;
}
.my-chosen-content > .scissors-choice-color{
  margin: 0;
}

.house-chosen-content > .paper-choice-color{
  margin: 0;
}
.house-chosen-content > .scissors-choice-color{
  margin: 0;
}

.chosen{
  width: 225px;
  height: 225px;
}

.play-again-content{
  display: flex;
  visibility: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.play-again-btn{
  width: 125px;
  height: 40px;
  border-radius: 8px;
  background-color: white;
  border: white solid 2px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: hsl(229, 25%, 31%);
  font-weight: 600;
  cursor: pointer;
}

.play-again-btn:hover{
  color: hsl(349, 71%, 52%)
}

.play-again-msg{
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: white;
}


/* WINNING and LOSING ANIMATIONS */
.winner{
  animation: celebration 3s ease-in 3
}
.winner > .inner-choice{
  animation: celebration 3s ease-in 3
}
.not-winner{
  animation: its-ok 3s ease-in 3
}
.not-winner > .inner-choice{
  animation: its-ok 3s ease-in 3
}

@keyframes celebration{
  0%{box-shadow: 0 0 1px 1px rgba(255, 255, 255, .6);}
  20%{box-shadow: 0 0 15px 15px rgba(240, 14, 14, 0.9);}
  40%{box-shadow: 0 0 15px 15px rgba(228, 137, 18, 0.9);transform: rotate(0deg);}
  50%{box-shadow: 0 0 15px 15px rgba(191, 204, 7, 0.9);}
  60%{box-shadow: 0 0 15px 15px rgba(13, 221, 23, 0.9);transform: rotate(360deg);}
  80%{box-shadow: 0 0 15px 15px rgba(25, 45, 219, 0.9);}
  100%{box-shadow: 0 0 1px 1px rgba(139, 17, 196, 0.6);}
}

@keyframes its-ok{
  0%{box-shadow: 0 0 15px 15px rgba(102, 94, 94, 0.6);}
  50%{box-shadow: 0 0 10px 10px rgba(124, 114, 114, 0.6);}
  100%{box-shadow: 0 0 0 0 rgba(66, 50, 50, 0.6);}
}


/* LOADING ANIMATION */
.inner-choice-loading{
  background: rgba(0,0,0,.3);
  width: 163px;
  height: 163px;
  border-radius: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 14px;
  text-transform: uppercase;
}

.loading-choice-color{
  background-color: rgba(0,0,0,0);
  animation: loading 1.25s ease-in-out 3;
}


@keyframes loading{
  0%{transform: scale(1);}
  50%{transform: scale(1.1);}
  100%{transform: scale(1);}
}


/* MODAL */

.dark-bg-modal{
  display: none;
  justify-content: center;
  align-items: center;
  position: absolute;
  height: 100%;
  width: 100%;
  background: rgb(0,0,0,.4);
  box-sizing: border-box;
}
.rule-modal, .developer-modal{
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  border-radius: 8px;
  width: 375px;
  height: 400px;
  box-sizing: border-box;
  padding: 30px;
}
.rule-modal > div{
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.developer-modal > div{
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.developer-modal > img{
  width: 250px;
  border-radius: 5px;
}
.developer-modal > a{
  color: hsl(229, 25%, 31%);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  padding: 5px;
  border-radius: 5px;
  transition: all .25s ease-in;
}
.developer-modal > a:hover{
  background-color:hsl(229, 25%, 31%);
  color: white
}

.title-modal{
  color: hsl(229, 25%, 31%);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 28px;
  margin: 0
}
.close-modal{
  width: 20px;
  height: 20px;
  cursor: pointer;
}


/* MEDIA QUERIES */

@media(max-width: 815px){
  /* HEADER MEDIA QUERIES*/
  header{
    width: 360px;
    padding: 25px;
    border-radius: 10px;
  }
  .title-container > h1{
    font-size: 24px;
  }
  .scoreboard{
    width: 105px
  }

  /* CHOICES SECTION MEDIA QUERIES */
  .choices-section{
    width: 360px;
    height: 360px;
    background-size: 245px;
    background-position: 50% 60%;
  }
  .choice{
    width: 145px;
    height: 145px
  }
  .choice > .inner-choice{
    width: 110px;
    height: 110px;
  }
  .paper-choice-color{
    margin-right: 30px
  }
  .scissors-choice-color{
    margin-left: 30px
  }
  .rule-section{
    text-align: center;
  }

  /* CHOSEN SECTION MEDIA QUERIES */
  .chosen-section{
    flex-wrap: wrap;
    justify-content: center;
    width: 360px;
    height: 360px
  }
  .play-again-content{
    order: 1;
    display: flex;
    visibility: hidden;
  }
  .my-chosen-content{
    width: 140px;
    flex-direction: column-reverse;
    margin-right: 30px;
  }
  .house-chosen-content{
    width: 140px;
    flex-direction: column-reverse;
    margin-left: 30px;
  }
  .chosen-title{
    font-size: 14px;
    text-align: center;
  }
  .chosen{
    width: 145px;
    height: 145px
  }
  .inner-choice-loading{
    width: 110px;
    height: 110px
  }
  .chosen > .inner-choice{
    width: 110px;
    height: 110px;
  }
  .play-again-btn{
    width: 215px;
    height: 60px;
    border-radius: 8px;
    letter-spacing: 2px;
    font-weight: 600;
  }
  .play-again-msg{
    font-size: 36px;
    letter-spacing: 9px;
    margin: 0 0 15px 0;
    text-align: center;
  }
  /* RULE MODAL MEDIA QUERY */
  .rule-modal{
    height: 100%;
    width: 100%;
    justify-content: flex-start;
  }
  .rule-modal > img{
    margin: auto 0; 
  }
  /* DEVELOPER MODAL MEDIA QUERY */
  .developer-modal{
    height: 100%;
    width: 100%;
    justify-content: space-between;
  }
}
