@import url("https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Public+Sans:ital,wght@0,100..900;1,100..900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Barlow Semi Condensed", sans-serif;
  font-weight: 400;
  font-style: normal;
}

body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: Radial-Gradient(at top, hsl(214, 47%, 23%), hsl(237, 49%, 15%));
}

.score-board {
  border: 2px solid hsl(217, 16%, 45%);
  border-radius: 1rem;
  width: 50%;
  max-width: 40rem;
  height: 20%;
  max-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  padding: 0 2rem;
  position: absolute;
  top: 2rem;
}

.score-box {
  background-color: white;
  width: 9rem;
  height: 7rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.3rem;
}

.score-box :first-child {
  color: hsl(229, 64%, 46%);
}

.score-box :last-child {
  color: hsl(229, 25%, 31%);
  font-size: 3.5rem;
}

.ply-area {
  position: absolute;
  bottom: 10%;
  width: 30rem;
  height: 26rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ply-area div {
  position: absolute;
}

.paper {
  top: 2%;
  left: 2%;
  width: 11.5rem;
  height: 11.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(hsl(230, 89%, 62%), hsl(230, 89%, 65%));
  box-shadow: 0 -6px 0 rgba(0, 0, 0, 0.438) inset;
}

.paper img {
  background-color: white;
  width: 9rem;
  height: 9rem;
  padding: 2.5rem;
  border-radius: 50%;
  box-shadow: 0 5px rgba(0, 0, 0, 0.267) inset;
}

.scissor {
  top: 2%;
  right: 2%;
  width: 11.5rem;
  height: 11.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(hsl(39, 89%, 49%), hsl(40, 84%, 53%));
  box-shadow: 0 -6px 0 rgba(0, 0, 0, 0.438) inset;
}

.scissor img {
  background-color: white;
  width: 9rem;
  height: 9rem;
  padding: 2.5rem;
  border-radius: 50%;
  box-shadow: 0 5px rgba(0, 0, 0, 0.267) inset;
}

.rock {
  bottom: 2%;
  left: 32%;
  width: 11.5rem;
  height: 11.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(hsl(349, 71%, 52%), hsl(349, 70%, 56%));
  box-shadow: 0 -6px 0 rgba(0, 0, 0, 0.438) inset;
}

.rock img {
  background-color: white;
  width: 9rem;
  height: 9rem;
  padding: 2.5rem;
  border-radius: 50%;
  box-shadow: 0 5px rgba(0, 0, 0, 0.267) inset;
}

.selcted-area {
  width: 40%;
  height: 25%;
  align-items: center;
  justify-content: space-between;
  margin-right: 10rem;
  position: absolute;
  bottom: 20%;
  display: none;
}

.your-pick,
.com-pick {
  display: flex;
  align-items: center;
  position: relative;
  height: 12rem;
}

:where(.your-pick, .com-pick) div {
  position: absolute;
  left: 0;
  top: 0;
}

.result {
  margin-left: 12rem;
  text-align: center;
}

.result p {
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.result button {
  width: 10rem;
  height: 2.5rem;
  border: none;
  border-radius: 10px;
  margin-top: 1rem;
  color: red;
}

#you,
#com {
  position: absolute;
  top: -4rem;
  width: 12rem;
  color: white;
  font-size: large;
}

#you {
  left: 2.2rem;
}

#rulebtn {
  outline: transparent;
  border: 1px solid white;
  border-radius: 8px;
  width: 7rem;
  height: 2.5rem;
  background-color: transparent;
  color: white;
  position: absolute;
  right: 2rem;
  bottom: 2rem;
}

#rules {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  position: absolute;
  animation-name: pop;
  animation-duration: 200ms;
}

@keyframes pop {
  0% {
    scale: 0.3;
  }
}

.closebtn-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.closebtn-box p {
  font-size: 1.6rem;
  font-weight: bold;
}

.spot {
  box-shadow: 0 0 0 1.5vw rgba(255, 255, 255, 0.11),
    0 0 0 4.5vw rgba(255, 255, 255, 0.068),
    0 0 0 8.5vw rgba(255, 255, 255, 0.041);
}

@media screen and (max-width: 790px) {
  #rules {
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: grid;
    place-items: center;
    align-items: start;
  }

  #rules img {
    margin: 0 auto;
  }

  .closebtn-box {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
  }

  .closebtn-box img {
    position: absolute;
    bottom: 10%;
    left: 48%;
  }

  #rulebtn {
    bottom: 2rem;
    left: 40vw;
  }

  .bg {
    width: 16rem;
  }

  .rock,
  .paper,
  .scissor {
    width: 9rem;
    height: 9rem;
    position: static;
  }

  .paper {
    top: 3rem;
  }

  .scissor {
    top: 3rem;
  }

  .rock {
    bottom: 4rem;
  }

  .rock img {
    width: 7rem;
    height: 7rem;
  }

  .paper img {
    width: 7rem;
    height: 7rem;
  }

  .scissor img {
    width: 7rem;
    height: 7rem;
  }

  .ply-area {
    bottom: 15%;
    width: 50vw;
  }

  .score-board {
    width: 80%;
    max-width: 30rem;
    height: 6rem;
    padding: 0 1rem;
  }

  .score-box {
    width: 40%;
    max-width: 7rem;
    height: 4rem;
    padding-top: 10px;
  }

  .score-box p {
    font-size: 12px;
  }

  #score {
    font-size: 2rem;
  }

  .score-board img {
    width: 6rem;
  }

  .selcted-area {
    position: static;
    margin-bottom: 12rem;
    margin-left: -1rem;
    display: none;
  }

  .com-pick {
    left: 20%;
  }

  #you,
  #com {
    left: 1rem;
    top: auto;
    bottom: -2rem;
    font-size: 1rem;
    width: 10rem;
  }

  #com {
    left: -10px;
  }

  :where(.com-pick, .your-pick) div {
    top: 2rem;
  }

  #paper1,
  #paper2,
  #rock1,
  #rock2,
  #scissor1,
  #scissor2 {
    position: absolute;
    left: 0;
    top: 2rem;
  }

  .result {
    position: absolute;
    bottom: 15%;
    width: 16rem;
    margin-left: 13%;
  }

  #display {
    font-size: 3rem;
  }

  #again {
    width: 15rem;
    height: 3.5rem;
    font-size: 1rem;
  }
}

@media screen and (max-width: 690px) {
  .paper {
    left: -30%;
    top: 3rem;
  }

  .scissor {
    right: -30%;
    top: 3rem;
  }

  .rock {
    bottom: 4rem;
    left: 15%;
  }

  #rulebtn {
    left: 38vw;
  }
}
