/* RESULT SCREEN — ported from OneTapRunner v2 mockups
   - black background, centered card, "Tap anywhere to restart" pinned below
   - Game Over card is white; Well Played card is signature yellow
   - Leaderboard rows: outlined pill-shaped rectangles (sharp corners)
   - Current player's row inverted (black fill, white text)
   - Tap-to-restart hint hidden for ~3s, then fades in (anti-spam) */

#sResult{
  background:#000;
  cursor:pointer;
  justify-content:center;
  align-items:center;
  padding:60px 40px;
  gap:80px;
}

.res-card{
  position:relative;
  top:auto;
  left:auto;
  transform:none;
  width:84%;
  max-width:920px;
  margin:0 auto;
  padding:72px 60px;
  border-radius:0;
  background:#FFFFFF;
  font-family:'Inter Tight',system-ui,'Segoe UI',Arial,sans-serif;
  color:#000;
  display:flex;
  flex-direction:column;
  align-items:stretch;
}

.res-card.win{
  background:#EAFF27;
}

.res-card-title{
  text-align:center;
  font-size:120px;
  font-weight:900;
  letter-spacing:-.02em;
  line-height:1.05;
  color:#000;
}

.res-card-sub{
  text-align:center;
  font-size:36px;
  font-weight:600;
  letter-spacing:-.01em;
  margin-top:18px;
  margin-bottom:52px;
  color:#000;
}

.res-rows{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.res-row{
  display:flex;
  align-items:center;
  font-family:'Inter Tight',system-ui,'Segoe UI',Arial,sans-serif;
  font-weight:600;
  font-size:36px;
  padding:28px 36px;
  border:4px solid #000;
  border-radius:0;
  color:#000;
  background:transparent;
}

.res-row .r-rank{
  width:80px;
  flex:0 0 auto;
  font-weight:600;
}

.res-row .r-name{
  flex:1;
  margin-left:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  padding-right:16px;
}

.res-row .r-score{
  flex:0 0 auto;
  font-weight:600;
  font-variant-numeric:tabular-nums;
}

.res-row.me{
  background:#000;
  color:#FFFFFF;
  border-color:#000;
}

.res-tap{
  position:absolute;
  left:50%;
  bottom:220px;
  transform:translateX(-50%);
  color:rgba(255,255,255,0.45);
  font-family:'Inter Tight',system-ui,'Segoe UI',Arial,sans-serif;
  font-size:34px;
  font-weight:600;
  letter-spacing:.4px;
  white-space:nowrap;
  opacity:0;
  visibility:hidden;
  transition:opacity .5s ease;
}

#sResult.is-armed .res-tap{
  visibility:visible;
  opacity:1;
  animation:resTapBlink 1.6s ease-in-out .5s infinite;
}

@keyframes resTapBlink{
  0%,100%{opacity:.45;}
  50%{opacity:1;}
}

/* Cinematic crossfade — staggered children fade up when result screen activates */
#sResult.on .res-card{
  animation:resultIn .55s cubic-bezier(.2,.85,.3,1) both;
  animation-delay:.10s;
}

@keyframes resultIn{
  0%   { opacity:0; transform:translateY(44px); }
  100% { opacity:1; transform:translateY(0); }
}
