/* ================= LAB · SECUENCIA 2: partida cinemática ================= */
#cine-ui { position: fixed; inset: 0; z-index: 38; pointer-events: none; font-family: var(--cond); }

/* ---------- Infiltración ---------- */
.in-title { position: absolute; left: 6vw; top: 22vh; transition: opacity .7s, transform .7s; }
.in-title small { display: block; font-size: 16px; letter-spacing: 10px; color: var(--yellow); font-weight: 700; animation: fadeup .6s .3s both; }
.in-title h1 { font-size: clamp(64px, 11vw, 150px); font-weight: 900; font-style: italic; line-height: .9; letter-spacing: 2px; text-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 0 40px rgba(0, 0, 0, .4); }
.in-title h1 span { display: inline-block; animation: letterin .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes letterin { from { opacity: 0; transform: translateY(40px) scale(1.4); filter: blur(8px); } }
.in-mode { display: inline-flex; align-items: center; gap: 14px; margin-top: 10px; padding: 6px 16px; background: rgba(8, 12, 20, .65); border-left: 4px solid var(--yellow); font-size: 20px; font-weight: 800; letter-spacing: 2px; animation: fadeup .6s 1.2s both; }
.in-mode i { width: 6px; height: 6px; background: var(--yellow); transform: rotate(45deg); }
.in-data { position: absolute; left: 6vw; bottom: 16vh; font-family: 'Courier New', monospace; font-size: 14px; color: #dfe8f2; text-shadow: 0 1px 3px #000; transition: opacity .7s; }
.in-data div { margin-top: 6px; overflow: hidden; white-space: nowrap; width: 0; animation: type 1s steps(40) both; }
.in-data b { color: var(--cyan); margin-right: 10px; }
@keyframes type { to { width: 46ch; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(14px); } }
.in-teams { position: absolute; right: 4vw; bottom: 13vh; display: flex; align-items: flex-start; gap: 22px; transition: opacity .7s; }
.in-teams ul { list-style: none; min-width: 210px; }
.in-teams h4 { font-size: 15px; letter-spacing: 4px; margin-bottom: 6px; animation: fadeup .5s 1s both; }
.in-teams .blue h4 { color: #7fb6ff; } .in-teams .red h4 { color: #ff8a8a; text-align: right; }
.in-teams li { font-size: 17px; font-weight: 700; padding: 4px 10px; margin-bottom: 4px; background: rgba(8, 12, 20, .6); animation: slidein .45s both; }
.in-teams .blue li { border-left: 3px solid #2e8bff; } .in-teams .red li { border-right: 3px solid #ff3b3b; text-align: right; }
.in-teams li.me { color: var(--yellow); }
.in-vs { font-size: 46px; font-weight: 900; font-style: italic; color: rgba(255, 255, 255, .8); margin-top: 60px; animation: fadeup .5s 1.4s both; }
#cine-ui.intro-out .in-title { opacity: 0; transform: translateX(-40px); }
#cine-ui.intro-out .in-data, #cine-ui.intro-out .in-teams { opacity: 0; }

/* ---------- HUD que se arma ---------- */
#hud.hud-intro > * { opacity: 0 !important; }
#hud.hud-build .top-score { animation: hudDrop .6s cubic-bezier(.2, 1.3, .4, 1) .05s both; }
#hud.hud-build .health { animation: hudLeft .55s cubic-bezier(.2, 1, .3, 1) .2s both; }
#hud.hud-build .slots, #hud.hud-build .ammo { animation: hudRight .55s cubic-bezier(.2, 1, .3, 1) .3s both; }
#hud.hud-build .actions { animation: hudRight .55s cubic-bezier(.2, 1, .3, 1) .45s both; }
#hud.hud-build .crosshair { animation: chIn .5s cubic-bezier(.2, 1.4, .4, 1) .55s both; }
#hud.hud-build .chat, #hud.hud-build .killfeed { animation: fadeup .6s .7s both; }
@keyframes hudDrop { from { opacity: 0; transform: translate(-50%, -60px); } }
@keyframes hudLeft { from { opacity: 0; transform: translateX(-80px); } }
@keyframes hudRight { from { opacity: 0; transform: translateX(80px); } }
@keyframes chIn { from { opacity: 0; transform: scale(3); } }
#hud.hud-ending > *:not(.end-banner) { opacity: 0; transition: opacity .5s; }

/* ---------- Medallas ---------- */
#medals { position: absolute; left: 50%; top: 55%; transform: translateX(-50%); display: flex; gap: 14px; pointer-events: none; }
.medal { width: 78px; text-align: center; animation: medalIn .55s cubic-bezier(.2, 1.5, .4, 1) both, medalOut .45s ease-in forwards; position: relative; }
.medal svg { width: 72px; height: 72px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6)); }
.medal::after { content: ''; position: absolute; left: 3px; top: 0; width: 72px; height: 72px; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%); background-size: 250% 100%; -webkit-mask: radial-gradient(circle at 50% 48%, #000 60%, transparent 62%); mask: radial-gradient(circle at 50% 48%, #000 60%, transparent 62%); animation: shineSweep 1s .35s ease-out both; }
.medal span { display: block; margin-top: 2px; font-size: 13px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 2px 3px #000; white-space: nowrap; }
.medal.gold span { color: #ffd54a; } .medal.blue span { color: #8fe0ff; } .medal.purple span { color: #d4a6ff; } .medal.red span { color: #ff8a80; } .medal.green span { color: #8fffb0; }
@keyframes medalIn { from { opacity: 0; transform: scale(2.6); filter: blur(10px); } 60% { opacity: 1; filter: none; } }
@keyframes medalOut { to { opacity: 0; transform: translateY(-30px) scale(.8); } }
@keyframes shineSweep { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---------- Banner VICTORIA / DERROTA ---------- */
.end-banner { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; padding: 26px 0; pointer-events: none; animation: bannerIn .7s cubic-bezier(.2, 1, .3, 1) both; }
.end-banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(5, 8, 14, .82) 25%, rgba(5, 8, 14, .82) 75%, transparent); }
.end-banner i { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--c), transparent); box-shadow: 0 0 18px var(--c); }
.end-banner.win { --c: #ffc93c; } .end-banner.lose { --c: #ff4b4b; }
.end-banner b { position: relative; display: block; font-size: clamp(70px, 11vw, 140px); font-weight: 900; font-style: italic; line-height: .9; color: var(--c); text-shadow: 0 6px 0 rgba(0, 0, 0, .4), 0 0 50px color-mix(in srgb, var(--c) 45%, transparent); animation: wordIn .9s cubic-bezier(.2, 1, .3, 1) both; }
.end-banner span { position: relative; display: block; margin-top: 6px; font-size: 20px; letter-spacing: 6px; font-weight: 800; color: #e8ecf4; animation: fadeup .6s .35s both; }
@keyframes bannerIn { from { opacity: 0; clip-path: inset(48% 0 48% 0); } }
@keyframes wordIn { from { letter-spacing: 40px; opacity: 0; filter: blur(12px); } }

/* ---------- FINAL KILLCAM ---------- */
#cine-ui.kc-on { background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%); }
.kc-slam { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; animation: kcSlam 1.1s cubic-bezier(.2, 1.2, .4, 1) both; }
.kc-slam span { display: block; font-size: 30px; letter-spacing: 16px; font-weight: 800; color: #ff5a5a; }
.kc-slam b { display: block; font-size: clamp(70px, 10vw, 130px); font-weight: 900; font-style: italic; line-height: .85; text-shadow: 0 6px 0 rgba(0, 0, 0, .5); }
@keyframes kcSlam { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); filter: blur(10px); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.92); } }
#cine-ui.kc-on .kc-tag, #cine-ui.kc-on .kc-names, #cine-ui.kc-on .kc-weapon { opacity: 0; transition: opacity .5s; }
#cine-ui.kc-play .kc-tag, #cine-ui.kc-play .kc-names, #cine-ui.kc-play .kc-weapon { opacity: 1; }
.kc-tag { position: absolute; left: 4vw; top: calc(8vh + 22px); display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; letter-spacing: 3px; background: #c8232a; padding: 4px 14px; }
.kc-tag i { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
.kc-names { position: absolute; left: 4vw; top: calc(8vh + 64px); display: flex; align-items: baseline; gap: 12px; font-size: 22px; font-weight: 800; text-shadow: 0 2px 4px #000; }
.kc-names b { color: var(--yellow); font-size: 26px; } .kc-names span { font-size: 14px; letter-spacing: 3px; color: #ff6b6b; } .kc-names em { font-style: normal; color: #fff; }
.kc-weapon { position: absolute; right: 4vw; bottom: calc(8vh + 24px); display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 4px #000; }
.kc-weapon img { height: 40px; }
.kc-slow { position: absolute; left: 50%; bottom: calc(8vh + 30px); transform: translateX(-50%); font-size: 18px; font-weight: 900; letter-spacing: 8px; color: #fff; opacity: 0; transition: opacity .3s; text-shadow: 0 0 12px rgba(255, 255, 255, .6); }
#cine-ui.kc-slowmo .kc-slow { opacity: .9; }
#cine-ui.kc-slowmo { box-shadow: inset 0 0 160px rgba(120, 0, 0, .45); }
.kc-grain { position: absolute; inset: 0; opacity: .08; background-image: repeating-radial-gradient(circle at 17% 32%, #fff 0 1px, transparent 1px 3px), repeating-radial-gradient(circle at 73% 61%, #fff 0 1px, transparent 1px 4px); animation: grain .25s steps(3) infinite; mix-blend-mode: overlay; }
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-6px, 4px); } 66% { transform: translate(5px, -3px); } }
#cine-ui.kc-hit::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, .55); animation: hitflash .45s ease-out forwards; }
@keyframes hitflash { to { opacity: 0; } }

/* ---------- Podio ---------- */
#podium-ui { position: fixed; inset: 0; z-index: 30; font-family: var(--cond); cursor: pointer; transition: filter .6s, opacity .6s; }
#podium-ui.pd-dim { filter: blur(3px); opacity: .25; pointer-events: none; }
.pd-title { position: absolute; left: 50%; top: 6vh; transform: translateX(-50%); text-align: center; animation: fadeup .8s .3s both; pointer-events: none; }
.pd-title small { display: block; font-size: 16px; letter-spacing: 8px; font-weight: 700; color: #cfd6e2; }
.pd-title b { display: block; font-size: clamp(56px, 8vw, 100px); font-weight: 900; font-style: italic; line-height: .95; text-shadow: 0 5px 0 rgba(0, 0, 0, .4); animation: wordIn 1s .3s cubic-bezier(.2, 1, .3, 1) both; }
.pd-title.win b { color: var(--yellow); text-shadow: 0 5px 0 rgba(0, 0, 0, .4), 0 0 40px rgba(255, 201, 60, .45); }
.pd-title.lose b { color: #ff5a5a; }
.pd-plate { position: absolute; transform: translate(-50%, 0); text-align: center; min-width: 170px; animation: plateIn .6s cubic-bezier(.2, 1.3, .4, 1) both; pointer-events: none; }
@keyframes plateIn { from { opacity: 0; transform: translate(-50%, 30px); } }
.pd-place { font-size: 40px; font-weight: 900; font-style: italic; line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.pd-plate.p0 .pd-place { color: #ffd23a; font-size: 50px; } .pd-plate.p1 .pd-place { color: #dfe8f2; } .pd-plate.p2 .pd-place { color: #e8a066; }
.pd-mvp { display: inline-block; margin: 2px 0; padding: 1px 10px; font-size: 14px; font-weight: 900; letter-spacing: 3px; color: #1b1405; background: linear-gradient(90deg, #ffe58a, #e0a21c); }
.pd-name { font-size: 20px; font-weight: 800; background: rgba(8, 12, 20, .75); padding: 3px 12px; margin-top: 4px; }
.pd-name.me { color: var(--yellow); box-shadow: inset 0 -2px 0 var(--yellow); }
.pd-name.blue { border-left: 3px solid #2e8bff; } .pd-name.red { border-left: 3px solid #ff3b3b; }
.pd-stats { display: flex; justify-content: center; gap: 12px; margin-top: 4px; font-size: 11px; letter-spacing: 1px; color: #aab6c8; font-weight: 700; }
.pd-stats b { display: block; font-size: 18px; color: #fff; }
.pd-hint { position: absolute; left: 50%; bottom: 4vh; transform: translateX(-50%); font-size: 14px; letter-spacing: 4px; font-weight: 700; color: rgba(255, 255, 255, .65); animation: fadeup .5s 2.5s both, blink 2s 3s infinite; pointer-events: none; }

/* ---------- Informe post-partida ---------- */
#aar { position: fixed; inset: 0; z-index: 36; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(8, 12, 22, .55), rgba(4, 6, 12, .88)); animation: fadeup .5s both; font-family: var(--cond); }
.aar-in { width: min(1060px, 94vw); }
.aar-head { text-align: center; margin-bottom: 18px; }
.aar-head small { display: block; font-size: 15px; letter-spacing: 8px; color: var(--cyan); font-weight: 700; }
.aar-head b { display: block; font-size: 64px; font-weight: 900; font-style: italic; line-height: 1; }
.aar-head b.win { color: var(--yellow); } .aar-head b.lose { color: #ff5a5a; }
.aar-head span { font-size: 16px; letter-spacing: 3px; color: #cfd6e2; font-weight: 700; }
.aar-cols { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 16px; }
.aar-col { background: linear-gradient(180deg, rgba(30, 38, 56, .85), rgba(18, 23, 34, .9)); border: 1px solid rgba(255, 255, 255, .08); padding: 14px 18px; animation: fadeup .6s both; }
.aar-col:nth-child(2) { animation-delay: .1s; } .aar-col:nth-child(3) { animation-delay: .2s; }
.aar-col h4 { font-size: 14px; letter-spacing: 4px; color: var(--muted); font-weight: 800; margin-bottom: 10px; }
.aar-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 17px; font-weight: 700; animation: fadeup .4s both; }
.aar-row span { color: #cfd6e2; } .aar-row b { font-size: 20px; font-variant-numeric: tabular-nums; }
.aar-prog { text-align: center; position: relative; }
.aar-ring { position: relative; width: 150px; height: 150px; margin: 0 auto 6px; }
.aar-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.aar-ring circle { fill: none; stroke-width: 9; }
.aar-ring .bg { stroke: rgba(255, 255, 255, .1); }
.aar-ring .fg { stroke: var(--cyan); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(47, 198, 216, .7)); }
.aar-ring.burst { animation: ringBurst .7s ease-out; }
@keyframes ringBurst { 0% { transform: scale(1); filter: brightness(2); } 40% { transform: scale(1.12); } 100% { transform: scale(1); filter: none; } }
.aar-lv { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.aar-lv small { font-size: 13px; letter-spacing: 4px; color: var(--muted); font-weight: 700; }
.aar-lv b { font-size: 54px; font-weight: 900; line-height: 1; }
.aar-xp { font-size: 15px; font-weight: 700; color: #cfd6e2; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.aar-line { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; padding: 4px 0; animation: fadeup .4s both; }
.aar-line b { color: var(--cyan); }
.aar-line.total { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 4px; padding-top: 8px; font-size: 19px; }
.aar-line.total b { color: var(--yellow); }
.aar-levelup { position: absolute; left: 50%; top: 52px; transform: translateX(-50%) scale(.5); opacity: 0; font-size: 34px; font-weight: 900; font-style: italic; color: var(--yellow); text-shadow: 0 3px 0 rgba(0, 0, 0, .5), 0 0 24px rgba(255, 201, 60, .6); transition: all .5s cubic-bezier(.2, 1.5, .4, 1); pointer-events: none; white-space: nowrap; }
.aar-levelup small { display: block; font-size: 14px; letter-spacing: 3px; font-style: normal; color: #fff; }
.aar-levelup.on { opacity: 1; transform: translateX(-50%) scale(1); }
.aar-coins { display: flex; align-items: center; gap: 12px; }
.aar-coins i { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2b0, #e9a91f 55%, #9a6a0a); box-shadow: inset 0 0 0 3px #c48a14, 0 0 16px rgba(255, 201, 60, .4); }
.aar-coins b { font-size: 46px; font-weight: 900; color: var(--yellow); font-variant-numeric: tabular-nums; }
.aar-coins small { font-size: 14px; letter-spacing: 3px; color: var(--muted); font-weight: 700; }
.aar-bal { font-size: 14px; letter-spacing: 2px; color: var(--muted); font-weight: 700; margin-top: 4px; } .aar-bal b { color: #fff; }
.aar-medals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.aar-medal { text-align: center; animation: medalIn .5s cubic-bezier(.2, 1.5, .4, 1) both; }
.aar-medal .mi svg { width: 48px; height: 48px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .5)); }
.aar-medal span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.aar-medal b { font-size: 13px; color: var(--yellow); }
.aar-none { font-family: var(--body); font-size: 13px; color: var(--muted); }
.aar-btns { display: flex; justify-content: center; gap: 14px; margin-top: 18px; opacity: 0; transform: translateY(10px); transition: all .5s; pointer-events: none; }
#aar.done .aar-btns { opacity: 1; transform: none; pointer-events: auto; }
.aar-btns .btn { font-size: 24px; padding: 10px 44px; }
@media (max-width: 900px) { .aar-cols { grid-template-columns: 1fr; } .aar-head b { font-size: 44px; } }
/* medallas debajo de la mira; el texto ELIMINATED y los avisos pequeños más abajo */
.killbanner { top: 74% !important; }
.toast-hud { top: 81% !important; }
/* sello de subida de nivel en la esquina del panel de progresión */
.aar-levelup { left: auto !important; right: -14px; top: -16px !important; font-size: 24px !important; padding: 2px 10px; border: 2px solid var(--yellow); background: rgba(40, 30, 6, .85); transform: rotate(8deg) scale(.4) !important; }
.aar-levelup.on { transform: rotate(8deg) scale(1) !important; }
.aar-levelup small { font-size: 11px !important; }
