/* ══════════════════════════════════════════════════
   Hockey de Robôs — Estilos
══════════════════════════════════════════════════ */
:root {
  --bg:    #0b0f14;
  --panel: #121a22;
  --line:  #263645;
  --teal:  #19d3c5;
  --blue:  #4dabf7;
  --red:   #ff6b6b;
  --gold:  #ffc93d;
  --ink:   #e8f1f8;
  --muted: #93a9bb;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--ink); font-family: 'Rajdhani', system-ui, sans-serif; overflow: hidden; }

.orbitron  { font-family: 'Orbitron', sans-serif; }
.rajdhani  { font-family: 'Rajdhani', sans-serif; }
.fw-900    { font-weight: 900; }
.text-teal { color: var(--teal); }
.text-blue { color: var(--blue); }
.text-red  { color: var(--red); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--muted) !important; }

/* ── Telas ───────────────────────────────────── */
.screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto;
}
.screen.flex-column { flex-direction: column; }

/* ── Lobby ───────────────────────────────────── */
.lobby-wrap {
  width: 100%; max-width: 640px;
  padding: 1.2rem 1rem 1.5rem;
}

.team-card {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.team-card.border-blue { border-color: rgba(77,171,247,.5); }
.team-card.border-red  { border-color: rgba(255,107,107,.5); }

.team-header {
  font-family: 'Orbitron', sans-serif;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-align: center;
  padding: 6px; color: #fff;
}
.bg-blue { background: rgba(77,171,247,.25); }
.bg-red  { background: rgba(255,107,107,.25); }

.slot-row {
  display: flex; align-items: center; gap: .5rem;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  transition: background .12s;
}
.slot-row:hover { background: rgba(255,255,255,.04); }
.slot-row.mine  { background: rgba(255,201,61,.06); outline: 1px solid var(--gold); outline-offset: -1px; }

.snum { font-family: 'Orbitron', sans-serif; font-size: .6rem; color: var(--muted); min-width: 22px; }
.sname { flex: 1; font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-slot {
  flex-shrink: 0;
  font-family: 'Orbitron', sans-serif; font-size: .6rem; font-weight: 700; letter-spacing: .08em;
  border: 1px solid; border-radius: 6px; padding: 4px 10px; cursor: pointer;
  background: transparent; transition: background .12s, color .12s;
}
.btn-blue { color: var(--blue); border-color: var(--blue); }
.btn-blue:hover { background: var(--blue); color: #04171e; }
.btn-red  { color: var(--red);  border-color: var(--red);  }
.btn-red:hover  { background: var(--red);  color: #fff; }
.btn-slot:disabled { opacity: .45; cursor: not-allowed; }

.controls-hint {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 8px; padding: 10px;
  text-align: center;
  font-size: .88rem; font-weight: 600; color: var(--muted);
}
kbd {
  font-family: 'Orbitron', sans-serif; font-size: .65rem;
  background: var(--panel); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; color: var(--ink);
}

.btn-action {
  font-family: 'Orbitron', sans-serif; font-weight: 700; letter-spacing: .08em;
  font-size: .88rem; border: none; border-radius: 10px;
  padding: 12px 28px; cursor: pointer;
  background: var(--teal); color: #04211e;
  transition: filter .12s, transform .08s;
}
.btn-action:hover  { filter: brightness(1.1); }
.btn-action:active { transform: scale(.97); }
.btn-action:disabled { background: #263645; color: var(--muted); cursor: not-allowed; filter: none; }

.modal-dark { background: #111c26; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; }
.form-input {
  width: 100%; background: #1a2535; border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); padding: 10px 12px; font-family: 'Rajdhani', sans-serif;
  font-size: 1rem; font-weight: 600; outline: none;
}
.form-input:focus { border-color: var(--teal); }

/* ── HUD ─────────────────────────────────────── */
#hud {
  flex-shrink: 0; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: rgba(0,0,0,.85);
  border-bottom: 1.5px solid var(--line);
}
.hud-side  { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 2.4rem; min-width: 60px; text-align: center; text-shadow: 0 0 12px currentColor; }
.hud-center { text-align: center; }

/* ── Canvas ──────────────────────────────────── */
#canvas-wrap {
  flex: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #0a1520; overflow: hidden;
}
#gameCanvas {
  display: block; touch-action: none; cursor: crosshair;
  /* tamanho definido via JS */
}

/* ── Flash de gol ────────────────────────────── */
.goal-flash {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
}
.goal-flash.show { animation: goalpop .9s ease forwards; }
.goal-flash.foe #goal-flash-txt { text-shadow: 0 0 24px rgba(255,107,107,.9), 0 2px 0 rgba(0,0,0,.4); }
#goal-flash-txt {
  font-family: 'Orbitron', sans-serif; font-weight: 900;
  font-size: clamp(2.5rem,10vw,4rem); letter-spacing: .08em; color: #fff;
  text-shadow: 0 0 24px rgba(25,211,197,.9), 0 2px 0 rgba(0,0,0,.4);
}
@keyframes goalpop {
  0%   { opacity: 0; transform: scale(.6); }
  18%  { opacity: 1; transform: scale(1.08); }
  30%  { transform: scale(1); }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Player bar ──────────────────────────────── */
#player-bar {
  flex-shrink: 0; width: 100%;
  text-align: center; padding: 5px;
  background: rgba(0,0,0,.7);
  border-top: 1px solid var(--line);
  font-size: .88rem; color: var(--muted);
}

/* ── Resultado ───────────────────────────────── */
#screen-result { background: var(--bg); }

/* ── Responsivo ──────────────────────────────── */
@media (max-width: 480px) {
  .hud-side { font-size: 1.7rem; }
  #hud-timer { font-size: 1.5rem !important; }
}
