*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
body{
  font-family: 'Barlow Semi Condensed', sans-serif;
  background: radial-gradient(circle, hsl(214, 47%, 23%), hsl(237, 49%, 15%));
  color: white;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding-bottom: 2rem;
  position: relative;

}
.container{
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    max-width: 700px;
    margin: auto 0;
    padding-top: 30px;
}
.header-score{
    padding: 0.7rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid  hsl(217, 16%, 45%);
}
.game-score{
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 1.7rem 3rem;
    border-radius: 7px;
}
.game-score p{
    color:  hsl(229, 64%, 46%);
}
#score{
    color:  hsl(229, 25%, 31%);
    font-size: clamp(16px, 5vw, 3rem);
}
.game-shape img{
    width: 250px;
    height: auto;
    margin-left: 5rem;
}
.game-board{
  position: relative;
  width: 400px;
  margin: 0 auto;
  padding-top: 3rem;
  /* display: none; */
}
.game-shape{
    position: relative;
    z-index: 1;
}
.choice{
  position: absolute;
  width: 70px;
  height: 70px;
  background: white;
  /* border: 2px solid #333; */
  border-radius: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  z-index: 999;
  cursor: pointer;
}
.choice img{
    width: 30px;
    height: 30px;
}
.choice::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  z-index: -1;
  animation: glow 2s infinite ease-in-out;
}
.choice.rock::before {
  background: linear-gradient(to bottom right, hsl(349, 71%, 52%), hsl(349, 70%, 56%));
  box-shadow: 0 0 25px hsl(349, 70%, 56%);
}

.choice.paper::before {
  background: linear-gradient(to bottom right, hsl(230, 89%, 62%), hsl(230, 89%, 65%));
  box-shadow: 0 0 25px hsl(230, 89%, 65%);
}

.choice.scissors::before {
  background: linear-gradient(to bottom right, hsl(39, 89%, 49%), hsl(40, 84%, 53%));
  box-shadow: 0 0 25px hsl(40, 84%, 53%);
}

.choice.lizard::before {
  background: linear-gradient(to bottom right, hsl(261, 73%, 60%), hsl(261, 72%, 63%));
  box-shadow: 0 0 25px hsl(261, 72%, 63%);
}

.choice.spock::before {
  background: linear-gradient(to bottom right, hsl(189, 59%, 53%), hsl(189, 58%, 57%));
  box-shadow: 0 0 25px hsl(189, 58%, 57%);
}
@keyframes glow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(2);
  }
}

.scissors {
  top: 15%;
  left: 40%;
  /* border: 8px solid blue; */

}
.lizard {
    top: 80%;
   left: 23%;
}
.rock {
  top: 80%;
  left: 60%;
}
.spock {
  bottom: 34%;
  left: 13%;
}
.paper {
  bottom: 40%;
  right: 15%;
}
.button-rule{
    width: 100%;
    padding-right: 2rem;
}
 .rule{
    cursor: pointer;
    padding: 0.6rem 1.5rem;
    float: right;
    background: transparent;
    border: 1px solid white;
    color: white;
    font-size: 12px;

} 
.rule-details {
  width: 350px;
  background-color: white;
  padding-bottom: 30px;
  z-index: 1000;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.rule-details.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}





.rule-heading{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}
.rule-heading h1{
    color: hsl(229, 25%, 31%);
    font-size: 2rem;
}
.close img{
    cursor: pointer;
}
.rule-img{
    display: grid;
    place-items: center;
}
.rule-img img{
    width: 250px;

}



#result-screen {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 40px;
  display: none;
}

.picked{
    display: flex;
    flex-direction: column;
    align-items: center;
}
.picked h3{
  font-size: 2rem;
  margin-bottom: 20px;
}


.result-choice{
  width: 200px;
  height: 200px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  z-index: 999;
  cursor: pointer;
  margin-top: 20px;
  overflow: hidden;
}
.result-choice img{
    width: 100px;
    height: 100px;
}
.result-choice {
  animation: pulse 1.5s infinite;
}

.result-choice.rock {
  background: radial-gradient(circle, hsl(349, 71%, 52%), hsl(349, 70%, 56%));
  border: 16px solid transparent;
  box-shadow: 0 0 0 12px rgba(255, 87, 87, 0.3); 
}

.result-choice.paper {
  background: radial-gradient(circle, hsl(230, 89%, 62%), hsl(230, 89%, 65%));
  border: 16px solid transparent;
  box-shadow: 0 0 0 12px rgba(103, 140, 255, 0.3);
}

.result-choice.scissors {
  background: radial-gradient(circle, hsl(39, 89%, 49%), hsl(40, 84%, 53%));
  box-shadow: 0 0 0 12px rgba(255, 207, 66, 0.3);
}

.result-choice.lizard {
  background: radial-gradient(circle, hsl(261, 73%, 60%), hsl(261, 72%, 63%));
  box-shadow: 0 0 0 12px rgba(164, 89, 255, 0.3);
}

.result-choice.spock {
  background: radial-gradient(circle, hsl(189, 59%, 53%), hsl(189, 58%, 57%));
  box-shadow: 0 0 0 12px rgba(91, 236, 255, 0.3);
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px 16px rgba(255, 255, 255, 0.3);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.2);
  }
}



.main-result{
    display: flex;
    flex-direction: column;
    align-items: center;
    
}
#playAgain{
    padding: 0.7rem 1.5rem;
    background-color: white;
    color: #333;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 1rem;
}
#final-result{
    font-size: 2rem;
    color: white;
}


.winner {
  box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.05),
              0 0 0 40px rgba(255, 255, 255, 0.03),
              0 0 0 60px rgba(255, 255, 255, 0.01);
  animation: pulse 1.5s infinite ease-in-out;
  border-radius: 50%;
}
button,
.rule,
#playAgain {
  font-size: 16px !important;
}


@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@media (max-width: 1024px) {
    
}
@media (max-width:600px) {
    .game-name h1{
        font-size: 14px;
    }
    .game-score{
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 1.5rem 1.5rem;
    border-radius: 7px;
   }
   .header-score{
    padding: 0.7rem 2rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid  hsl(217, 16%, 45%);
}
    .result-choice{
        width: 100px;
        height: 100px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        box-shadow: 0 3px 6px rgba(0,0,0,0.1);
        z-index: 999;
        cursor: pointer;
        margin-top: 20px;
        overflow: hidden;
  }
  #result-screen{
    position: relative;
  }
  .result-choice img{
    width: 50px;
    height: 50px;
}
.picked h3{
    font-size: 16px;
}
.main-result{
    position: absolute;
    bottom: -110%;
}
.button-rule{
    width: 100%;
    padding-right: 2rem;
}
 .rule{
    cursor: pointer;
    padding: 0.6rem 1.5rem;
    float: right;
    background: transparent;
    border: 1px solid white;
    color: white;
    font-size: 12px;
    position: absolute;
    left: 65%;
    bottom: 2%;
    transform: translate(-50% -50%);


} 
}

@media (max-width:378px) {
     .game-score{
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 1.2rem 1.2rem;
    border-radius: 7px;
}
   .header-score{
    padding: 0.7rem 2rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid  hsl(217, 16%, 45%);
}
     .result-choice{
        width: 80px;
        height: 80px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        box-shadow: 0 3px 6px rgba(0,0,0,0.1);
        z-index: 999;
        cursor: pointer;
        margin-top: 20px;
        overflow: hidden;
  }
  #result-screen{
    position: relative;
  }
  .result-choice img{
    width: 40px;
    height: 40px;
    object-fit: cover;
}
.main-result{
    position: absolute;
    bottom: -120%;
}
.button-rule{
    width: 100%;
}
 .rule{
    cursor: pointer;
    padding: 0.6rem 1.5rem;
    float: right;
    background: transparent;
    border: 1px solid white;
    color: white;
    font-size: 12px;
    position: absolute;
    left: 40%;
    bottom: 1%;
    transform: translate(-50% -50%);

} 
}
@media (max-width:320px) {
    .button-rule{
    width: 100%;
}
 .rule{
    cursor: pointer;
    padding: 0.6rem 1.5rem;
    float: right;
    background: transparent;
    border: 1px solid white;
    color: white;
    font-size: 12px;
    position: absolute;
    left: 40%;
    bottom: -20%;
    transform: translate(-50% -50%);
  }
  .main-result{
    position: absolute;
    bottom: -100%;
} 
}