/* ─────────────────────────────────────────────────────────────────────────────
   FIN DE LA PARTIDA: victoria y derrota (js/ui/screens/screens-end.js)
   Una hoja por zona, como js/ui/screens/. Ver "Estilos (CSS)" en AGENTS.md.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── VICTORY SCREEN ────────────────────────────────────────────────────────── */
.screen--victory {
  background: linear-gradient(160deg, var(--yellow) 0%, var(--yellow-dark) 100%);
  align-items: center;
  justify-content: center;
  gap: var(--sp-xl);
  padding: var(--sp-xl) var(--sp-lg);
  text-align: center;
}

.victory-title {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--white);
  text-shadow: 3px 3px 0 var(--grey), 6px 6px 0 rgba(0,0,0,.2);
  line-height: 1.6;
  animation: victory-pop 400ms cubic-bezier(.36,2,.4,1) both;
}
@keyframes victory-pop {
  from { transform: scale(.4); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

/* ── DEFEAT SCREEN ─────────────────────────────────────────────────────────── */
.screen--defeat {
  background: linear-gradient(160deg, var(--grey-dark) 0%, var(--black) 100%);
  align-items: center;
  justify-content: center;
  gap: var(--sp-xl);
  padding: var(--sp-xl) var(--sp-lg);
  text-align: center;
}

.defeat-title {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--red-light);
  line-height: 1.6;
  text-shadow: 2px 2px 0 var(--red-dark);
}

.defeat-msg { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,.6); }
.btn--on-dark { background: rgba(255,255,255,.15); color: var(--white); border-color: rgba(255,255,255,.5); }

/* Puntuación final de una run puntuable (victoria / derrota) */
.run-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 220px;
  padding: var(--sp-md);
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  color: var(--white);
}
.run-score__label {
  font-family: var(--font-pixel);
  font-size: 9px;
  opacity: .8;
}
.run-score__value {
  font-family: var(--font-pixel);
  font-size: 22px;
  text-shadow: 2px 2px 0 rgba(0,0,0,.4);
}
.run-score__detail {
  font-family: var(--font-body);
  font-size: 12px;
  opacity: .7;
}
.run-score__record {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--yellow);
}

/* Victoria con el fondo de FINAL_SCREEN (la imagen va en línea) */
.screen--victory-img { background-size: cover; background-position: center; }
