/* Fuse League — match presentation: VS screen, replay tag, pause, results, callouts, countdown (broadcast style). */

/* the hand (src/ui/hud.js orbit): the balls in stock orbit the Ballon medallion in exit order, the next one on top */
.action-ball .bpips { display:none; }
.hand-orbit { position:absolute; inset:0; pointer-events:none; }
.on-throw .hand-orbit { display:none; }   /* on the sideline the medallion is the throw-in: no hand */
.hand-ball { --i:0; position:absolute; left:50%; top:50%; width:20px; height:20px; margin:-10px 0 0 -10px; border-radius:50%; filter:drop-shadow(0 2px 2px #000a); transform:rotate(calc(-90deg - var(--i) * 40deg)) translate(58px) rotate(calc(90deg + var(--i) * 40deg)); }
/* counter-clockwise from the top: the left side of the medallion is free */
.hand-ball { transition:transform .24s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.hand-ball svg { display:block; width:100%; height:100%; overflow:visible; }
.hand-ball.next { width:30px; height:30px; margin:-15px 0 0 -15px; filter:drop-shadow(0 0 2px #fff) drop-shadow(0 3px 4px #000a); }
.hand-ball.ghost { border:2px dashed #ffffff66; background:conic-gradient(#ffffffaa calc(var(--fill, 0) * 1turn), #0b1c2bcc 0); border-style:dashed; border-color:#ffffff66; }
.hand-ball.ghost.hidden { display:none; }
.hand-ball.leaving { opacity:0; transform:rotate(-90deg) translate(96px) scale(1.5); }
.reduced-motion .hand-ball { transition:none; }

/* VS screen (src/ui/vs.js): two slanted halves, the line-ups slide in, « VS » slams between them */
.vs { position:fixed; inset:0; z-index:9; display:grid; grid-template-rows:auto 1fr auto; align-items:center; justify-items:center; padding:6em 4em 5em; overflow:hidden; color:#fff6df; pointer-events:none; font-size:calc(10px * var(--ui-scale,1)); background:linear-gradient(115deg,#07121ee6 0 49.7%,#0b1c2be6 50.3% 100%); transition:opacity .32s; }
.vs.hidden { display:none; }
.vs.leaving { opacity:0; }
.vs-stripes { position:absolute; inset:-10%; background:repeating-linear-gradient(115deg,transparent 0 6em,#ffc7430d 6em 6.6em); animation:vs-drift 8s linear infinite; }
@keyframes vs-drift { to { transform:translateX(6.6em); } }
.vs-head { position:relative; animation:fl-in-u .3s cubic-bezier(.2,.8,.2,1) both; }
.vs-tag { display:inline-block; padding:.3em 1.6em .3em 1.2em; background:#ffc743; color:#1d1406; font:900 italic 2.4em var(--num); letter-spacing:.12em; text-transform:uppercase; clip-path:polygon(0 0,100% 0,calc(100% - .5em) 100%,0 100%); }
.vs-body { position:relative; display:flex; align-items:center; gap:3.6em; }
.vs-col { display:flex; flex-direction:column; gap:1em; }
.vs-col h3 { margin:0; padding:.15em 1em; background:var(--team,#ffc743); color:#0b1622; font:900 italic 3em var(--num); text-transform:uppercase; clip-path:polygon(0 0,100% 0,calc(100% - .5em) 100%,0 100%); animation:fl-in-l .3s cubic-bezier(.2,.8,.2,1) both; }
.vs-col.is-right h3 { animation-name:fl-in-r; }
.vs-col ol { list-style:none; margin:0; padding:0; display:grid; gap:.7em; }
.vs-player { display:flex; align-items:center; gap:1.2em; min-width:28em; height:5.8em; padding:0 2em 0 .8em; background:#0b1c2bf2; box-shadow:inset .7em 0 0 var(--kit); clip-path:polygon(0 0,100% 0,calc(100% - 1.2em) 100%,0 100%); animation:fl-in-l .34s cubic-bezier(.2,.8,.2,1) both; animation-delay:calc(var(--i) * 60ms + 80ms); }
.vs-col.is-right .vs-player { animation-name:fl-in-r; box-shadow:inset -.7em 0 0 var(--kit); flex-direction:row-reverse; padding:0 .8em 0 2em; text-align:right; clip-path:polygon(1.2em 0,100% 0,100% 100%,0 100%); }
.vs-player.is-me { background:linear-gradient(90deg,#4a3d16,#0b1c2b); }
.vs-col.is-right .vs-player.is-me { background:linear-gradient(270deg,#4a3d16,#0b1c2b); }
.vs-shirt { display:grid; place-content:center; flex:none; width:4.4em; height:4.4em; background:var(--kit); color:#0b1622; font:900 2em var(--num); clip-path:polygon(20% 0,80% 0,100% 22%,83% 39%,80% 100%,20% 100%,17% 39%,0 22%); }
.vs-player b { font:900 italic 3em var(--num); text-transform:uppercase; white-space:nowrap; }
.vs-mark { flex:none; font:900 italic 13em/1 var(--num); color:#ffc743; text-shadow:0 .05em 0 #6b4a0e,0 .12em .3em #000b; animation:vs-slam .5s .35s cubic-bezier(.3,1.6,.5,1) both; }
.vs-n4 .vs-mark { font-size:6em; } .vs-n4 { gap:1.6em; } .vs-n4 .vs-player { min-width:20em; } .vs-n4 .vs-player b { font-size:2.4em; }
.vs-status { position:relative; margin:0; min-height:1.2em; font:900 italic 2.8em var(--num); letter-spacing:.06em; text-transform:uppercase; color:#a9bfcc; }
@keyframes vs-slam { 0% { transform:scale(2.6) rotate(-8deg); opacity:0; } 60% { opacity:1; } }
.reduced-motion .vs *, .reduced-motion .vs-stripes { animation:none !important; }
.hud.intro .hud-countdown { display:none; }

/* pause: a side panel over the frozen match */
.pause { position:absolute; inset:0; background:linear-gradient(90deg,#07121ee6 0,#07121e80 40%,#07121e00 70%); pointer-events:auto; font-size:calc(10px * var(--ui-scale,1)); }
.pause-panel { position:absolute; left:0; top:0; bottom:0; width:48em; padding:8em 4em 4em; display:flex; flex-direction:column; gap:3em; animation:fl-in-l .22s cubic-bezier(.2,.8,.2,1) both; }
.pause-panel .fl-lt-title { font-size:4.8em; }
.pause-panel .fl-lt-tag { font-size:1.4em; }
.pause-list, .pause-exit { display:flex; flex-direction:column; gap:.8em; }
.pause-exit { margin-top:auto; }
.pause-panel button { min-height:0; height:2.4em; padding:0 1em; border:0; border-radius:0; background:#0b1c2bf2; color:#fff6df; font:900 italic 2.6em var(--num); text-align:left; text-transform:uppercase; clip-path:polygon(0 0,100% 0,calc(100% - .5em) 100%,0 100%); transition:transform .12s, background .12s; }
.pause-panel button:hover, .pause-panel button:focus-visible { outline:none; background:#163049; box-shadow:inset .3em 0 0 #ffc743; transform:translateX(.4em); }
.pause-panel button.cta { background:linear-gradient(100deg,#ffdc64,#ffb72e); color:#2b1d08; }
.pause-panel button.cta:hover, .pause-panel button.cta:focus-visible { box-shadow:inset .3em 0 0 #fff; }
.pause-exit button { font-size:2em; color:#a9bfcc; }

/* results: the player of the match, bottom buttons in the broadcast style */
.result-mvp { display:flex; flex-direction:column; align-items:flex-start; gap:4px; margin:18px 0 0; padding:0 16px 12px; background:#0b1c2bf2; box-shadow:inset 5px 0 0 #ffc743; animation:rewards-arrival .6s .25s cubic-bezier(.16,1,.3,1) both; }
.result-mvp .fl-lt-tag { margin-left:-16px; font-size:13px; }
.result-mvp b { font:900 italic 32px/1 var(--num); text-transform:uppercase; }
.result-mvp small { color:#c4d6ec; font-size:13px; }
.result-mvp.is-me { background:linear-gradient(90deg,#4a3d16,#0b1c2b); }
.results footer .r-btn { flex:1; min-height:52px; border:0; border-radius:0; background:#0b1c2bf2; color:#fff6df; font:800 20px var(--num); text-transform:uppercase; clip-path:polygon(8px 0,100% 0,calc(100% - 8px) 100%,0 100%); }
.results footer .r-btn:hover, .results footer .r-btn:focus-visible { background:#163049; color:#ffc743; outline:none; }
.results footer .cta { border:0; border-radius:0; clip-path:polygon(14px 0,100% 0,100% 100%,0 100%); box-shadow:inset 0 -6px 0 #b8761d; }
.results footer .cta:focus-visible { outline:none; box-shadow:inset 0 -6px 0 #b8761d, inset 0 0 0 3px #fff; }

/* callouts: a TV caption — gold tag, big italic title on a dark bevelled bar (src/ui/announcer.js) */
.callout { top:13%; max-width:none; gap:0; padding:0; background:none; border:0; align-items:center; text-align:center; font-size:calc(10px * var(--ui-scale,1)); }
.callout .callout-tag { padding:.3em 1.6em .3em 1.2em; background:var(--c,#ffc743); color:#1d1406; font:900 1.5em var(--num); line-height:1.2; letter-spacing:.12em; text-transform:uppercase; clip-path:polygon(0 0,100% 0,calc(100% - .6em) 100%,0 100%); }
.callout b { padding:.1em .7em .2em; background:#07121ef0; font:900 italic 4.4em/1 var(--num); text-transform:uppercase; clip-path:polygon(.3em 0,100% 0,calc(100% - .3em) 100%,0 100%); box-shadow:inset 0 -.1em 0 var(--c,#ffc743); }
.callout.p3 b { font-size:6.4em; }
.callout.show b { animation:callout-in .28s cubic-bezier(.3,1.5,.5,1); }
.callout .callout-sub { margin-top:.6em; padding:.3em 1.2em; background:#07121ed9; color:#d7e3ee; font:600 1.4em var(--ui); line-height:1.3; }
@keyframes callout-in { from { transform:scaleX(.6); opacity:0; } }
.reduced-motion .callout.show b { animation:none; }
/* kickoff countdown: a huge gold number that pops on each second */
.hud-countdown { top:20%; font:900 italic calc(180px * var(--ui-scale,1))/1 var(--num); color:#ffc743; text-shadow:0 .05em 0 #6b4a0e,0 .1em .2em #000b; }
.hud-countdown.pop { animation:cd-pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes cd-pop { from { transform:translateX(-50%) scale(2.2); opacity:0; } }
.reduced-motion .hud-countdown.pop { animation:none; }
/* the score bug, bevelled like the menus */
.hud-score { border:0; border-radius:0; background:#0b1c2bf2; clip-path:polygon(0 0,100% 0,calc(100% - 12px) 100%,12px 100%); box-shadow:inset 0 -4px 0 #ffc743; }
.hud-roster:has(.hud-left) { border-radius:0; }
.toast { border-left:0; background:#0b1c2bf2; box-shadow:inset 4px 0 0 #ffc743; font-weight:600; }

/* instant replay tag (top left, red, blinking) */
.replay-tag { position:fixed; left:3.2em; top:calc(9vh + 2em); z-index:8; display:flex; flex-direction:column; align-items:flex-start; gap:.6em; pointer-events:none; font-size:calc(10px * var(--ui-scale,1)); }
.replay-tag.hidden { display:none; }
.replay-tag-label { padding:.2em 1.2em .2em .8em; background:#ff4a2e; color:#fff; font:900 italic 3.6em var(--num); letter-spacing:.14em; clip-path:polygon(0 0,100% 0,calc(100% - .4em) 100%,0 100%); animation:fl-blink 1.2s ease-in-out infinite; }
.replay-tag-label::before { content:'● '; font-size:.6em; vertical-align:.25em; }
.replay-tag small { padding:.3em .8em; background:#07121ed9; color:#d7e3ee; font:600 1.4em var(--ui); }
.replay-bars::before, .replay-bars::after { content:''; position:fixed; left:0; right:0; height:9vh; background:#000; z-index:7; pointer-events:none; animation:bars-in .35s cubic-bezier(.2,.8,.2,1) both; }
.replay-bars::before { top:0; } .replay-bars::after { bottom:0; }
@keyframes bars-in { from { height:0; } }
/* the pause covers the match: the HUD steps back */
body:has(.pause) .hud-personal, body:has(.pause) .hud-actions { opacity:0; transition:opacity .15s; }
.results-rewards { top:24%; bottom:190px; max-height:none; }
.results footer .cta { font:900 italic 32px var(--num); text-transform:uppercase; text-align:left; padding:10px 22px; }
.results footer .r-btn { font-style:italic; font-weight:900; }
@media (max-height:800px) {
  .results-rewards { top:26%; bottom:170px; }
  .result-personal { font-size:22px; margin-bottom:10px; }
  .reward-medal { width:104px; padding:6px 4px 10px; } .reward-medal .game-icon { width:40px; height:40px; } .reward-medal b { font-size:34px; }
  .result-mvp { margin-top:10px; } .result-mvp b { font-size:26px; }
  .result-moment { margin:10px 0 6px; padding:8px 12px; } .result-moment b { font-size:22px; }
  .results footer { bottom:18px; } .results footer .cta { font-size:26px; }
}
.pause { z-index:10; }
.toast { z-index:11; }
/* who everyone is waiting for (online) */
.net-warn { position:absolute; left:50%; top:92px; transform:translateX(-50%); padding:6px 14px; background:#3a1410e6; box-shadow:inset 4px 0 0 #ff6f59; color:#ffd9d2; font:800 15px var(--num); letter-spacing:.04em; text-transform:uppercase; pointer-events:none; }
.net-warn::before { content:'● '; color:#ff6f59; }
.net-warn.hidden { display:none; }
