* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  font-family: 'Modak', cursive;
}

.game {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 30px;
  background-color: rgb(2, 112, 26);
  color: rgb(255, 254, 254);
  fill: white;
}

.header .container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
}

.header svg {
  height: 60px;
}

.header p {
  margin-top: 7px;
}

.header button,
.reset {
  font-size: 25px;
  padding: 10px 20px;
  margin-right: 10px;
  background-color: white;
  border: 2px solid rgb(197, 152, 40);
  border-radius: 50px;
  cursor: pointer;
  color: rgb(197, 152, 40);
  transition: 1s;
}

.header button:hover,
.reset:hover {
background-color: rgb(197, 152, 40);
color: white;
border: 2px solid white;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
  display: grid;
  place-items: center;
  transition: 1s;
}

.form-hide {
  display: none;
}

form {
  width: 350px;
  background-color: white;
  border: none;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  text-align: center;
  position: relative;
}

form svg {
  width: 50px;
  position: absolute;
  top: -30px;
  right: -30px;
  fill: white;
  cursor: pointer;
}

form input,
form input::placeholder{
  font-size: 1.5rem;
}

form h3 {
  padding-bottom: 1rem;
  color: black;
  font-family: 'Odibee Sans', cursive;
  letter-spacing: 1.5px;
  font-size: 2rem;
}

form input[type='text'] {
  width: 100%;
  margin-bottom: 1rem;
  padding: 15px 10px;
  border-radius: 10px;
  border: 3px solid grey;
  outline: none;
  font-family: 'Odibee Sans', cursive;
  letter-spacing: 1.5px;
}

form button {
  display: block;
  width: 100%;
  padding: 19px;
  background-color: rgb(197, 152, 40);
  border-radius: 10px;
  border: 3px solid rgb(197, 152, 40);
  color: white;
  outline: none;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: 1s;
  font-size: 1.2rem;
  margin-top: 1rem;
}

form button:hover {
  filter: contrast(90%);
  background-color: white;
  color: rgb(197, 152, 40);
}

.turn,
.error{
  font-family: 'Odibee Sans', cursive;
  letter-spacing: 1.5px;
  text-align: center;
  padding: 0 40px;
}

.board {
  height: 400px;
  width: 500px;
  border: 1px solid black;
  gap: 2px;
  padding: 2px;
  background-color: rgb(2, 112, 26);
  margin-top: 15px;
}

.board-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.cell {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 5rem;
  border: 1px solid grey;
  background: white;
  cursor: pointer;
  color: rgb(197, 152, 40);
}

.board-reset {
  display: flex;
  justify-content: center;
  align-items: center;
}

.error{
  height: 30px;
  margin-bottom: 10px;
}

.msg {
  font-family: 'Odibee Sans', cursive;
  color: red;
  font-size: 20px;
  height: 20px;
}

@media only screen and (max-width: 650px){
	.turn{
    font-size: 1.5rem;
  }

  .error{
    font-size: 1.1rem;
  }

  .board {
    height: 400px;
    width: 400px;
  }
}

@media only screen and (max-width: 450px){

  .board {
    height: 330px;
    width: 330px;
  }

  .header {
    padding: 15px 20px;
    margin-bottom: 20px;
  }

  .header .container {
    font-size: 20px;
  }

  .header svg {
    height: 40px;
  }

  .header button,
  .reset {
    font-size: 20px;
    padding: 7px 15px;
  }

  .cell {
    font-size: 3.5rem;
  }

  form {
    width: 280px;
    padding: .8rem 1.3rem;
  }

  form h3 {
    font-size: 1.7rem;
  }
  
  form input,
  form input::placeholder{
  font-size: 1.3rem;
  }

  form button {
  padding: 15px;
  }

  .error{
    margin: 20px 0;
  }

  .turn,
  .error {
    padding: 0 20px;
  }
}