:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #09090b;
  color: #fafafa;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 25%, rgba(34, 211, 238, 0.12), transparent 34rem),
    #09090b;
}

button { font: inherit; }

.game {
  width: min(92vw, 34rem);
  padding: 2.5rem 1rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #67e8f9;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.status {
  min-height: 1.5em;
  margin: 1.25rem 0;
  color: #d4d4d8;
  font-size: 1.125rem;
  font-weight: 700;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 0.6rem;
  border: 2px solid #3f3f46;
  border-radius: 1.25rem;
  background: #18181b;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
}

.cell {
  aspect-ratio: 1;
  border: 2px solid #52525b;
  border-radius: 0.75rem;
  background: #27272a;
  color: #fafafa;
  cursor: pointer;
  font-size: clamp(3rem, 16vw, 6rem);
  font-weight: 900;
  line-height: 1;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.cell:hover:empty { background: #3f3f46; border-color: #a1a1aa; }
.cell:active:empty { transform: scale(0.96); }
.cell:focus-visible, .reset:focus-visible { outline: 4px solid #facc15; outline-offset: 3px; }
.cell.x { color: #67e8f9; }
.cell.o { color: #fbbf24; }
.cell.winner { background: #14532d; border-color: #4ade80; }

.reset {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 1.25rem;
  border: 2px solid #fafafa;
  border-radius: 0.75rem;
  background: #fafafa;
  color: #09090b;
  cursor: pointer;
  font-weight: 900;
}

.reset:hover { background: #d4d4d8; }

@media (prefers-reduced-motion: reduce) {
  .cell { transition: none; }
}
