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

:root {
  --cell-size: 100px;
  --mark-size: calc(var(--cell-size) * 0.9);
}

body {
  font-family: "Poppins", sans-serif;
}

h2 {
  width: 100%;
  text-align: center;
  margin-top: 2rem;
  font-size: 1.8rem;
  position: fixed;
}
.board {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: grid;
  justify-content: center;
  align-content: center;
  justify-items: center;
  align-items: center;
  grid-template-columns: repeat(3, auto);
}

.board::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-image: url("./BG.png");
  background-position: center;
  background-size: cover;
  opacity: 0.05;
}

.cell {
  width: var(--cell-size);
  height: var(--cell-size);
  border: 1px solid #000;
  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.cross,
.cell.circle {
  cursor: not-allowed;
}

.cell.cross::before,
.cell.cross::after {
  background-color: rgb(88, 80, 236);
}
.cell.circle::before {
  background-color: rgb(236, 80, 88);
}

.board.cross .cell:not(.cross):not(.circle):hover::before,
.board.cross .cell:not(.cross):not(.circle):hover::after,
.board.circle .cell:not(.cross):not(.circle):hover::before {
  background-color: rgb(211, 211, 211);
}

.cell.cross::before,
.cell.cross::after,
.board.cross .cell:not(.cross):not(.circle):hover::before,
.board.cross .cell:not(.cross):not(.circle):hover::after {
  content: "";
  position: absolute;
  width: calc(var(--mark-size) * 0.15);
  height: var(--mark-size);
}

.cell.cross::before,
.board.cross .cell:not(.cross):not(.circle):hover::before {
  transform: rotate(45deg);
}

.cell.cross::after,
.board.cross .cell:not(.cross):not(.circle):hover::after {
  transform: rotate(-45deg);
}

.cell.circle::before,
.cell.circle::after,
.board.circle .cell:not(.cross):not(.circle):hover::before,
.board.circle .cell:not(.cross):not(.circle):hover::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.cell.circle::before,
.board.circle .cell:not(.cross):not(.circle):hover::before {
  width: var(--mark-size);
  height: var(--mark-size);
}

.cell.circle::after,
.board.circle .cell:not(.cross):not(.circle):hover::after {
  width: calc(var(--mark-size) * 0.7);
  height: calc(var(--mark-size) * 0.7);
  background-color: #fff;
}

.winningMessage {
  display: none;
  position: fixed;
  height: 100vh;
  width: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 3.5rem;
  flex-direction: column;
}

.winningMessage button {
  font-size: 2.5rem;
  background-color: #fff;
  border: 1px solid #000;
  border: none;
  outline: none;
  padding: 0.5rem 2rem;
  cursor: pointer;
  transition: 0.3s;
  border-radius: 3rem;
}

.winningMessage button:hover {
  background-color: rgb(50, 50, 50);
  color: #fff;
}

.winningMessage.show {
  display: flex;
}
