* {
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  background-color: black;
}

.boxes {
  height: 500px;
  width: 1300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}
.players_box {
  padding-top: 40px;
  height: 77vh;
  width: 60rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 150px;
}
.select {
  height: 200px;
  width: 56rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  bottom: 240px;
}

.player {
  width: 400px;
  height: 300px;
}
.yourName,
.opponantName {
  color: rgb(52, 36, 36);
  background-color: rgb(239, 239, 122);
  width: 300px;
  padding: 5px;
  padding-right: 10px;
  padding-left: 30px;
  letter-spacing: 2px;
  font-size: 55px;
  font-family: Courier, monospace;
  font-weight: 550;
  border-radius: 50px;
}
.startGame {
  display: flex;
  align-items: center;
  text-align: center;
  height: 70px;
  background-color: rgb(249, 249, 66);
  color: black;
  margin-top: 30px;
  cursor: pointer;
  font-size: 52px;
  font-family: Courier, monospace;
  font-weight: 550;
  letter-spacing: 2px;
  border-radius: 20px;
  padding: 5px;
  padding-left: 10px;
  padding-right: 10px;
  border: 3px solid wheat;
}

.startGame {
  position: relative;
  bottom: 440px;
  right: 20px;
}
.startGame:hover {
  box-shadow: 0 0 10px 5px rgba(255, 165, 0, 0.5);
  color: rgba(255, 69, 0, 1);
}
.startGame2 {
  background-color: rgb(255, 255, 145);
  color: red;
  cursor: default;
}
.name1 {
  height: 50px;
  width: 450px;
  font-size: 30px;
  font-family: monospace;
  border: none;
  color: black;
  border-radius: 10px;
  border: 3px solid lightgoldenrodyellow;
  position: relative;
  top: 20px;
  outline: none;
  padding-left: 8px;
}
.name1:focus-within {
  border: 3px solid #3498db;
}
.box {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 2px solid white;
  height: 150px;
  width: 150px;
  font-size: 100px;
  font-family: sans-serif;
  cursor: pointer;
  border-radius: 15px;
}

.box:hover {
  box-shadow: 0 0 0px 5px rgba(247, 255, 6, 0.821);
}

.choice1 {
  position: relative;
  right: 200px;
  bottom: 40px;
  outline: none;
  color: #f8ac07;
}
.choice1:focus-within {
  border: 7px solid green;
}
.choice2 {
  position: relative;
  left: 200px;
  bottom: 40px;
  outline: none;
  color: #2c6fff;
}
.choice2:focus-within {
  border: 7px solid rgb(247, 168, 10);
}

.text {
  display: flex;
  justify-content: center;
  position: relative;
  bottom: 30px;
}
.text1 {
  font-family: "Courier New", Courier, monospace;
  color: black;
  text-align: center;
  font-size: 50px;
  font-weight: 600;
  width: 500px;
  background-color: rgb(255, 255, 159);
  border: 2px solid yellow;
  border-radius: 10px;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 80vh;
  margin-top: 10px;
}

.game {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  height: 370px;
  width: 400px;
  gap: 15px;
}

.button {
  height: 115px;
  width: 115px;
  border-radius: 15px;
  font-size: 70px;
  background-color: white;
  box-shadow: 0 0 1rem rgba(66, 60, 60, 0.3);
  cursor: pointer;
}
.button:hover {
  border: 5px solid yellow;
}

.container2 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 90vh;
}

.Congratulation {
  font-family: "Courier New", Courier, monospace;
  font-size: 4.9rem;
  padding: 10px;
  font-weight: 550;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  height: 60px;
  width: 1000px;
  border: 3px solid yellow;
  text-align: center;
  color: green;
  animation: congra 2s ease-in-out 0s infinite;
}

@keyframes congra {
  0% {
    background-color: rgb(250, 250, 91);
  }
  25% {
    background-color: rgb(250, 250, 91);
    width: 700px;
  }
  50% {
    background-color: rgb(250, 250, 91);
  }
  75% {
    background-color: rgb(250, 250, 91);
  }
  100% {
    background-color: rgb(250, 250, 91);
  }
}
.reset,
.back {
  font-size: 2rem;
  padding: 10px;
  color: black;
  font-weight: 600;
  background-color: rgb(255, 255, 171);
  border-radius: 10px;
  border: none;
  margin-top: 35px;
  cursor: pointer;
  border: 2px solid yellow;
}

.back {
  font-size: 1.2rem;
}
.Congratulation2 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 30vh;
}

.newGame {
  font-size: 2.5rem;
  padding: 10px;
  color: black;
  font-weight: 600;
  background-color: rgb(255, 255, 171);
  border-radius: 10px;
  border: none;
  cursor: pointer;
}
.newGame:hover {
  box-shadow: inset 0px 0px 2px 5px green;
  color: rgb(102, 24, 24);
}
.hide {
  display: none;
}

@media (min-width: 360px) and (max-width: 480px) {
  .players_box {
    width: 28rem;
    gap: 35px;
  }
  .player {
    width: 200px;
    height: 300px;
  }
  .yourName,
  .opponantName {
    width: 115px;
    padding: 5px;
    padding-right: 5px;
    padding-left: 20px;
    font-size: 20px;
  }
  .name1 {
    height: 25px;
    width: 150px;
    font-size: 18px;
    position: relative;
    top: 12px;
  }
  .player1Input {
    position: relative;
    left: 44px;
    border: 2px solid white;
  }
  .player2Input {
    position: relative;
    right: 13px;
  }
  .boxes {
    height: 370px;
    width: 380px;
  }
  .option {
    font-size: 27px;
  }
  .select {
    width: 80%;
    bottom: 200px;
  }
  .box {
    height: 90px;
    width: 90px;
    font-size: 60px;
  }
  .choice1 {
    position: relative;
    right: 15%;
  }
  .choice2 {
    position: relative;
    left: 10%;
  }
  .startGame {
    height: 30px;
    font-size: 17px;
    right: 4px;
    bottom: 250px;
  }
  .choice1:focus-within {
    border: 6px solid green;
  }
  .choice2:focus-within {
    border: 6px solid orange;
  }
  .text {
    position: relative;
  }
  .text1 {
    font-size: 35px;
    width: 300px;
  }
  .game {
    height: 290px;
    width: 350px;
    gap: 10px;
  }
  .button {
    height: 90px;
    width: 90px;
    font-size: 45px;
  }
  .button:hover {
    border: 3px solid yellow;
  }
  .Congratulation2 {
    height: 90px;
  }
  .Congratulation {
    font-size: 1.5rem;
    padding: 5px;
    height: 30px;
    width: 345px;
    font-weight: 700;
  }
  @keyframes congra {
    0% {
      background-color: rgb(250, 250, 91);
    }
    25% {
      background-color: rgb(250, 250, 91);
      width: 310px;
    }
    50% {
      background-color: rgb(250, 250, 91);
    }
    75% {
      background-color: rgb(250, 250, 91);
    }
    100% {
      background-color: rgb(250, 250, 91);
    }
  }
  .newGame {
    font-size: 1.4rem;
    padding: 5px;
    font-weight: 580;
  }
  .newGame:hover {
    box-shadow: inset 0px 0px 2px 3px green;
  }
  .reset {
    font-size: 1.6rem;
    font-weight: 580;
  }
  .back {
    font-size: 1rem;
  }
}

@media (min-width: 480px) and (max-width: 720px) {
  * {
    margin: 0;
    padding: 0;
  }
  .players_box {
    width: 28rem;
    gap: 40px;
  }
  .player {
    width: 200px;
    height: 300px;
  }
  .yourName,
  .opponantName {
    width: 140px;
    padding: 5px;
    padding-right: 5px;
    padding-left: 20px;
    font-size: 25px;
  }
  .name1 {
    height: 32px;
    width: 210px;
    font-size: 23px;
    position: relative;
    top: 12px;
  }
  .player1Input {
    position: relative;
    right: 20px;
    border: 2px solid white;
  }
  .player2Input {
    position: relative;
    right: 7px;
  }
  .boxes {
    height: 370px;
    width: 380px;
  }
  .option {
    font-size: 27px;
  }
  .select {
    bottom: 200px;
  }
  .box {
    height: 90px;
    width: 90px;
    font-size: 60px;
  }
  .choice1 {
    position: relative;
    right: 23%;
  }
  .choice2 {
    position: relative;
    left: 10%;
  }
  .boxes {
    height: 360px;
    width: 450px;
  }
  .option {
    font-size: 32px;
  }
  .box {
    height: 110px;
    width: 110px;
    font-size: 70px;
  }
  .startGame {
    height: 40px;
    font-size: 22px;
    bottom: 250px;
    right: 25px;
  }
  .choice1:focus-within {
    border: 6px solid green;
  }
  .choice2:focus-within {
    border: 6px solid orange;
  }
  .text {
    position: relative;
    bottom: 0px;
  }
  .text1 {
    font-size: 40px;
    width: 300px;
  }

  .game {
    height: 290px;
    width: 360px;
    gap: 12px;
  }
  .button {
    height: 98px;
    width: 98px;
    font-size: 55px;
  }
  .button:hover {
    border: 3px solid yellow;
  }
  .Congratulation2 {
    height: 110px;
  }
  .Congratulation {
    font-size: 1.9rem;
    padding: 5px;
    height: 30px;
    width: 465px;
    font-weight: 600;
  }
  @keyframes congra {
    0% {
      background-color: rgb(250, 250, 91);
    }
    25% {
      background-color: rgb(250, 250, 91);
      width: 400px;
    }
    50% {
      background-color: rgb(250, 250, 91);
    }
    75% {
      background-color: rgb(250, 250, 91);
    }
    100% {
      background-color: rgb(250, 250, 91);
    }
  }
  .newGame {
    font-size: 1.7rem;
    padding: 5px;
    font-weight: 580;
  }
  .newGame:hover {
    box-shadow: inset 0px 0px 2px 4px green;
  }
  .reset {
    font-size: 1.7rem;
    font-weight: 580;
  }
  .back {
    font-size: 1rem;
    position: relative;
    top: 13px;
  }
}

@media (min-width: 720px) and (max-width: 1124px) {
  * {
    margin: 0;
    padding: 0;
  }
  .players_box {
    width: 47rem;
    gap: 50px;
  }
  .player {
    width: 200px;
    height: 300px;
  }
  .yourName,
  .opponantName {
    width: 220px;
    padding: 5px;
    padding-left: 20px;
    font-size: 35px;
  }
  .name1 {
    height: 40px;
    width: 300px;
    font-size: 30px;
    position: relative;
    top: 12px;
  }
  .player1Input {
    position: relative;
    right: 120px;
  }
  .boxes {
    height: 370px;
    width: 380px;
  }
  .option {
    font-size: 27px;
  }
  .select {
    bottom: 200px;
  }
  .box {
    height: 90px;
    width: 90px;
    font-size: 60px;
  }
  .choice1 {
    position: relative;
    right: 20%;
  }
  .choice2 {
    position: relative;
    left: 12%;
  }
  .boxes {
    height: 360px;
    width: 680px;
  }
  .option {
    font-size: 50px;
  }

  .box {
    height: 130px;
    width: 130px;
    font-size: 80px;
  }
  .startGame {
    height: 55px;
    font-size: 38px;
    position: relative;
    right: 23px;
    bottom: 230px;
  }
  .choice1:focus-within {
    border: 8px solid green;
  }
  .choice2:focus-within {
    border: 8px solid orange;
  }
  .text1 {
    font-size: 50px;
    width: 400px;
  }
  .container {
    height: 60vh;
  }
  .game {
    height: 290px;
    width: 460px;
    gap: 15px;
  }
  .button {
    height: 110px;
    width: 110px;
    font-size: 65px;
  }
  .button:hover {
    border: 5px solid yellow;
  }
  .Congratulation2 {
    height: 130px;
  }
  .Congratulation {
    font-size: 3rem;
    padding: 5px;
    height: 55px;
    width: 720px;
    font-weight: 600;
  }
  @keyframes congra {
    0% {
      background-color: rgb(250, 250, 91);
    }
    25% {
      background-color: rgb(250, 250, 91);
      width: 590px;
    }
    50% {
      background-color: rgb(250, 250, 91);
    }
    75% {
      background-color: rgb(250, 250, 91);
    }
    100% {
      background-color: rgb(250, 250, 91);
    }
  }
  .newGame {
    font-size: 2.7rem;
    padding: 5px;
    font-weight: 580;
  }
  .reset {
    font-size: 1.7rem;
    font-weight: 580;
    position: relative;
    top: 50px;
  }
  .back {
    font-size: 1rem;
    position: relative;
    top: 60px;
  }
}
