*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Calibri", sans-serif;
}

body {
  background-color: rgb(227, 226, 214);
}

.board {
  width: 100vw;
  height: 70vh;
  display: grid;
  justify-content: center;
  align-content: center;
  justify-items: center;
  align-items: center;
  grid-template-columns: repeat(3, auto);
}

.cell {
  width: 100px;
  height: 100px;
  font-size: 80px;
  border: 1px solid black;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.cell:first-child,
.cell:nth-child(2),
.cell:nth-child(3) {
  border-top: none;
}

.cell:nth-child(3n + 1) {
  border-left: none;
}

.cell:nth-child(3n + 3) {
  border-right: none;
}

.cell:last-child,
.cell:nth-child(8),
.cell:nth-child(7) {
  border-bottom: none;
}

.cell.X,
.cell.O {
  cursor: not-allowed;
}

.X {
  background-color: rgb(188, 31, 31);
}

.O {
  background-color: rgb(34, 179, 34);
}

.buttons {
  width: fit-content;
  margin: auto;
}

.announce {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 5rem;
  flex-direction: column;
}

button {
  font-size: 3rem;
  background-color: white;
  border: 1px solid black;
  padding: 0.25em 0.5em;
  cursor: pointer;
  margin-top: 15px;
  border-radius: 5px;
}

.announce.show {
  display: flex;
}

.display {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 60px;
  margin-top: 10px;
}

@media only screen and (max-width: 600px) {
  button {
    font-size: 30px;
    padding: 5px 10px;
  }

  .display {
    font-size: 40px;
  }

  .announce {
    font-size: 50px;
  }
}

@media only screen and (min-width: 600px) {
  button:hover {
    background-color: black;
    color: white;
    border-color: white;
  }
}
