* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  background-color: #451645;
  color: #fff;
}

.container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.container h1 {
  margin: 20px 0 40px 0;
  text-decoration: underline;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.cell {
  border: 2px solid #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  font-size: 60px;
  font-weight: 600;
  height: 120px;
  cursor: pointer;
}

.cell:first-child,
.cell:nth-child(2),
.cell:nth-child(3) {
  border-top: none;
}

/* .cell:nth-child(3),
.cell:nth-child(6),
.cell:nth-child(9) {
  border-right: none;
} */

/* put values from 0. it works for n = 1,2,3  */
.cell:nth-child(3n) {
  border-right: none;
}

.cell:nth-child(3n + 1) {
  border-left: none;
}

.cell:nth-child(n + 7) {
  border-bottom: none;
}

.game-player {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.player {
  margin-inline: 18px;
  font-size: 24px;
  font-weight: 600;
}

.restartBtn {
  border: none;
  background: #5f5fc4;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-block: 18px;
  padding: 10px 30px;
  border-radius: 4px;
  cursor: pointer;
}

.restartBtn:hover {
  background: #7272e1;
}

.cell.disabled {
  background: #8c8c8c;
}

.alertBox {
  position: absolute;
  top: 0;
  background-color: #dfdfdf;
  color: #4d4b51;
  width: 100%;
  padding: 8px 12px;
  font-size: 20px;
  font-weight: 600;
  height: 40px;
  display: none;
}

/* Media Query */
@media screen and (max-width: 550px) {
  .container h1 {
    font-size: 24px;
  }

  .game-board {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }
  .cell {
    height: 90px;
    font-size: 50px;
  }
}
