* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #1a1a2e;
  color: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
}

.container {
  text-align: center;
  width: 100%;
  max-width: 360px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 24px;
  color: #e94560;
}

.status {
  font-size: 1.2rem;
  min-height: 2em;
  margin-bottom: 24px;
  padding: 12px;
  border-radius: 10px;
  background: #16213e;
}

.status.my-turn {
  background: #0f3460;
  color: #4ecca3;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  aspect-ratio: 1;
}

.cell {
  background: #16213e;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s;
  aspect-ratio: 1;
}

.cell:active {
  background: #0f3460;
}

.cell.x {
  color: #e94560;
}

.cell.o {
  color: #4ecca3;
}

.cell.disabled {
  pointer-events: none;
}

.mark-display {
  font-size: 1rem;
  margin-bottom: 16px;
  min-height: 1.5em;
}

.restart-btn {
  display: none;
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  background: #e94560;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s;
}

.restart-btn:active {
  opacity: 0.8;
}

.restart-btn.visible {
  display: block;
}
