:root {
  color-scheme: dark;
  /* Тема всегда тёмная — не зависит от --tg-theme-*, чтобы не белеть
     на светлой теме Telegram у клиента. */
  --bg: #0f1115;
  --text: #f2f2f2;
  --hint: #8a8a8a;
  --accent: #4c8cff;
  --cell-bg: #1b1e26;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#app {
  width: 100%;
  max-width: 420px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.players {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 15px;
  font-weight: 600;
}

.players .me { color: var(--accent); }
.players .turn { text-decoration: underline; }

.status {
  font-size: 14px;
  color: var(--hint);
  text-align: center;
  min-height: 20px;
}

/* Сетка 3x3 для крестиков-ноликов (public/games/tictactoe.js). Игре с другой
   формой поля стоит завести свой класс + свой stylesheetHref (см. app.js:
   getBoardModule) вместо переиспользования этих правил. */
.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  aspect-ratio: 1;
}

.cell {
  background: var(--cell-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
  user-select: none;
  transition: opacity 0.15s ease;
}

.cell.clickable { cursor: pointer; }
.cell.x { color: #ff6b6b; }
.cell.o { color: #4c8cff; }
.cell.vanishing { opacity: 0.35; }

.status.win { color: #6bd97a; font-weight: 700; }
.status.lose { color: #ff6b6b; font-weight: 700; }
.status.error { color: #ff6b6b; }
