/* coach.css — extends game.css (linked first in HTML) */

html, body { overflow: auto !important; }

/* ── Lobby ── */
#lobby-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 40px;
  background: linear-gradient(160deg, #0d3d1e 0%, #111 60%);
  overflow-y: auto;
}

.lobby-game-name {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  text-align: center;
  width: 100%;
  max-width: 420px;
}

.lobby-code-card {
  background: #1e1e1e;
  border-radius: 20px;
  padding: 20px 24px;
  text-align: center;
  width: 100%;
  max-width: 420px;
  margin-bottom: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.lobby-code-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 10px;
}

.lobby-code {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.25em;
  font-family: 'Courier New', monospace;
  margin-bottom: 14px;
  line-height: 1;
}

.btn-copy {
  background: rgba(244,200,66,0.12);
  border: 1.5px solid rgba(244,200,66,0.4);
  color: var(--gold);
  border-radius: 8px;
  padding: 8px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-copy:active { background: rgba(244,200,66,0.25); }

.lobby-players-card {
  background: #1e1e1e;
  border-radius: 16px;
  padding: 16px 20px;
  width: 100%;
  max-width: 420px;
  margin-bottom: 20px;
  flex: 1;
  min-height: 120px;
}

.lobby-players-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 12px;
}

.lobby-count {
  background: rgba(244,200,66,0.2);
  color: var(--gold);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 0.68rem;
  font-weight: 800;
}

.lobby-player {
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  border-bottom: 1px solid #2a2a2a;
}
.lobby-player:last-child { border-bottom: none; }
.lobby-player.offline { color: var(--muted); }

.lobby-empty {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
  text-align: center;
  padding: 24px 0 10px;
}

.btn-start-game {
  width: 100%;
  max-width: 420px;
  background: var(--gold);
  color: var(--green-dark);
  border: none;
  border-radius: 14px;
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-start-game:disabled { opacity: 0.3; pointer-events: none; }
.btn-start-game:active   { transform: scale(0.97); }

/* ── Live game layout ── */
#game-screen {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

/* Scoreboard in header */
.coach-scoreboard {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.csb-us   { font-size: 0.95rem; font-weight: 900; color: var(--gold); white-space: nowrap; }
.csb-sep  { font-size: 0.6rem;  font-weight: 700; color: rgba(255,255,255,0.35); }
.csb-them { font-size: 0.95rem; font-weight: 900; color: rgba(255,255,255,0.85); white-space: nowrap; }

/* ── Team grid ── */
.team-grid-wrap {
  overflow-y: auto;
  padding: 8px 8px 4px;
  background: var(--bg);
}

.team-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: fixed;
}

.team-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #1a1a1a;
  padding: 8px 4px;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 2px solid #2a2a2a;
}
.team-grid th.col-player { text-align: left; padding-left: 12px; width: 32%; }

.team-grid td {
  padding: 10px 4px;
  text-align: center;
  border-bottom: 1px solid #1c1c1c;
  font-weight: 700;
  color: white;
}
.team-grid td.col-player {
  text-align: left;
  padding-left: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-grid tr.offline td { color: var(--muted); }

.team-grid tfoot td {
  background: #181818;
  color: var(--gold);
  font-weight: 900;
  border-top: 2px solid #2a2a2a;
  padding: 10px 4px;
}
.team-grid tfoot td.tot-label {
  text-align: left;
  padding-left: 12px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 700;
}

@keyframes cellflash {
  0%   { background: rgba(244,200,66,0.45); color: #1a1a00; }
  100% { background: transparent; color: white; }
}
.team-grid td.flash { animation: cellflash 0.4s ease; }

/* ── Coach footer ── */
.coach-footer {
  padding: 8px;
  background: var(--bg);
}
.coach-footer .btn-qbreak {
  width: 100%;
}
