/* Modern styling with CSS variables for easy theming */
:root {
 --primary-color: #312e81;
 --hover-color: #4338ca;
 --background-color: #f8fafc;
 --board-background: #ffffff;
 --text-color: #1e293b;
 --cell-border: #e2e8f0;
 --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  transition: all 0.3s ease;
}

.game-container {
  text-align: center;
  padding: 2rem;
  background-color: var(--board-background);
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px var(--shadow-color),
              0 8px 10px -6px var(--shadow-color);
  width: 360px;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.025em;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.cell {
  aspect-ratio: 1;
  font-size: 2.25rem;
  font-weight: 600;
  background-color: var(--board-background);
  border: 2px solid var(--cell-border);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.cell:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: 0 4px 6px -1px var(--shadow-color);
}

.cell:active {
  transform: translateY(0);
}

.cell[data-player="X"] {
  color: #ef4444;
}

.cell[data-player="O"] {
  color: #3b82f6;
}

.reset-button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: var(--primary-color);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.reset-button:hover {
  background-color: var(--hover-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px var(--shadow-color);
}

.reset-button:active {
  transform: translateY(0);
}

.message {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color:  var(--text-color);
  animation: fadeIn 0.3s ease;
}

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