* {
    box-sizing: border-box;
    margin: 0;
}

html {
    height: 100%;
}

body {
    height: 100%;
    background-color: azure;
}

main {
  height: 90%;
}

.tic {
    color: olive;
    text-align: center;
    font-size: 4.5rem;
    font-weight: 700;
    padding: 1.5rem;
}

.game-board {
    display: grid;
    row-gap: 1.5rem;
    column-gap: 1rem;
    height: 50%;

    margin-left: 40%;
    margin-right: 40%;
    margin-top: 3rem;
    grid-template-rows: 10% 90%;
    grid-template-areas: "display display display display display display display"
                        "one squares squares squares squares squares two"
                        
}
#turn-display {
  grid-area: display;
  display: grid;
  place-content: center;
  border-bottom: solid 2px olive;
  color: darkslategray; 
  font-size: 1.2rem;
}

#squares {
    grid-area: squares;
    background-color: darkslategray;

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


.one {
  grid-area: one;
  color: darkslategray;
  font-size: 1rem;
}

.two {
  grid-area: two;
  color: darkslategray; 
  font-size: 1rem;
}

.cell {
  text-align: center;
  border: solid 1px olive;
  color: aliceblue;
  font-size: 3rem;
  font-weight: 900;
  padding-top: 1.4rem;
}

button {
  background-color: rgb(128, 128, 0, .7);
  color: aliceblue;
  font-size: 1.5rem;
  font-weight: 700;
  border: none;  
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  background-color: olive;
  padding: 10px;
  color: aliceblue;  
}

a {
  text-decoration: none;
  color: aliceblue; 
}


.result-restart {
  display: none;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  
  position: absolute;
  background-color: rgb(240, 255, 255, .8);
  margin-top: 1rem;
  left:20%;
  right:20%;
  height: 700px;
}

.result-restart.show {
  opacity: 1;
  transform: scale(1);

  display:flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.6rem;
  
  background-color: rgb(240, 255, 255, .8);
  top: 12%;
  left:20%;
  right:20%;
  height: 700px;

}


.msg {
  display: none;
}

.start {
  opacity: 0;
  transition: opacity 1s ease-out;
}

.start.anime {
  opacity: 1;
  transform: translateY(0);

  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  position: fixed;
  background-color: rgb(128, 128, 0, .7);
  color: aliceblue;
  height: 100%;
  width: 100%;
}

#btn {
  color: olive;
  background-color: aliceblue;
  font-size: 2rem;
  font-weight: 700;
  padding: .4rem;
  border-radius: .5rem;
}

h1 {
  border-bottom: aliceblue 1px solid;
}

p {
  color:aliceblue;
}

.one {
  display:flex;
  flex-direction:column;
  justify-content:space-evenly
  
}

.two {
  display:flex;
  flex-direction:column;
  justify-content:space-evenly
  
}




/* For screen sizes smaller than 768px (mobile devices) */
@media (max-width: 767px) {
    .tic {
      font-size: 3rem;
    }
    .game-board {
      margin-left: 2%;
      margin-right: 2%;
      height: 40%;
    }
    
  button {
      font-size: 1rem;
    }
  }

  input {
    margin-left: .5rem;
    color: olive;
  }

  form div {
    margin: .5rem;
  }

  /* For screen sizes between 768px and 1024px (tablets) */
  @media (min-width: 768px) and (max-width: 1024px) {
    .tic {
      font-size: 3.5rem;
    }
    .game-board {
      margin-left: 10%;
      margin-right: 10%;
    }
    
    button {
      font-size: 1.2rem;
    }
  }
  
  /* For screen sizes larger than 1024px (desktops) */
  @media (min-width: 1025px) {
    .tic {
      font-size: 4.5rem;
    }
    .game-board {
      margin-left: 30%;
      margin-right: 30%;
    }
    
    button {
      font-size: 1.5rem;
    }
  }