@import url('https://fonts.googleapis.com/css?family=Acme&display=swap');

@keyframes changeOrder {
  from { z-index: 9;}
  to { z-index: 1; }
}

@keyframes handShake {
  0%,100% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
}

@keyframes handShake2 {
  0%,100% { transform: rotateY(180deg) rotate(10deg); }
  50% { transform: rotateY(180deg) rotate(-10deg); }
}

html, body {
  font-family: Acme, Arial, sans-serif;
  background-image: url("purple-bg.jpg");
  font-family: "Poppins", sans-serif;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
 
  background-attachment: fixed;
  font-size: 24px;
  margin: 0;
  padding: 0;
  text-align: center;
  overflow: hidden;
  font-family: "Poppins", sans-serif;

}

form {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}



#hands {
  text-align: center;
}

input:checked ~ div .hand {
  animation: none !important;
}

.hand {
  margin: 20px;
  width: 200px;
  height: 200px;
  position: relative;
  transform: rotate(10deg);
  display: inline-block;
  animation: handShake 2s infinite;
}

.hand > div {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid black;
  background: gold;
  transition: all 0.1s;
}

.fist {
  height: 110px;
  left: 40px;
  top: 50px;
  width: 90px;
  border-radius: 20px 0 0 20px;
}

.finger {
  width: 70px;
  height: 30px;
  border-radius: 20px;
  left: 80px;
  transform-origin: 0 50%;
}

.finger-1 { top: 50px; --dif: 0px; }
.finger-2 { top: 78px; left: 84px; --dif: 4px; }
.finger-3 { top: 106px; --dif: 0px; }
.finger-4 { top: 134px; height: 26px; left: 76px; --dif: -8px; }

div.thumb {
  width: 35px;
  height: 70px;
  
  border-radius: 0 20px 20px 20px;
  top: 50px;
  left: 80px;
  border-left: 0 solid;
  box-shadow: -17px 6px 0 -15px black;
}

div.arm {
  width: 22px;
  height: 70px;
  left: 20px;
  top: 70px;
  border: 0;
  border-top: 2px solid black;
  border-bottom: 2px solid black;
}

#user-hand {
  transform: rotateY(180deg);
  animation: handShake2 2s infinite;
  position: relative;
}

input[type="radio"] {
  position: absolute;
  top: -1000in;
  left: -1000in;
}

input[id$="scissors"]:checked ~ div #user-hand .finger-1,
input[id^="scissors"]:checked ~ div #computer-hand .finger-1 {
  width: 130px;
  transform:rotate(-5deg);
}

input[id$="scissors"]:checked ~ div #user-hand .finger-2,
input[id^="scissors"]:checked ~ div #computer-hand .finger-2 {
  width: 130px;
  transform:rotate(5deg);
}
input[type="reset"] {
  height: 40px;
      width: 170px;
     
      cursor: pointer;
    
      background-color: #d1ae45;
      color: rgb(23, 23, 23);
      border: none;
      border-radius: 5px;
      font-size: 24px;
}

input[id$="paper"]:checked ~ div #user-hand .finger-1,
input[id$="paper"]:checked ~ div #user-hand .finger-2,
input[id$="paper"]:checked ~ div #user-hand .finger-3,
input[id$="paper"]:checked ~ div #user-hand .finger-4,
input[id^="paper"]:checked ~ div #computer-hand .finger-1,
input[id^="paper"]:checked ~ div #computer-hand .finger-2,
input[id^="paper"]:checked ~ div #computer-hand .finger-3,
input[id^="paper"]:checked ~ div #computer-hand .finger-4 {
  left: 124px;
  left: calc(124px + var(--dif));
  width: 80px;
  border-left: 0;
  border-radius: 0 20px 20px 0;
}

#rock-rock:checked ~ div h2::before,
#paper-paper:checked ~ div h2::before,
#scissors-scissors:checked ~ div h2::before {
  content: "सामना बरोबरीत!"
}
#rock-paper:checked ~ div h2::before,
#paper-scissors:checked ~ div h2::before,
#scissors-rock:checked ~ div h2::before {
  content: "आपण जिंकलात!"
}
#rock-scissors:checked ~ div h2::before,
#paper-rock:checked ~ div h2::before,
#scissors-paper:checked ~ div h2::before {
  content: "संगणक जिंकला!"
}

#message {
  text-align: center;
  display: none;


}

input:checked ~ #message {
  display: block;
}

#hands {
  display: flex;
  align-items: center;
  justify-content: center;
}

#icons {
  width: 30px;
  height: 200px;
  display: inline-flex;
  flex-direction: column;
}

#icons > div {
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  overflow: hidden;
  position: relative;
}


label:active {
  position:static; 
  margin-left: 60px;
}

label:active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  z-index: 10;
  height: 60px;
}


label {
  animation: changeOrder 0.45s infinite linear;
  background: #f5f5f5;
  border: 1px solid #ccc;
  box-sizing: border-box;
  cursor: pointer;
  display: block;
  height: 60px;
  width: 60px;
  line-height: 60px;
  font-size: 2rem;
  position: absolute;
  user-select: none;

}
#game-container {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  height: 400px;
  margin-left:650px;
  border: 2px dashed black;
  padding-top: 5%;

}
/* Add this to your existing CSS */
.modal1 {
  display: none; 
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4); 
}

.modal-content1 {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 700px;
  text-align: center;
  border-radius: 10px;
}

.clos, .clos-correct {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  visibility: hidden;
}

.clos:hover,
.clos:focus,
.clos-correct:hover,
.clos-correct:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
  visibility: hidden;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: -2%;
  width: 100%;
  height: 102%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s;
  overflow: hidden;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}
.howToPlayBtn{
  visibility: hidden;
}
.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: none;
  width: 30%;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  z-index: 10;
}
.modal-content p {
  font-size: 24px;
  color: #000000;
  margin-bottom: 20px;
}
.modal-content .popButton {
  padding: 10px 20px;
  font-size: 24px;
  background-color: #3FBAD9;
  color: #000000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal-content .popButton:hover {
  background-color: #000000;
}
/* Position the button at the top-left corner */
.howToPlayBtn {
  position: absolute;
  top: 25px;
  left: 10px;
  z-index: 1;
}

/* Style the button to match the game theme */
.howToPlayBtn {
  font-family: "Poppins", sans-serif; /* Use the same font as the game */
  font-size: 16px; /* Adjust the font size as needed */
  background-color: #793DAE;  
  /* color: #8460de;  */
  border: none;
  font-weight: bolder;
  background-color: none;
  border-radius: 5px;
  padding: 10px 20px;
  cursor: pointer;
 }

/* Style the button to match the game theme */

#hashText {
    
  font-size: 40px;
  font-weight: bolder;
  color: #ffffff; /* Your chosen color */
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 150px;
  padding: 10px;
  text-shadow: -1px -1px black,
  1px -1px black,
  -1px 1px black,
  -1px -1px black;
  text-align: center;
  margin-left: 2%;

}

#submit-answer{
  height: 40px;
  width: 168px;
background-color: #d1ae45;
border-radius: 5px;
border: none;
font-size: 24px;
}
#answer-input{
  height: 40px;
  width: 168px;

}
#question-text{
  font-size: 24px;
}
#continue-game{
  height: 40px;
      width: 168px;
     
      cursor: pointer;
    
      background-color: #d1ae45;
      color: rgb(23, 23, 23);
      border: none;
      border-radius: 5px;
      font-size: 24px;
}
.homeBtn {
  position: absolute;
  top: 145px; /* Adjust the top position as needed */
  left: 10px;
  z-index: 1;

}

/* Style the home button */
.homeBtn button {
  font-family: "Poppins", sans-serif;
  background-color: #793DAE;  
  font-size: 16px; 
  border: none;
  font-weight: bolder;
  border-radius: 5px;
  padding: 15px 20px;
  cursor: pointer;
  /* box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.2); */
  transition: background-color 0.3s ease;
}

@media (max-width: 768px) {
  html, body {
    font-size: 18px;
    overflow-y: auto;
  }

  .hand {
    width: 150px;
    height: 150px;
  }

  #message input[type="reset"] {
    font-size: 18px;
  }

  .modal-content, .modal-content1 {
    width: 59%;
  }

  iframe {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  html, body {
    font-size: 16px;
  }

  .hand {
    width: 438px;
    height: 100px;
}

  label {
    font-size: 32px;
  }

  #message input[type="reset"] {
    font-size: 16px;
  }

  #hands {
    flex-direction: column; /* Stack the hands vertically on very small screens */
    gap: 10px; /* Add more space between hands */
  }
}

#hashText {
  font-size: 3rem;
  color: white;
  margin-top: 90px;
}


label:nth-of-type(1) { animation-delay: -0.00s; }
label:nth-of-type(2) { animation-delay: -0.15s; }
label:nth-of-type(3) { animation-delay: -0.30s; }