:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --accent: #4895ef;
  --light: #f8f9fa;
  --dark: #212529;
  --success: #4cc9f0;
  --danger: #f72585;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--light);
  color: var(--dark);
  padding: 20px;
}

h1 {
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-weight: 600;
  text-align: center;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 400px;
  width: 100%;
}

.status {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--secondary);
  height: 1.5rem;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 300px;
}

.cell {
  aspect-ratio: 1/1;
  border: none;
  border-radius: 12px;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--dark);
}

.cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

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

.cell.x {
  color: var(--primary);
}

.cell.o {
  color: var(--danger);
}

.reset-btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.reset-btn:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

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

.winning-cell {
  background-color: rgba(67, 97, 238, 0.2);
  animation: pulse 1s infinite;
}

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

@media (max-width: 400px) {
  h1 {
    font-size: 1.5rem;
  }

  .cell {
    font-size: 2rem;
  }
}
