@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
  margin: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  user-select: none;
  color: white;
}

main {
  background: #0A0519;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#header {
  display: flex;
  width: 235px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

#header .player {
  background: #17122A;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 12px;
  border: solid 4px #17122A;
  opacity: 0.5;
  transition: 0.3s;
}

#header .player:hover {
  border: solid 4px #2A2343;
}

#header .player-active {
  opacity: 1;
  border: solid 4px #2A2343;
}

#header #xPlayerDisplay {
  color: #1892EA;
}

#header #oPlayerDisplay {
  color: #A737FF;
}

#board {
  display: grid;
  grid-template-columns: repeat(3, 70px);
  grid-template-rows: repeat(3, 70px);
  gap: 12px;
}

#board .cell {
  background: #17122A;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s background;
}

#board .cell:hover {
  background: #2A2343;
}

#restartBtn {
  margin-top: 30px;
  width: 235px;
  background: #17122A;
  padding: 8px 0;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s background;
  visibility: hidden;
}

#restartBtn:hover {
  background: #2A2343;
}

#turnMessage {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 500;
  color: #E0E0E0;
  transition: 0.3s;
}

@keyframes pop {
  0% {
    transform: scale(0.5);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.cell.animate {
  animation: pop 0.3s ease;
}
