/* FrogFour - Connect Four board + controls. Layout/colors lean on
   tool-shell.css variables; this only adds the mode toggle, setup row, the
   7x6 grid, disc styling, and the hover-preview. */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.ff-modes {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin: 0 0 1.25rem;
}
.ff-mode {
  padding: .5rem 1.1rem;
  border: 1px solid var(--border-dark, #232930);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface-dark, #14181d);
  color: var(--text-light, #e5e7eb);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.ff-mode:hover { border-color: var(--accent, #19c37d); }
.ff-mode--active {
  border-color: var(--accent, #19c37d);
  color: var(--accent, #19c37d);
  background: var(--accent-soft, rgba(25, 195, 125, 0.12));
}

.ff-setup {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  margin: 0 0 1.25rem;
}
.ff-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .85rem;
  color: var(--muted, #8b9199);
}
.ff-field select {
  padding: .5rem .65rem;
  border: 1px solid var(--border-dark, #232930);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface-dark, #14181d);
  color: var(--text-light, #e5e7eb);
  font: inherit;
}

.ff-status {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  min-height: 1.5em;
  color: var(--text-light, #e5e7eb);
}
.ff-status[data-tone="you"] { color: var(--accent, #19c37d); }
.ff-status[data-tone="them"] { color: #c9a227; }
.ff-status[data-tone="error"] { color: #f08a8a; }

/* 7 columns; each column is a vertical stack of 6 cells. The column button is
   the click target (you drop into a column, not a cell). */
.ff-board {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .4rem;
  width: min(480px, 94vw);
  margin: 0 auto;
  padding: .5rem;
  background: var(--bg-dark, #0d0f12);
  border: 1px solid var(--border-dark, #232930);
  border-radius: var(--radius-md, 10px);
}
.ff-col {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.ff-col:disabled { cursor: default; }

.ff-cell {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--surface-dark, #14181d);
  border: 1px solid var(--border-dark, #232930);
  transition: background .12s ease, box-shadow .12s ease;
}
.ff-cell[data-disc="1"] {
  background: #e0464b;
  border-color: #f08a8a;
  box-shadow: 0 0 8px rgba(224, 70, 75, .5);
}
.ff-cell[data-disc="2"] {
  background: #d8b026;
  border-color: #f0d878;
  box-shadow: 0 0 8px rgba(216, 176, 38, .5);
}
/* The cell where a disc would land if you drop into this column now. */
.ff-col:not(:disabled):hover .ff-cell--preview {
  background: var(--accent-soft, rgba(25, 195, 125, 0.12));
  border-color: var(--accent, #19c37d);
}
/* Winning line emphasis. */
.ff-cell--win {
  box-shadow: 0 0 0 3px var(--accent, #19c37d), 0 0 12px var(--accent, #19c37d);
}

.ff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.ff-invite {
  margin: 1.5rem auto 0;
  width: min(440px, 92vw);
  text-align: center;
}
.ff-invite__label {
  margin: 0 0 .5rem;
  font-size: .9rem;
  color: var(--muted, #8b9199);
}
.ff-invite__row {
  display: flex;
  gap: .5rem;
}
.ff-invite__url {
  flex: 1;
  min-width: 0;
  padding: .55rem .7rem;
  border: 1px solid var(--border-dark, #232930);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface-dark, #14181d);
  color: var(--text-light, #e5e7eb);
  font: inherit;
  font-size: .85rem;
}
.ff-invite__flash {
  display: inline-block;
  margin-top: .5rem;
  font-size: .85rem;
  color: var(--accent, #19c37d);
  min-height: 1.2em;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 560px) {
  .ff-board { width: min(480px, 96vw); gap: .3rem; padding: .4rem; }
  .ff-setup { gap: .75rem; }
  .ff-field { flex: 1 1 8rem; }
  .ff-field select { width: 100%; }
  .ff-status { font-size: 1.05rem; }
}
