/* =============================================
   game.css — Styles for the game board page
   ============================================= */

/* --- Turn indicator badge --- */
.turn-badge {
  text-align: center;
  background: var(--primary-light);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
}

/* --- The 3x3 Board --- */
.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 auto 20px auto;
  /* Cap the board width so it doesn't stretch too wide on large screens */
  max-width: 320px;
}

/* --- Each cell --- */
.cell {
  aspect-ratio: 1;           /* Always square */
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 900;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: background 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.cell:hover:not(.taken) {
  background: #e0e7ff;
  transform: scale(1.04);
}

/* Cell is claimed — no more hover effect */
.cell.taken {
  cursor: default;
}

/* Player X cell */
.cell.x {
  color: var(--x-color);
}

/* Player O cell */
.cell.o {
  color: var(--o-color);
}

/* Winning cells get highlighted */
.cell.winner-cell {
  background: #fef3c7;
  border-color: var(--accent);
}

/* --- Result message box --- */
.result-box {
  text-align: center;
  background: #fef3c7;
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #92400e;
}

/* Restart button — full width in game card */
#restartBtn {
  width: 100%;
}
