/* Snake: escolha de modo, classificação e banner de renascer. */

/* Cartões de modo (espelham os cartões do hub). */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 8px; }
.choice {
  --c: var(--mint); --ce: var(--mint-edge);
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 22px; border-radius: 24px; background: #fff; border: 2px solid var(--line);
  box-shadow: 0 6px 0 var(--c); color: var(--ink); text-decoration: none;
}
.choice[data-c="mint"] { --c: var(--mint); --ce: var(--mint-edge); }
.choice[data-c="rose"] { --c: var(--pink); --ce: var(--pink-edge); }
.choice:hover { box-shadow: 0 10px 0 var(--c); color: var(--ink); }
.choice:active { box-shadow: 0 2px 0 var(--c); }
.choice strong { font: 700 20px/1.2 var(--display); letter-spacing: -0.02em; margin-top: 4px; }
.choice .muted { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.choice .icon {
  width: 64px; height: 64px; display: grid; place-items: center; font-size: 32px; margin-bottom: 10px;
  border-radius: 18px; background: var(--c); box-shadow: 0 5px 0 var(--ce);
}
.choice .tag {
  position: absolute; top: 20px; right: 20px; font-size: 12.5px; font-weight: 800;
  padding: 3px 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); border: 0;
}
.choice .tag.online { background: #dcf7ef; color: var(--mint-edge); }
.choice .tag.online::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 6px; vertical-align: 1px; }

.stage-overlay { cursor: pointer; }
.stage-overlay .btn { margin-top: 10px; }
.respawn {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 1;
  padding: 8px 16px; border-radius: 99px; font-weight: 800;
  background: rgba(255, 92, 122, .18); border: 1px solid rgba(255, 92, 122, .5); color: #ffd3dc;
  pointer-events: none; animation: pulse 1s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity: .7; } to { opacity: 1; } }

/* Classificação */
.scores { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scores li {
  display: grid; grid-template-columns: 18px 12px minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; font-size: var(--fs-xs);
}
.scores li.me { background: rgba(255, 255, 255, .06); outline: 1px solid var(--line-strong); }
.scores .rank { color: var(--muted); font-size: var(--fs-3xs); font-weight: 700; }
.scores .dot { width: 12px; height: 12px; border-radius: 50%; }
.scores .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.scores .me .name { font-weight: 800; }
.scores .small { font-size: var(--fs-3xs); }
.scores b { min-width: 2ch; text-align: right; }
.scores .dead { opacity: .45; }

/* Telemóvel: palco de ponta a ponta (o losango isométrico é largo). */
@media (max-width: 600px) {
  .game-layout > .stage-wrap { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
}

/* Comando no ecrã (ecrãs táteis) */
.dpad {
  display: grid; grid-template-columns: repeat(2, 76px); grid-template-rows: repeat(2, 76px); gap: 12px;
  justify-content: center; margin: 18px auto 4px; transform: rotate(0deg);
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.dpad-btn {
  border: 2px solid var(--mint-edge); border-radius: 22px; background: var(--mint); color: #fff;
  font: 800 34px/1 var(--font); box-shadow: 0 6px 0 var(--mint-edge);
  -webkit-tap-highlight-color: transparent; cursor: pointer;
  transition: transform .06s, box-shadow .06s;
}
.dpad-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--mint-edge); }
.dpad-up, .dpad-down { background: #12b08c; }
html:not(.touch) .dpad { display: none; }

/* Ecrã único: o comando fica por cima do palco, no canto inferior esquerdo */
.game-page .game-layout > .dpad {
  grid-area: stage; align-self: end; justify-self: start; margin: 10px; z-index: 1;
  grid-template-columns: repeat(2, 58px); grid-template-rows: repeat(2, 58px); gap: 8px; opacity: .92;
}
.game-page .game-layout > .dpad .dpad-btn { font-size: 26px; border-radius: 18px; }
