body { gap: 18px; }

/* scoreboard chips (labels adapt to the mode in game.js) */
#score {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* mode + difficulty button groups (copied from connect-four) */
#mode,
#difficulty {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.mode-btn,
.diff-btn {
  padding: 8px 18px;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow);
}
.mode-btn:hover,
.diff-btn:hover { opacity: 1; background: var(--surface-3); }
.mode-btn.active,
.diff-btn.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}
/* difficulty group is only shown in vs-CPU mode */
#difficulty[hidden] { display: none; }

/* ---------- the board ----------
   Grid: a tall store at each end, two rows of six pits between them.
     col 1  = North store (spans both rows, top-left)
     col 2  = pit rows (top = North, bottom = South)
     col 3  = South store (spans both rows, bottom-right)            */
#board {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  background: var(--blue-board);
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 10px 40px var(--shadow);
  border-bottom: 6px solid var(--blue-board-dark);
}

.store-left  { grid-column: 1; grid-row: 1 / span 2; }
.top-row     { grid-column: 2; grid-row: 1; }
.bottom-row  { grid-column: 2; grid-row: 2; }
.store-right { grid-column: 3; grid-row: 1 / span 2; }

.pit-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

/* a pit (clickable) — square via aspect-ratio so it shrinks to fit */
.pit {
  position: relative;
  width: 100%;
  max-width: 76px;
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--hole);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.55);
  cursor: default;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* a store (the big end wells) */
.store {
  position: relative;
  width: clamp(46px, 13vw, 88px);
  min-height: 100%;
  border-radius: 999px;
  background: var(--hole);
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* playable pits glow and lift on the active side */
.pit.playable {
  cursor: pointer;
  background: var(--hole-hover);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.5),
              0 0 0 3px var(--accent);
}
.pit.playable:hover { transform: translateY(-3px); }
#board.locked .pit { cursor: default; }
.pit:disabled { cursor: default; }

/* seed count label */
.count {
  position: relative;
  z-index: 2;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--btn-text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.store .count { font-size: 1.7rem; }
.pit.empty .count, .store .count { opacity: 0.95; }

/* little stone dots scattered behind the count */
.seeds {
  position: absolute;
  inset: 8px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 3px;
  pointer-events: none;
}
.store .seeds { inset: 12px; }
.seed {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  animation: seedPop 0.2s ease;
}
@keyframes seedPop { from { transform: scale(0); } to { transform: scale(1); } }

/* side tint: south seeds gold, north seeds a cooler tone for contrast */
.north .seed { background: var(--red); }

@media (max-width: 560px) {
  #board { gap: 7px; padding: 9px; }
  .pit-row { gap: 5px; }
  .count { font-size: 1rem; }
  .store .count { font-size: 1.25rem; }
  .seeds { inset: 5px; gap: 2px; }
  .seed { width: 6px; height: 6px; }
}
