/* Ajustes partilhados de navegação, avisos e altura das páginas. */

/* O rodapé permanece no fundo do ecrã sem tapar conteúdo ou ficar fixo. */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
body > .foot { margin-top: auto; }

/* Regressar à lista de jogos: mesmo desenho dos links .back internos. */
.games-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .7;
  transition: opacity .2s;
}
.games-back:hover { opacity: 1; }
.games-back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Um só contador de notificações, partilhado entre menu e ícone. */
.burger { position: relative; }
.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex: 0 0 auto;
  box-sizing: border-box;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e2273f;
  color: #fff;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 0 0 2px #000;
}
.notification-badge[hidden] { display: none; }
.menu .notification-badge { margin-left: 9px; }
.burger > .notification-badge {
  position: absolute;
  top: 0;
  right: -5px;
  margin: 0;
  pointer-events: none;
}

/* Navegação de topo v14: ícones de sessão e notificações, menu sobreposto. */
.top { position: sticky; z-index: 50; overflow: visible; }
.top-in { position: relative; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-shrink: 0; }
.top-icon {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 42px; padding: 7px; flex: 0 0 auto;
  color: #fff; text-decoration: none; background: transparent; border-radius: 9px;
  transition: color .18s ease, background .18s ease;
}
.top-icon:hover, .top-icon:focus-visible { color: var(--icon, #b0c7fb); background: rgba(120,150,255,.12); }
.top-icon svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top-actions .burger { margin: 0 -8px 0 0; flex: 0 0 44px; }
.top-notifications[hidden] { display: none !important; }
.top-notifications .notification-badge {
  position: absolute; top: 0; right: -3px; margin: 0;
  min-width: 18px; height: 18px; padding: 0 4px; pointer-events: none;
  box-shadow: 0 0 0 2px #000;
}
/* Alinhado à direita com o botão de menu, abrindo sobre a página, sem a empurrar. */
.top > .menu {
  position: absolute; top: 100%;
  right: max(16px, calc(50vw - 584px)); left: auto;
  width: min(380px, calc(50vw - 16px));
  max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 14px 14px;
  margin: 0; border: 1px solid var(--sep, rgba(255,255,255,.12));
  border-top: 1px solid var(--sep, rgba(255,255,255,.12));
  border-radius: 0 0 12px 12px; background: #000;
  box-shadow: 0 14px 32px rgba(0,0,0,.48);
  z-index: 55;
}
.top > .menu a { padding: 12px 0; font-size: clamp(.60rem, 1.65vw, .78rem); letter-spacing: .075em; overflow-wrap: anywhere; }
.top > .menu .sub a { padding: 9px 0; font-size: clamp(.58rem, 1.55vw, .73rem); }
.top > .menu .sub-toggle { width: 30px; height: 42px; margin-right: -6px; flex-shrink: 0; }
.top > .menu .sub { padding-left: 8px; }
@media (max-width: 420px) {
  .top-actions { gap: 1px; }
  .top-icon { width: 35px; }
  .top > .menu { padding-left: 10px; padding-right: 10px; }
  .top > .menu a { letter-spacing: .035em; }
}
@media (prefers-reduced-motion: reduce) {
  .top-icon { transition: none; }
}
