/* ============================================================
   Tic Tac Toe — game-specific styles
   ============================================================ */

.ttt-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ttt-toggle {
  display: inline-flex;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.ttt-toggle button {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 16px;
  border: none;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}
.ttt-toggle button.active {
  background: var(--ink);
  color: #fff;
}

#difficulty-row {
  display: flex;
  gap: 8px;
}
#difficulty-row[hidden] {
  display: none;
}

.ttt-status {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-soft);
  min-height: 1.4em;
  text-align: center;
}

/* --- Board --- */
.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  width: min(340px, 80vw);
  aspect-ratio: 1;
}

.ttt-cell {
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 9vw, 3.2rem);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 rgba(34, 49, 74, 0.15);
  transition: transform 0.08s ease;
}
.ttt-cell:hover:not(:disabled) { transform: translateY(-2px); }
.ttt-cell:disabled { cursor: default; }

.ttt-cell.is-x { color: var(--simon-blue); }
.ttt-cell.is-o { color: var(--pink-deep); }

.ttt-cell.pop {
  animation: ttt-pop 0.18s ease;
}
@keyframes ttt-pop {
  from { transform: scale(0.5); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

.ttt-cell.win-cell {
  background: var(--simon-green);
  border-color: var(--ink);
}
.ttt-cell.win-cell.is-x,
.ttt-cell.win-cell.is-o {
  color: #fff;
}

/* --- Score --- */
.ttt-score-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Fullscreen mode --- */
#game-stage:fullscreen,
#game-stage.obg-fake-fullscreen {
  border-radius: 0;
  border: none;
  width: 100vw;
  height: 100vh;
  justify-content: flex-start;
  background: var(--bg-soft);
  overflow-y: auto;
}
#game-stage:fullscreen .ttt-board,
#game-stage.obg-fake-fullscreen .ttt-board {
  width: min(70vh, 80vw);
}
