:root {
  --clr-main: rgb(253, 255, 226);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
}

body {
  background: linear-gradient(
    175deg,
    rgb(106, 212, 177) 0%,
    rgb(0, 59, 77) 100%
  );
  user-select: none;
  overflow: hidden;
}

.game-wrapper {
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  transition: 0.5s ease;
}

.game-wrapper .score-wrapper {
  border: 2px solid var(--clr-main);
  padding: 1em;
  font-size: 1.5em;
  min-width: min-content;
  font-family: "Raleway", sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  color: var(--clr-main);
  border-radius: 1em;
  gap: 1em;
}

.game-wrapper .score-wrapper h2 {
  font-weight: 700;
}

.score-wrapper .score1 {
  font-weight: 300;
}

.score-wrapper .score2 {
  font-weight: 300;
}

.player-one-form {
  transition: 0.5s ease;
  z-index: 1;
}

.player-two-form {
  opacity: 0;
  transition: 0.5s ease;
  transform: translateY(-68px);
}

.intro-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.intro-wrapper h1 {
  font-family: "Raleway", sans-serif;
  margin-bottom: 0.5em;
  color: var(--clr-main);
  font-weight: 500;
  text-align: center;
}

.intro-wrapper input {
  font-size: 3em;
  background-color: rgba(0, 0, 0, 0.205);
  border: 2px solid var(--clr-main);
  padding: 0.25em;
  text-align: center;
  width: 500px;
  color: var(--clr-main);
  border-radius: 1em;
}

.intro-wrapper input:focus {
  outline: none;
}

.turn-display {
  margin-bottom: 0.5em;
  font-size: 4em;
  font-family: "Raleway", sans-serif;
  font-weight: 300;
  color: var(--clr-main);
}

.gameboard {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  width: 500px;
  min-height: 500px;
  background-color: rgba(0, 0, 0, 0.205);
  transition: opacity 4s;
}

.row {
  display: flex;
  border: 2px solid var(--clr-main);
  height: 33.33333333333%;
}

.row .btn {
  width: 33.333333333333333%;
  border: none;
  cursor: pointer;
  font-size: 8em;
  color: var(--clr-main);
  font-weight: 100;
  font-family: "Raleway", sans-serif;
  background-color: transparent;
  transition: background-color 0.5s ease;
  z-index: 5;
}

.row .btn:hover {
  background-color: rgba(255, 255, 255, 0.233);
}

.row .btn:nth-of-type(1) {
  border-right: 2px solid var(--clr-main);
}

.row .btn:nth-of-type(2) {
  border-right: 2px solid var(--clr-main);
}

.row:nth-of-type(1) {
  border-bottom: none;
}

.row:nth-of-type(2) {
  border-bottom: none;
}

.reset-btn {
  margin-bottom: 5%;
}

.reset-btn,
.reset-game-btn {
  margin-top: 1em;
  padding: 1rem 4rem;
  background-color: rgba(0, 0, 0, 0.205);
  border: 2px solid var(--clr-main);
  cursor: pointer;
  font-family: "Raleway", sans-serif;
  font-size: 1.5em;
  color: var(--clr-main);
  transition: background-color 0.5s ease;
  border-radius: 2em;
}

.reset-game-btn {
  display: flex;
  max-width: 190px;
  text-align: left;
  transform: scale(0.5);
  margin-top: 0;
  padding: 0.75rem 4rem;
  justify-self: flex-start;
  background: transparent;
}

.volume-btn {
  position: fixed;
  bottom: 15px;
  right: 15px;
  transform: scale(0.75);
  background-image: url(icons/volume.png);
  background-size: contain;
  background-position: center;
  font-family: "Raleway", sans-serif;
  border: none;
  padding: 2em;
  color: white;
  background-color: transparent;
  cursor: pointer;
  z-index: 50;
}

.sounds-on,
.sounds-off {
  font-size: 4em;
  z-index: 10;
  font-family: "Raleway", sans-serif;
  color: rgb(255, 255, 255);
  text-align: center;
  width: 1000px;
  height: 200px;
  position: fixed;
  bottom: 0%;
  left: 50%;
  margin-bottom: -100px;
  margin-left: -500px;
  transition: opacity 0.5s;
  opacity: 0;
}

.reset-btn:hover,
.reset-btn:focus {
  background-color: rgba(255, 255, 255, 0.13);
}

.reset-game-btn:hover,
.reset-game-btn:focus {
  background-color: rgb(165, 50, 50);
}

@media (max-width: 650px) {
  .sounds-on,
  .sounds-off {
    font-size: 3em;
    bottom: -1.5%;
  }
}

@media (max-width: 540px) {
  .sounds-on,
  .sounds-off {
    bottom: -3%;
    font-size: 2em;
  }

  .player-one-form {
    margin-top: 4em;
  }

  .player-two-form {
    transform: translateY(-35px);
  }

  .intro-wrapper input {
    font-size: 3em;
    width: 300px;
  }

  .turn-display {
    font-size: 2.75em;
    text-align: center;
    font-weight: 500;
  }

  .gameboard {
    width: 300px;
    min-height: 300px;
  }

  .game-wrapper .score-wrapper {
    font-size: 0.75em;
  }

  .row .btn {
    font-size: 4em;
  }

  .reset-btn {
    font-size: 0.75em;
    padding: 1em 2em;
    margin-top: 2em;
  }
}

.gone {
  display: none;
}
