body {
  font-family: Arial, sans-serif;
  background: #1e1e1e;
  color: #fff;
  text-align: center;
  margin-top: 50px;
  animation: fadeIn 1s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  gap: 10px;
  justify-content: center;
  margin: 20px auto;
}

.cell {
  width: 100px;
  height: 100px;
  background-color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 10px;
  position: relative;
  animation: popIn 0.3s ease;
  transform-style: preserve-3d;
}

@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.cell.clicked {
  animation: flip 0.3s ease forwards;
}

@keyframes flip {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(180deg); }
}

.cell.winner {
  animation: pulse 1s infinite;
  background-color: #4caf50 !important;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

#status {
  font-size: 1.2rem;
  margin: 10px 0;
  transition: all 0.3s ease;
}

button {
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  background-color: #ff9800;
  color: white;
  border: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #ffa726;
}
#scoreboard {
  margin-top: 20px;
  font-size: 1.1rem;
}

#scoreboard p {
  margin: 5px 0;
}

button + button {
  margin-left: 10px;
}
#player-setup {
  margin-bottom: 20px;
}

#player-setup input {
  padding: 10px;
  margin: 0 5px;
  width: 150px;
  font-size: 1rem;
  border-radius: 5px;
  border: none;
}

#player-setup button {
  padding: 10px 20px;
  font-size: 1rem;
  margin-left: 10px;
  cursor: pointer;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
}

#player-setup button:hover {
  background-color: #66bb6a;
}
#game-container {
  margin-top: 20px;
}

body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

.dark-mode .board {
  background-color: #1e1e1e;
}

.dark-mode .cell {
  background-color: #333;
  border-color: #555;
  color: #fff;
}

button {
  margin-top: 10px;
}

button:hover {
  opacity: 0.9;
}
