:root {
  color-scheme: light dark;
  --cell-size: 100px;
  --gap: 8px;
  --accent: #2d6cdf;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  margin: 0;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

h1 {
  margin: 0;
  font-size: 1.5rem;
}

.score {
  display: flex;
  gap: 1.5rem;
  font-size: 1rem;
}

.status {
  min-height: 1.5em;
  font-size: 1.1rem;
  font-weight: 600;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, var(--cell-size));
  grid-template-rows: repeat(3, var(--cell-size));
  gap: var(--gap);
}

.cell {
  width: var(--cell-size);
  height: var(--cell-size);
  font-size: 2.5rem;
  font-weight: 700;
  border: 2px solid #888;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.cell:disabled {
  cursor: default;
}

.cell.win {
  border-color: var(--accent);
  color: var(--accent);
}

.cell.bonus {
  border-style: dashed;
  border-color: gold;
  color: gold;
  background: rgba(255, 215, 0, 0.12);
  animation: bonus-pop 0.4s ease-out;
}

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

.restart {
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.restart:hover {
  opacity: 0.9;
}
