/* ─── menu.css ─────────────────────────────────────────────────────────────
   Main menu: layout column, location/folk pickers, Recent Games archive.
   Split out of the old style.css as a pure ordered slice. The <link> order
   in index.html (base → menu → online → board → folks → war → overlays →
   mobile → free-mode) preserves the original cascade — do not reorder. ─── */

/* MENU */
/* Top-anchor the menu (instead of vertical-centering) so JS-added content
   — the Recent Games list, the LAN hint — grows downward without re-centering
   the whole column, which caused a visible vertical jump on load. */
#screen-menu.active { justify-content: flex-start; padding: 6vh 0 2rem; }
#screen-menu h1 { font-size: 3rem; color: #e63946; margin-bottom: 0.25rem; }
#screen-menu h2 { font-size: 1.2rem; color: #aaa; margin-bottom: 2rem; letter-spacing: 2px; }

/* Fixed-width column so every control lines up */
#main-menu-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: 300px;
}
.menu-btn { width: 100%; }
/* Hot-Seat = the brand-red primary (same red as the title); Online/LAN modes
   keep their own colours (.btn-online blue / .btn-lan green in online.css). */
#btn-start { background: #e63946; color: #fff; }
#btn-start:hover { background: #c1121f; }
.menu-btn-row { display: flex; gap: 8px; }
.menu-btn-row .menu-btn { flex: 1; }
.menu-note { font-size: 0.7rem; color: #888; text-align: center; margin: 2px 0 2px; line-height: 1.3; }
.menu-note code { background: rgba(255,255,255,0.08); padding: 0 3px; border-radius: 3px; }
.menu-note a { color: #6a9; }

/* "Connecting to LAN server…" probing text: letter-pop wave + cycling dots,
   same feel as the online reconnect banner but at the menu-note font/size.
   Per-letter animation-delay is set inline by makePopText() in game.js. */
#lan-probing .pop-text span { display: inline-block; animation: lan-pop 1.5s ease-in-out infinite; }
#lan-probing .pop-dots { display: inline-block; width: 1.1em; text-align: left; }
#lan-probing .pop-dots::after { content: ''; animation: rc-dots 1.5s steps(4, end) infinite; }
@keyframes lan-pop {
  0%, 55%, 100% { transform: translateY(0);    opacity: 0.55; color: #888; text-shadow: none; }
  20%           { transform: translateY(-3px); opacity: 1;    color: #cde; text-shadow: 0 0 6px rgba(150,180,230,0.7); }
}

.menu-options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
}
.menu-label { font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 0.1rem; }
.menu-options label { cursor: pointer; font-size: 1rem; }
.menu-options input { margin-right: 0.5rem; }
.menu-name-row { display: flex; gap: 6px; }
.menu-name-row input { flex: 1; padding: 6px 8px; background: #1a1a2a; color: #eee; border: 1px solid #444; border-radius: 4px; margin: 0; font-size: 0.95rem; }
.menu-name-row button { padding: 4px 8px; background: #333; color: #eee; border: 1px solid #555; border-radius: 4px; cursor: pointer; }
.menu-name-row button:hover { background: #444; }
#menu-location-select { width: 100%; padding: 6px 8px; background: #1a1a2a; color: #eee; border: 1px solid #444; border-radius: 4px; font-size: 0.95rem; }

/* Recent Games archive */
#recent-games-toggle-row { display: flex; align-items: center; gap: 8px; }
#recent-games-toggle-row .recent-games-toggle { flex: 1; }
.recent-games-toggle {
  text-align: left;
  background: transparent;
  color: #ccc;
  border: none;
  padding: 0.3rem 0;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.recent-games-toggle:hover { color: #fff; background: transparent; }
.recent-games-delete-all {
  background: transparent;
  color: #888;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 4px 0;
  text-align: right;
  text-decoration: underline;
}
.recent-games-delete-all:hover { color: #fff; background: transparent; }
#recent-games-pinned, #recent-games-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.recent-game-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid #2a3a5c;
  border-radius: 4px;
  font-size: 0.8rem;
}
.recent-game-row.interrupted { border-color: #7a4a00; background: rgba(122,76,0,0.08); }
.recent-game-row:hover             { background: rgba(255,255,255,0.08); border-color: #4a5a7c; }
.recent-game-row.interrupted:hover { background: rgba(122,76,0,0.18);   border-color: #9a6a00; }
.recent-game-row .rg-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.recent-game-row .rg-names { font-weight: bold; color: #eee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-game-row .rg-meta  { color: #888; font-size: 0.7rem; }
.recent-game-row .rg-chip  {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  background: #333; color: #ccc; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.recent-game-row .rg-chip.hot-seat { background: #443a1a; color: #f0c040; }
.recent-game-row .rg-chip.peerjs   { background: #2a4a7c; color: #cde; }
.recent-game-row .rg-chip.lan      { background: #2e7d4f; color: #cfd; }
.recent-game-row .rg-chip.rg-chip-free { background: #4a5a3c; color: #d8e8b0; }
.recent-game-row .rg-action {
  background: #2a4a7c; color: #fff; border: none; border-radius: 4px;
  padding: 4px 10px; cursor: pointer; font-size: 0.8rem;
}
.recent-game-row .rg-action:hover { background: #3a6298; }
.recent-game-row.interrupted .rg-action { background: #7a5c00; }
.recent-game-row.interrupted .rg-action:hover { background: #a07a00; }
.recent-game-row .rg-delete,
.recent-game-row .rg-download {
  background: transparent; color: #888; border: none; cursor: pointer;
  font-size: 1rem; padding: 0 4px;
}
.recent-game-row .rg-delete:hover,
.recent-game-row .rg-download:hover { color: #fff; }
.rg-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; grid-column: 1 / -1; }
.rg-load-as { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0; }
.rg-load-as-label { color: #777; font-size: 0.7rem; align-self: center; margin-right: 2px; }
.rg-load-as button {
  background: #2a2a3a; color: #ccc; border: 1px solid #444; border-radius: 3px;
  padding: 2px 6px; cursor: pointer; font-size: 0.7rem;
}
.rg-load-as button:hover { background: #3a3a4a; color: #fff; }

