/* Hidden Eleven — mesma família visual do FC Intel / Footstop, com azul como cor de destaque. */

@font-face {
  font-family: 'Anton';
  src: url(/fontes/anton-latin.woff2) format('woff2');
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Anton';
  src: url(/fontes/anton-latin-ext.woff2) format('woff2');
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  src: url(/fontes/inter-latin.woff2) format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url(/fontes/inter-latin-ext.woff2) format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #06140d;
  --bg2: #0b2417;
  --panel: #0c2016cc;
  --panel-forte: #0c2016f2;
  --panel-border: #ffffff1a;
  --line: #ffffff12;
  --pitch: #0f3d24;
  --text: #eef3ef;
  --muted: #93a99c;
  --azul: #3b82f6;
  --azul2: #60a5fa;
  --azul-escuro: #1d4ed8;
  --azul-tinta: #1e3a8a;
  --azul-suave: #3b82f62e;
  --vermelho: #ef4444;
  --cinza: #6b7280;
  --radius: 14px;
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* Fundo: relvado com riscas, brilho e círculo central */
.fundo {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 60% at 50% 40%, #134a2c 0%, transparent 70%),
    repeating-linear-gradient(90deg, #ffffff05 0 80px, transparent 80px 160px),
    var(--bg);
  overflow: hidden;
}
.fundo::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #ffffff14;
}
.fundo-circulo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  height: 190px;
  border: 1px solid #ffffff14;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Ecrãs */
.ecra {
  min-height: 100dvh;
}
.ecra-centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 16px 40px;
}

.marca {
  text-align: center;
}
.marca .logo {
  filter: drop-shadow(0 8px 24px #3b82f655);
}
.titulo {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(46px, 11vw, 76px);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 8px 0 6px;
}
.marca-pequena .titulo {
  font-size: clamp(34px, 8vw, 48px);
}
.titulo-medio {
  font-size: clamp(30px, 7vw, 42px);
  margin: 0 0 12px;
}
.azul {
  background: linear-gradient(180deg, var(--azul2), var(--azul));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px #3b82f655;
}
.subtitulo {
  color: var(--muted);
  margin: 0 auto;
  max-width: 420px;
}

/* Cartões e painéis */
.cartao,
.painel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}
.cartao {
  width: min(100%, 360px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 20px 60px #0007;
}
.cartao-largo {
  width: min(100%, 520px);
}
.painel {
  padding: 14px;
}
.painel-titulo {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 17px;
  margin: 0 0 10px;
  color: var(--muted);
}

.rotulo {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9d6cf;
  margin: 4px 0 0;
}
.nota {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.centro {
  text-align: center;
}
.erro {
  color: #fca5a5;
  font-size: 13px;
  margin: 0;
  min-height: 0;
}
.erro:empty {
  display: none;
}
.separador {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 6px 0 0;
}
.linha {
  display: flex;
  gap: 8px;
}
.linha > .campo {
  flex: 1;
  min-width: 0;
}
.linha-botoes {
  display: flex;
  gap: 10px;
}

/* Campos */
.campo {
  width: 100%;
  background: #0000004d;
  border: 1px solid #ffffff1a;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.campo::placeholder {
  color: #ffffff59;
  font-weight: 600;
}
.campo:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 3px var(--azul-suave);
}
select.campo {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #c9d6cf 50%), linear-gradient(135deg, #c9d6cf 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
select.campo option {
  background: #0b2417;
}
.campo-codigo {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
}

/* Botões */
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s, filter 0.15s, opacity 0.15s, background 0.15s;
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn:focus-visible {
  outline: 2px solid var(--azul2);
  outline-offset: 2px;
}
/* Botão principal como no Coach Board: letra Anton em maiúsculas e um degrau por baixo. */
.btn-principal {
  background: linear-gradient(180deg, var(--azul), var(--azul-escuro));
  outline: 1px solid #93c5fd55;
  outline-offset: -1px;
  color: #fff;
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow:
    0 3px 0 var(--azul-tinta),
    0 8px 20px #3b82f64d;
}
.btn-principal:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn-principal:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--azul-tinta), 0 4px 10px #3b82f64d;
}
.btn-claro {
  background: #fff;
  color: var(--azul-tinta);
}
.btn-fantasma {
  background: #ffffff14;
  color: var(--text);
}
.btn-fantasma:hover:not(:disabled) {
  background: #ffffff21;
}
.btn-contorno {
  background: transparent;
  border: 1px solid #ffffff26;
  color: var(--text);
}
.btn-mini {
  padding: 6px 10px;
  font-size: 13px;
  background: #ffffff14;
}
.ligacao-voltar {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

/* Lobby */
.lobby-sala {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.codigo-grande {
  font-family: var(--display);
  font-size: 46px;
  line-height: 1;
  letter-spacing: 0.18em;
  margin: 2px 0 0;
  color: #fff;
  text-shadow: 0 0 24px #3b82f666;
}
.codigo-inline {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.15em;
  font-size: 16px;
  color: #fff;
}
.lista-jogadores {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-jogador {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff10;
  font-weight: 700;
  font-size: 14px;
}
.chip-jogador.desligado {
  opacity: 0.45;
}
.ponto {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 2px #0006;
}
.coroa {
  font-size: 12px;
}
.lobby-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.segmentos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
}
.segmento {
  border: 1px solid #ffffff1f;
  background: #00000040;
  border-radius: 10px;
  padding: 9px 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.segmento small {
  display: block;
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
}
.segmento[aria-checked='true'] {
  border-color: var(--azul);
  background: var(--azul-suave);
  box-shadow: inset 0 0 0 1px var(--azul);
}
.segmento:disabled {
  cursor: default;
  opacity: 1;
}
.segmento:disabled:not([aria-checked='true']) {
  opacity: 0.5;
}

/* Jogo */
.ecra-jogo {
  display: flex;
  flex-direction: column;
}
.barra-jogo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #06140dcc;
  backdrop-filter: blur(6px);
}
.barra-marca {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  text-decoration: none;
  color: var(--text);
  padding-right: 12px;
  margin-right: 2px;
  border-right: 1px solid var(--line);
}
.barra-nome {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.barra-info {
  flex: 1;
  min-width: 0;
}
.barra-linha {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.barra-jogo-dados {
  font-size: 14px;
  color: var(--muted);
}
.barra-jogo-dados::before {
  content: '·';
  margin: 0 6px;
  color: #ffffff40;
}
.barra-jogo-dados .resultado {
  color: var(--text);
  font-weight: 800;
}
.barra-jogo-dados .local::before,
.barra-jogo-dados .data::before {
  content: '·';
  margin: 0 6px;
  color: #ffffff40;
}
.barra-jogo-dados .local:empty,
.barra-jogo-dados .data:empty {
  display: none;
}
.ronda {
  font-family: var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--azul2);
  margin-right: 6px;
}
.competicao {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.barra-sala {
  margin: 0;
  font-family: var(--display);
  letter-spacing: 0.15em;
  color: var(--muted);
}

.ecra-jogo {
  height: 100dvh;
  overflow: hidden;
}
.jogo-grelha {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(250px, 19vw, 320px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    'placar campo'
    'feed campo'
    'feed controlo';
  gap: 12px;
  padding: 12px 16px 14px;
}
.g-campo {
  grid-area: campo;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  background: #0a2617;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
}
#banco-a {
  grid-column: 1;
}
.g-campo .relvado-moldura {
  grid-column: 2;
  /* A coluna do meio tem a proporção do campo: os bancos ficam encostados ao relvado. */
  height: 100%;
  aspect-ratio: 1094 / 724;
  max-width: 100%;
}
#banco-a {
  align-items: flex-end;
}
#banco-b {
  align-items: flex-start;
}
.banco-coluna .banco {
  width: min(100%, 250px);
}
#banco-b {
  grid-column: 3;
}
.g-controlo {
  grid-area: controlo;
  min-height: 0;
}
.g-placar {
  grid-area: placar;
  min-height: 0;
  max-height: 46vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.g-feed {
  grid-area: feed;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.placar-lista,
.g-feed .feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.g-controlo {
  background: var(--panel-forte);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  grid-template-areas:
    'relogio palpite'
    'relogio resposta';
  column-gap: 18px;
  row-gap: 4px;
  align-items: center;
}
.g-controlo .relogio-bloco {
  grid-area: relogio;
}
.g-controlo .palpite {
  grid-area: palpite;
}
.g-controlo .resposta {
  grid-area: resposta;
  min-height: 18px;
}
.relogio-bloco {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.relogio {
  font-family: var(--display);
  font-size: 56px;
  line-height: 1;
  margin: 0;
  min-width: 3.2ch;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 24px #3b82f655;
}
.relogio.urgente {
  color: #fecaca;
  text-shadow: 0 0 24px #ef444466;
  animation: pulsar 1s ease-in-out infinite;
}
.relogio-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.barra-tempo {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #ffffff14;
  margin-top: 14px;
}
.barra-tempo-enchimento {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--azul-escuro), var(--azul2));
}
.marca-pista {
  position: absolute;
  top: -16px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #0b2417;
  border: 1px solid #ffffff1f;
}
.marca-pista.ativa {
  color: #fff;
  background: var(--azul);
  border-color: var(--azul2);
}
.contador {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.relogio-extra {
  position: absolute;
  left: 52px;
  top: -6px;
  font-weight: 800;
  color: var(--azul2);
  opacity: 0;
  pointer-events: none;
}
.relogio-extra.mostrar {
  animation: subir 1.1s ease-out;
}

.palpite {
  position: relative;
  display: flex;
  gap: 8px;
}
.campo-palpite {
  flex: 1;
  min-width: 0;
  font-size: 17px;
}
.btn-enviar {
  padding: 0 16px;
  font-size: 20px;
}
.palpite.bloqueada .campo-palpite {
  border-color: var(--vermelho);
  box-shadow: 0 0 0 3px #ef444433;
}
.palpite.tremer {
  animation: tremer 0.3s;
}
.bloqueio {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -5px;
  height: 3px;
  border-radius: 3px;
  background: var(--vermelho);
  transform-origin: left;
  transform: scaleX(0);
}
.bloqueio.ativo {
  animation: esvaziar var(--bloqueio-ms, 1000ms) linear forwards;
}
.resposta {
  margin: 0;
  min-height: 20px;
  font-weight: 700;
  font-size: 14px;
}
.resposta.certo {
  color: #86efac;
}
.resposta.errado {
  color: #fca5a5;
}
.resposta.info {
  color: #fde68a;
}

/* Relvado */
.relvado-moldura {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.relvado {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
}
.relvado .linhas {
  fill: none;
  stroke: #ffffffc0;
  stroke-width: 3;
}
.relvado .ponto-cal {
  fill: #ffffffc0;
}
.camisola .forma {
  stroke-linejoin: round;
  transition: fill 0.3s;
}
.camisola.escondida .forma {
  stroke: #ffffffa6;
  stroke-width: 3;
  stroke-dasharray: 7 5;
}
.camisola.descoberta .forma {
  stroke-width: 3;
}
.camisola .golo-extra {
  font-family: var(--display);
  fill: #fff;
  paint-order: stroke;
  stroke: #000000c0;
  stroke-linejoin: round;
}
.camisola.revelada .forma {
  fill: #4b5563;
  stroke: #9ca3af;
  stroke-width: 2.5;
}
.camisola .numero {
  font-family: var(--display);
  text-anchor: middle;
  dominant-baseline: central;
}
.camisola.escondida .numero {
  fill: #ffffffd9;
}
.camisola.revelada .numero {
  fill: #e5e7eb;
}
.camisola .rotulo-nome,
.camisola .rotulo-dono,
.camisola .rotulo-pista {
  text-anchor: middle;
  font-family: var(--body);
  paint-order: stroke;
  stroke: #000000c0;
  stroke-linejoin: round;
}
.camisola .rotulo-nome {
  font-weight: 800;
  fill: #fff;
}
.camisola.revelada .rotulo-nome {
  fill: #cbd5e1;
  font-weight: 700;
}
.camisola .rotulo-dono {
  font-weight: 700;
}
.camisola .rotulo-pista {
  font-weight: 800;
  fill: #fff;
}
.camisola .bandeira {
  filter: drop-shadow(0 1px 2px #000a);
}
.camisola .conteudo {
  transform-box: fill-box;
  transform-origin: center;
}
.camisola.conquista .conteudo {
  animation: conquista 0.7s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.anel {
  fill: none;
  stroke-width: 6;
  transform-box: fill-box;
  transform-origin: center;
  animation: anel 0.9s ease-out forwards;
}
.pontos-flutuantes {
  font-family: var(--display);
  text-anchor: middle;
  paint-order: stroke;
  stroke: #000a;
  stroke-width: 5;
  animation: subir-svg 1.2s ease-out forwards;
}
.pista-nova {
  animation: aparecer 0.5s ease-out;
}
.nome-equipa {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  fill: #ffffff2e;
}

/* Bancos e treinadores */
.banco-coluna {
  min-width: 0;
  padding: 14px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.banco-coluna:empty {
  display: none;
}
.banco-coluna .banco-lugares {
  flex-direction: column;
  flex-wrap: nowrap;
}
.banco-coluna .lugar-banco {
  width: 100%;
}
.banco-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.banco-titulo .ponto {
  box-shadow: none;
}
.banco-lugares {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lugar-banco {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 6px;
  border-radius: 10px;
  background: #00000040;
  border: 1px dashed #ffffff33;
  font-size: 13px;
  font-weight: 700;
  min-height: 34px;
}
.lugar-banco svg {
  flex: none;
}
.lugar-banco .minuto {
  color: var(--azul2);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.lugar-banco .quem {
  color: #ffffff80;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lugar-banco.descoberta {
  border-style: solid;
  border-color: #ffffff40;
  background: #ffffff12;
}
.lugar-banco {
  flex-wrap: wrap;
  row-gap: 2px;
}
.lugar-banco .dono {
  font-size: 11px;
  font-weight: 800;
  margin-left: auto;
  white-space: nowrap;
}
.golo-mini {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex: none;
}
.golo-mini b {
  font-size: 10px;
  line-height: 1;
}
.lugar-banco.descoberta .quem {
  color: #fff;
}
.lugar-banco.revelada {
  border-style: solid;
  border-color: #6b7280;
}
.lugar-banco.revelada .quem {
  color: #cbd5e1;
}
.lugar-banco .pos-banco {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #e5e7eb;
  background: #ffffff1a;
  border-radius: 5px;
  padding: 1px 5px;
}
.lugar-banco .bandeira-banco {
  flex: none;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
}
.lugar-banco.escondida .quem:not(:empty) {
  font-weight: 800;
}
.numero-mini {
  fill: #fff;
  font-weight: 800;
  text-anchor: middle;
  font-family: var(--display, sans-serif);
}
.lugar-banco.treinador .minuto {
  color: #fde68a;
}
.lugar-banco.conquista {
  animation: conquista 0.7s cubic-bezier(0.2, 1.6, 0.4, 1);
}

/* Classificação e feed */
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nome-jogador {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed li {
  font-size: 13px;
  color: #d5e0da;
  padding: 6px 8px;
  border-radius: 8px;
  background: #ffffff08;
  animation: entrar 0.35s ease-out;
}
.feed .destaque {
  font-weight: 800;
}
.feed .pontos {
  color: #86efac;
  font-weight: 800;
}
.marcador .marcador-corte {
  display: block;
  font-size: 13px;
  background: #f8717114;
}
.marcador .marcador-corte .sistema {
  color: var(--muted);
}
.marcador .pontos {
  color: #86efac;
  font-weight: 800;
}
.marcador .pontos.negativo,
.feed .pontos.negativo {
  color: #fca5a5;
  font-weight: 800;
}
.passar {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}
.btn-passar {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.9rem;
}
.btn-passar.ativo {
  border-color: #f87171;
  color: #fca5a5;
}
.passar .nota {
  margin: 0;
  font-size: 0.78rem;
}
.feed .sistema {
  color: var(--muted);
}

.tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 8px 0 12px;
}
.tabela th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 4px 6px;
}
.tabela td {
  padding: 7px 6px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}
.tabela th:not(:nth-child(-n + 2)),
.tabela td:not(:nth-child(-n + 2)) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tabela .celula-jogador {
  display: flex;
  align-items: center;
  gap: 8px;
}
.placar-topo .painel-titulo {
  margin-bottom: 2px;
}
.placar-topo .nota:empty {
  display: none;
}
.tabela-placar {
  margin: 0;
  table-layout: fixed;
}
.tabela-placar th:nth-child(1),
.tabela-placar td:nth-child(1) {
  width: 30px;
}
.tabela-placar th:nth-child(3),
.tabela-placar td:nth-child(3) {
  width: 56px;
}
.tabela-placar th:nth-child(4),
.tabela-placar td:nth-child(4) {
  width: 50px;
}
.tabela-placar .celula-jogador {
  min-width: 0;
}
.placar-lista {
  overflow-x: hidden;
}
.tabela-placar th {
  position: sticky;
  top: 0;
  background: var(--panel-forte);
}
.tabela-placar td {
  padding: 5px 6px;
}
.tabela-placar td:first-child {
  color: var(--muted);
  width: 28px;
}
.tabela-placar tr.eu td {
  background: var(--azul-suave);
}
.tabela-placar tr.desligado td {
  opacity: 0.5;
}
.tabela-placar tr.subiu td {
  animation: brilho 0.8s;
}
.tabela-placar .mais {
  color: #86efac;
}
.tabela-placar .total-celula {
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
}
.g-placar .btn {
  width: 100%;
  flex: none;
}

/* Sobreposições: ficha e pódio */
.sobreposicao {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #020a06d9;
  backdrop-filter: blur(4px);
  animation: aparecer 0.25s ease-out;
  overflow-y: auto;
}
.ficha {
  width: min(100%, 520px);
  text-align: center;
  background: linear-gradient(180deg, #0f2a1c, #0a1d13);
  border: 1px solid #3b82f655;
  border-radius: 18px;
  padding: 26px 22px 20px;
  box-shadow: 0 30px 80px #000a, 0 0 0 6px #3b82f614;
}
.ficha-competicao {
  margin: 0;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--azul2);
}
.ficha-titulo {
  margin: 6px 0 0;
  color: var(--muted);
  font-style: italic;
}
.ficha-titulo:empty {
  display: none;
}
.ficha-resultado {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.1;
  margin: 12px 0 14px;
}
.ficha-dados {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}
.ficha-dados dt {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ficha-dados dd {
  margin: 2px 0 0;
  font-weight: 700;
}
.ficha-equipas {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ficha-equipas li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #ffffff0d;
  font-weight: 700;
}
.ficha-equipas .formacao {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--azul2);
}
.ficha-nota {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.ficha-contagem {
  font-family: var(--display);
  font-size: 54px;
  line-height: 1;
  margin: 6px 0 0;
  color: #fff;
  text-shadow: 0 0 30px #3b82f6aa;
}
.ficha-contagem.bater {
  animation: bater 0.5s ease-out;
}

.final {
  text-align: center;
}
.final .btn {
  width: 100%;
}
.podio {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 8px;
  padding: 0;
  margin: 8px 0 4px;
}
.degrau {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.degrau .bloco {
  width: 100%;
  border-radius: 10px 10px 4px 4px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 26px;
  background: linear-gradient(180deg, #ffffff26, #ffffff0d);
  border: 1px solid #ffffff1f;
}
.degrau.p1 .bloco {
  height: 110px;
  background: linear-gradient(180deg, var(--azul), var(--azul-escuro));
  box-shadow: 0 10px 30px #3b82f655;
}
.degrau.p2 .bloco {
  height: 80px;
}
.degrau.p3 .bloco {
  height: 60px;
}
.degrau .quem {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
}
.degrau .pts {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* Diálogo "Como jogar" */
.dialogo {
  width: min(92vw, 520px);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: #0b2016;
  color: var(--text);
  padding: 22px;
  box-shadow: 0 30px 80px #000c;
}
.dialogo::backdrop {
  background: #000a;
}
.regras {
  padding-left: 20px;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #d5e0da;
}
.dialogo .btn {
  width: 100%;
}
kbd {
  font-family: var(--body);
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #ffffff1f;
  border: 1px solid #ffffff2e;
}

/* Avisos */
.aviso-ligacao {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding: 8px 14px;
  border-radius: 999px;
  background: #7f1d1d;
  border: 1px solid #ef4444;
  font-weight: 700;
  font-size: 13px;
}
.toasts {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  padding: 10px 14px;
  border-radius: 12px;
  background: #0b2016f2;
  border: 1px solid #3b82f666;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 30px #0009;
  animation: entrar 0.25s ease-out;
}

/* Computadores com pouca largura: bancos mais estreitos para o relvado não encolher */
@media (min-width: 960px) and (max-width: 1279px) {
  .jogo-grelha {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .g-campo {
    grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  }
  .banco-coluna {
    padding: 12px 8px;
  }
}

/* Portáteis com pouca altura */
@media (min-width: 960px) and (max-height: 780px) {
  .jogo-grelha {
    gap: 10px;
    padding: 10px 14px 12px;
  }
  .relogio {
    font-size: 42px;
  }
  .g-controlo {
    padding: 10px;
    gap: 8px;
  }
  .campo-palpite {
    padding: 10px 12px;
  }
  .barra-jogo {
    padding: 6px 14px;
  }
}

/* Telemóvel e tablet */
@media (max-width: 959px) {
  .ecra-jogo {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .jogo-grelha {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: 'controlo' 'campo' 'placar' 'feed';
    padding: 10px 10px 24px;
    gap: 10px;
  }
  /* No fim da ronda a classificação e o botão sobem para cima do relvado. */
  .jogo-grelha.terminada {
    grid-template-areas: 'controlo' 'placar' 'campo' 'feed';
  }
  .g-campo {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: none;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }
  .relvado-moldura,
  .g-campo .relvado-moldura {
    height: auto;
    aspect-ratio: auto;
    padding: 0;
    background: var(--pitch);
    border: 1px solid #ffffff1a;
    border-radius: 12px;
    overflow: hidden;
  }
  .relvado {
    height: auto;
  }
  .banco-coluna,
  #banco-a,
  #banco-b {
    width: auto;
    padding: 0;
    overflow: visible;
    align-items: stretch;
  }
  .banco-coluna .banco {
    width: auto;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 10px;
  }
  .banco-coluna .banco-lugares {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .banco-coluna .lugar-banco {
    width: auto;
  }
  .g-placar,
  .g-feed,
  .placar-lista,
  .g-feed .feed {
    overflow: visible;
  }
  .g-controlo {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px;
    border-radius: 0 0 var(--radius) var(--radius);
    margin: -10px -10px 0;
    border-top: 0;
    gap: 8px;
  }
  .relogio {
    font-size: 40px;
  }
  .barra-jogo {
    padding: 8px 12px;
  }
  .competicao {
    font-size: 12px;
  }
  .barra-jogo {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .barra-nome {
    font-size: 18px;
  }
  .barra-marca {
    padding-right: 0;
    border-right: 0;
  }
  .barra-sala {
    margin-left: auto;
  }
  /* A informação do jogo passa para uma segunda linha, a toda a largura. */
  .barra-info {
    order: 3;
    flex-basis: 100%;
  }
  .barra-linha {
    white-space: normal;
  }
  .barra-jogo-dados {
    display: block;
    font-size: 12px;
    line-height: 1.35;
  }
  .barra-jogo-dados::before {
    content: none;
  }
  .g-placar {
    max-height: none;
  }
  .ecra-centro {
    justify-content: flex-start;
    padding-top: 36px;
  }
}

@media (max-width: 420px) {
  .codigo-grande {
    font-size: 38px;
  }
  .ficha-dados {
    grid-template-columns: 1fr;
  }
}

/* Animações */
@keyframes conquista {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
@keyframes anel {
  from { transform: scale(0.6); opacity: 0.95; }
  to { transform: scale(2.4); opacity: 0; }
}
@keyframes subir-svg {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-60px); opacity: 0; }
}
@keyframes subir {
  0% { transform: translateY(6px); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-18px); opacity: 0; }
}
@keyframes aparecer {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes entrar {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes tremer {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
@keyframes esvaziar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
@keyframes pulsar {
  50% { opacity: 0.65; }
}
@keyframes bater {
  from { transform: scale(1.4); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes brilho {
  from { background: #3b82f655; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Duelo, espectadores, estatísticas e marcador */
.papel {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  padding: 3px 8px;
  border-radius: 999px;
  background: #ffffff10;
  border-left: 4px solid var(--cor-lado, transparent);
  width: fit-content;
}
.lado {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-left: 6px;
  border: 1px solid #ffffff55;
}
.btn-som {
  min-width: 36px;
}
.painel-subtitulo {
  margin: 4px 0 2px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.placar-stats {
  flex: none;
}
.jogo-grelha.terminada .g-placar {
  max-height: 64vh;
  overflow-y: auto;
}
.jogo-grelha.terminada .placar-lista {
  flex: none;
}
.destaques {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  font-size: 13px;
  display: grid;
  gap: 2px;
}
.tabela-stats {
  margin: 0;
  table-layout: fixed;
  font-size: 13px;
}
.tabela-stats th:not(:first-child),
.tabela-stats td:not(:first-child) {
  width: 40px;
  text-align: right;
}
.tabela-stats td {
  padding: 4px 6px;
}
.tabela-stats .celula-jogador {
  min-width: 0;
}
.tabela-stats tr.eu td {
  background: var(--azul-suave);
}
.marcador {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.marcador li {
  font-size: 13px;
  color: #d5e0da;
  padding: 5px 8px;
  border-radius: 8px;
  background: #ffffff08;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: entrar 0.35s ease-out;
}
.marcador .marcador-topo {
  justify-content: center;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.02em;
  background: #ffffff12;
}
.marcador .minuto {
  width: 42px;
  flex: none;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 700;
}
.marcador .lado {
  margin-left: 0;
}
.marcador .entrada {
  color: var(--muted);
}
.marcador .parcial {
  color: #86efac;
  font-weight: 800;
}
.camisola.outro-lado,
.lugar-banco.outro-lado {
  opacity: 0.4;
  transition: opacity 0.3s;
}

/* Idioma, e o rodapé do início: Ko-fi, GitHub, versão e bugs. */
.campo-idioma {
  padding: 4px 8px;
  border: 1px solid var(--panel-border, #ffffff1a);
  border-radius: 8px;
  background: #0b1a12;
  color: inherit;
  font: inherit;
  font-size: 13px;
}
.idioma-inicio {
  position: absolute;
  top: 14px;
  right: 16px;
}
.menu-idioma {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.linha-inicio {
  justify-content: center;
}
.rodape-inicio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 8px;
  font-size: 13px;
}
.botao-kofi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: #29abe0;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 14px #29abe055;
  transition: transform 0.15s, box-shadow 0.15s;
}
.botao-kofi:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px #29abe088;
}
.ligacao-github,
.ligacao-bug {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  opacity: 0.8;
  text-decoration: none;
}
.ligacao-github:hover,
.ligacao-bug:hover {
  opacity: 1;
  text-decoration: underline;
}
.versao {
  opacity: 0.6;
}
