/* ---- Last One Standing: elimination + final summary ---- */
#lsElimModal, #lsSummary { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1rem; overflow: hidden; opacity: 0; transition: opacity .25s ease; }
#lsElimModal { z-index: 56; background: radial-gradient(ellipse at center, rgba(127,29,29,.55) 0%, rgba(0,0,0,.94) 70%); backdrop-filter: blur(6px); }
#lsSummary   { z-index: 57; background: radial-gradient(ellipse at 50% 20%, rgba(120,80,5,.45) 0%, rgba(0,0,0,.95) 65%); backdrop-filter: blur(8px); overflow-y: auto; align-items: flex-start; }
#lsElimModal.hidden, #lsSummary.hidden, #lsBanner.hidden, #lsOutBar.hidden { display: none; }
#lsElimModal.ls-in, #lsSummary.ls-in { opacity: 1; }
#lsElimModal.ls-out { opacity: 0; }

/* --- elimination card --- */
.ls-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.ls-in .ls-flash { animation: lsFlash .55s ease-out; }
@keyframes lsFlash { 0% { opacity: .85; } 100% { opacity: 0; } }
.ls-embers { position: absolute; inset: 0; pointer-events: none; }
.ls-ember { position: absolute; bottom: -24px; font-size: .9rem; color: #f87171; opacity: 0; animation: lsEmber linear infinite; }
@keyframes lsEmber { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-105vh) translateX(18px) scale(1.2); opacity: 0; } }

.ls-elim-card { position: relative; width: 100%; max-width: 26rem; text-align: center; padding: 1.75rem 1.5rem 1.5rem; border-radius: 1.5rem; background: linear-gradient(180deg, #1f0b0b, #111827 55%); border: 2px solid #b91c1c; box-shadow: 0 0 60px rgba(220,38,38,.45), inset 0 0 40px rgba(0,0,0,.5); }
.ls-in .ls-elim-card { animation: lsCardIn .5s cubic-bezier(.2,1.4,.4,1) both, lsShake .55s .35s ease-in-out; }
@keyframes lsCardIn { 0% { transform: scale(.55) translateY(40px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes lsShake { 0%,100% { transform: translateX(0); } 15% { transform: translate(-10px, 3px); } 35% { transform: translate(9px, -3px); } 55% { transform: translate(-6px, 2px); } 75% { transform: translate(4px, -1px); } }

.ls-elim-skull { font-size: 4.75rem; line-height: 1; filter: drop-shadow(0 0 22px rgba(239,68,68,.8)); }
.ls-in .ls-elim-skull { animation: lsSkullDrop .75s .1s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes lsSkullDrop { 0% { transform: translateY(-160px) rotate(-30deg) scale(1.6); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.ls-elim-title { margin-top: .6rem; font-size: 2.1rem; font-weight: 900; color: #fff; letter-spacing: .04em; text-shadow: 0 0 22px rgba(239,68,68,.8); }
.ls-in .ls-elim-title { animation: lsSlam .5s .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes lsSlam { 0% { transform: scale(2.6); letter-spacing: .5em; opacity: 0; } 100% { transform: none; letter-spacing: .04em; opacity: 1; } }
.ls-elim-place { margin-top: .35rem; color: #fca5a5; font-weight: 800; font-size: 1rem; }
.ls-elim-place b { font-size: 2.4rem; color: #fbbf24; font-variant-numeric: tabular-nums; }
.ls-elim-place span { color: #9ca3af; font-size: .85rem; }
.ls-in .ls-elim-place { animation: lsFade .4s .8s both; }
.ls-elim-facts { margin-top: 1rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.ls-elim-facts div { background: rgba(0,0,0,.4); border: 1px solid #3f1d1d; border-radius: .8rem; padding: .5rem .25rem; }
.ls-elim-facts b { display: block; font-size: 1.35rem; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.ls-elim-facts span { display: block; font-size: .62rem; font-weight: 700; color: #9ca3af; line-height: 1.2; }
.ls-in .ls-elim-facts { animation: lsFade .4s 1s both; }
@keyframes lsFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ls-elim-actions, .ls-sum-actions { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.ls-elim-actions { opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.ls-elim-actions.ready { opacity: 1; pointer-events: auto; transform: none; }
.ls-elim-hint { margin-top: .75rem; font-size: .7rem; font-weight: 700; color: #fca5a5; }
.ls-btn { width: 100%; padding: .85rem 1rem; border-radius: 1rem; font-weight: 900; font-size: .9rem; letter-spacing: .02em; transition: filter .15s, transform .1s; }
.ls-btn:hover { filter: brightness(1.12); } .ls-btn:active { transform: scale(.98); }
.ls-btn-watch { background: linear-gradient(90deg, #f59e0b, #eab308); color: #111827; }
.ls-btn-menu  { background: #1f2937; border: 1px solid #4b5563; color: #e5e7eb; }

/* --- banner for everybody else (non-blocking) --- */
#lsBanner { position: fixed; top: 4.2rem; left: 50%; z-index: 58; display: flex; align-items: center; gap: .7rem; max-width: min(92vw, 30rem); padding: .6rem 1rem; border-radius: 1rem; background: rgba(24,8,8,.96); border: 1px solid #dc2626; box-shadow: 0 0 30px rgba(220,38,38,.5); pointer-events: none; transform: translateX(-50%); }
#lsBanner.ls-in { animation: lsBannerIn 4.2s ease both; }
@keyframes lsBannerIn { 0% { transform: translate(-50%, -30px) scale(.8); opacity: 0; } 8% { transform: translate(-50%, 0) scale(1.05); opacity: 1; } 12% { transform: translate(-50%, 0) scale(1); } 90% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, -20px); opacity: 0; } }
.ls-banner-skull { font-size: 1.8rem; animation: lsWobble .6s .2s ease-in-out 2; }
@keyframes lsWobble { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.ls-banner-title { font-weight: 900; color: #fff; font-size: .9rem; display: flex; align-items: center; gap: .3rem; }
.ls-banner-sub { font-weight: 700; color: #fca5a5; font-size: .7rem; }

/* --- bar while an eliminated player keeps watching --- */
#lsOutBar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .9rem; border-radius: 1rem; background: rgba(69,10,10,.55); border: 1px solid rgba(185,28,28,.7); color: #fecaca; font-size: .78rem; font-weight: 700; }
#lsOutBar b { color: #fbbf24; }
#lsOutBar button { flex-shrink: 0; padding: .35rem .75rem; border-radius: .7rem; background: #1f2937; border: 1px solid #4b5563; color: #e5e7eb; font-weight: 900; font-size: .72rem; }
#lsOutBar button:hover { background: #7f1d1d; border-color: #b91c1c; }

/* --- final summary --- */
.ls-sum-card { position: relative; width: 100%; max-width: 34rem; margin: auto; padding: 1.5rem 1.25rem 1.25rem; text-align: center; border-radius: 1.5rem; background: linear-gradient(180deg, #1c1608, #111827 50%); border: 2px solid #d97706; box-shadow: 0 0 60px rgba(245,158,11,.35); }
.ls-in .ls-sum-card { animation: lsCardIn .5s cubic-bezier(.2,1.2,.4,1) both; }
.ls-sum-kicker { font-size: .7rem; font-weight: 900; letter-spacing: .25em; text-transform: uppercase; color: #fbbf24; }
.ls-sum-title { margin: .35rem 0 1rem; font-size: 1.5rem; line-height: 1.2; font-weight: 900; color: #e5e7eb; }
.ls-title-win { color: #fde047; text-shadow: 0 0 26px rgba(250,204,21,.7); animation: lsSlam .55s cubic-bezier(.2,1.6,.4,1) both; letter-spacing: normal; }
.ls-hide { opacity: 0; transform: translateY(14px) scale(.96); pointer-events: none; }
.ls-row, .ls-pod, .ls-chips, .ls-me { transition: opacity .4s ease, transform .4s cubic-bezier(.2,1.3,.4,1); }

.ls-podium { display: flex; align-items: flex-end; justify-content: center; gap: .5rem; min-height: 11rem; }
.ls-pod { position: relative; flex: 1 1 0; max-width: 9.5rem; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.ls-pod-name { display: flex; align-items: center; justify-content: center; gap: .3rem; max-width: 100%; font-weight: 900; font-size: .8rem; color: #fff; }
.ls-pod-meta { font-size: .62rem; font-weight: 700; color: #9ca3af; margin-bottom: .3rem; }
.ls-pod-bar { width: 100%; display: flex; align-items: flex-start; justify-content: center; padding-top: .3rem; font-size: 1.6rem; border-radius: .8rem .8rem 0 0; border: 1px solid rgba(255,255,255,.15); border-bottom: 0; }
.ls-pod-1 .ls-pod-bar { height: 6.5rem; background: linear-gradient(180deg, #f59e0b, #92400e); box-shadow: 0 0 30px rgba(245,158,11,.55); }
.ls-pod-2 .ls-pod-bar { height: 4.7rem; background: linear-gradient(180deg, #9ca3af, #4b5563); }
.ls-pod-3 .ls-pod-bar { height: 3.5rem; background: linear-gradient(180deg, #b45309, #78350f); }
.ls-pod-1 .ls-pod-name { color: #fde047; font-size: .9rem; }
.ls-crown { font-size: 2rem; line-height: 1; filter: drop-shadow(0 0 14px rgba(250,204,21,.9)); animation: lsCrown 1.6s ease-in-out infinite; }
@keyframes lsCrown { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-6px) rotate(6deg); } }
.ls-pop { animation: lsPodPop .6s cubic-bezier(.2,1.6,.4,1); }
.ls-pod-1.ls-pop { animation: lsPodPop .8s cubic-bezier(.2,1.6,.4,1), lsWinGlow 1.8s .2s ease-out; }
@keyframes lsPodPop { 0% { transform: translateY(40px) scale(.7); } 100% { transform: none; } }
@keyframes lsWinGlow { 0% { filter: brightness(1); } 30% { filter: brightness(1.5) drop-shadow(0 0 28px rgba(250,204,21,.9)); } 100% { filter: brightness(1); } }

.ls-rows { margin-top: .9rem; display: flex; flex-direction: column; gap: .35rem; }
.ls-row { display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem; border-radius: .8rem; background: rgba(17,24,39,.9); border: 1px solid #374151; text-align: left; font-size: .8rem; }
.ls-row.me { border-color: #f59e0b; background: rgba(120,53,15,.35); }
.ls-row-place { width: 1.8rem; font-weight: 900; color: #9ca3af; font-variant-numeric: tabular-nums; }
.ls-row-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: .35rem; font-weight: 800; color: #fff; }
.ls-row-meta { font-size: .65rem; font-weight: 700; color: #9ca3af; text-align: right; }
.ls-chips { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.ls-chip { padding: .3rem .6rem; border-radius: 999px; background: rgba(0,0,0,.4); border: 1px solid #374151; font-size: .68rem; font-weight: 700; color: #d1d5db; }
.ls-chip b { color: #fbbf24; }
.ls-me { margin-top: .8rem; padding: .6rem .8rem; border-radius: 1rem; background: rgba(0,0,0,.45); border: 1px solid #4b5563; font-size: .9rem; font-weight: 800; color: #e5e7eb; }
.ls-me.win { border-color: #f59e0b; color: #fde047; box-shadow: 0 0 24px rgba(245,158,11,.4); }
.ls-coins { color: #fde047; margin-left: .4rem; }
.ls-skip { position: absolute; top: .6rem; right: .75rem; font-size: .65rem; font-weight: 800; color: #6b7280; }
.ls-skip:hover { color: #fbbf24; }

.ls-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.ls-conf { position: absolute; top: -14px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: lsConf linear forwards; }
@keyframes lsConf { 0% { top: -14px; opacity: 1; } 100% { top: 105vh; opacity: .9; transform: rotate(720deg) translateX(40px); } }

@media (max-width: 420px) { .ls-elim-title { font-size: 1.7rem; } .ls-row-meta { display: none; } }
@media (prefers-reduced-motion: reduce) {
  #lsElimModal *, #lsSummary *, #lsBanner, #lsBanner * { animation: none !important; transition: none !important; }
  .ls-hide { opacity: 1; transform: none; pointer-events: auto; } .ls-embers, .ls-confetti, .ls-flash { display: none; }
}
