/* Cash Shop effect name colours, v3 (2026-11-21: v2's effects stretched with long names, broke when a
   name wrapped and got cut off; see the v3 block at the end). v2 2026-11-17: owner said v1 "look bad".
   Class "fx" from nameClass() (web/src/dom.js); ids in public/name-colours.js FX_COLOURS.
   Text = solid colour + glow; effects = two pseudo-elements BEHIND the text (isolation + z-index:-1)
   with soft edges. Mostly transform/opacity; Void's orbit animates a registered angle (tiny repaint).
   Where a name box clips (header, leaderboards) overflow-clip-margin lets the effect breathe while
   ellipsis still works. Rename this file (-v3…) when it changes. Light tweaks: public/light-v6.css. */
@property --fx-a{syntax:'<angle>';inherits:false;initial-value:0deg}
.nametag.fx{--fx-spark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cdefs%3E%3CradialGradient id='h'%3E%3Cstop offset='0' stop-color='%23fff3c0' stop-opacity='.9'/%3E%3Cstop offset='.35' stop-color='%23ffc94d' stop-opacity='.35'/%3E%3Cstop offset='1' stop-color='%23ffb000' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='10' cy='10' r='10' fill='url(%23h)'/%3E%3Cpath d='M10 1.5C10.6 7.6 12.4 9.4 18.5 10 12.4 10.6 10.6 12.4 10 18.5 9.4 12.4 7.6 10.6 1.5 10 7.6 9.4 9.4 7.6 10 1.5Z' fill='%23fffbe8'/%3E%3C/svg%3E");--fx-dot:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Ccircle cx='5' cy='5' r='5' fill='%23ffe7a0' fill-opacity='.35'/%3E%3Ccircle cx='5' cy='5' r='1.6' fill='%23fff8de'/%3E%3C/svg%3E");position:relative;isolation:isolate;color:var(--print-colour);text-shadow:var(--fx-glow)}
.nametag.fx::before,.nametag.fx::after{content:"";position:absolute;z-index:-1;pointer-events:none;background-repeat:no-repeat}
.lbx-row .who>.nametag.fx,.lbx-row .who>:has(>.nametag.fx),.actions [data-account] .nametag.fx{overflow:clip;overflow-clip-margin:.7em}

/* ✨ Stardust: warm gold name in a soft haze, glowing four-point stars twinkling around it. */
.nametag.stardust{--print-colour:#ffeaa8;--name-light:#8a5a00;--fx-glow:0 0 2px rgba(255,236,170,.9),0 0 8px rgba(255,196,64,.75),0 0 18px rgba(255,170,30,.35)}
.nametag.stardust::before,.nametag.stardust::after{inset:-.6em -.75em}
.nametag.stardust::before{background-image:var(--fx-spark),var(--fx-spark),var(--fx-dot),var(--fx-dot),radial-gradient(45% 40% at 50% 50%,rgba(255,200,80,.26),transparent 75%);
 background-size:.95em .95em,.6em .6em,.32em .32em,.26em .26em,100% 100%;background-position:4% 14%,97% 62%,60% 96%,30% 4%,center;animation:fx-twinkle 2.8s ease-in-out infinite}
.nametag.stardust::after{background-image:var(--fx-spark),var(--fx-spark),var(--fx-dot),var(--fx-dot);
 background-size:.75em .75em,.5em .5em,.3em .3em,.24em .24em;background-position:90% 6%,14% 92%,78% 98%,2% 58%;animation:fx-twinkle 2.8s ease-in-out -1.4s infinite}
@keyframes fx-twinkle{0%,100%{opacity:.1;transform:scale(.94) rotate(-2deg)}45%{opacity:1;transform:scale(1.02) rotate(1deg)}}

/* 🔥 Inferno: soft layered flames licking up behind the name, embers drifting up out of them. */
.nametag.inferno{--print-colour:#fff0c2;--name-light:#a83200;--fx-glow:0 1px 1px rgba(90,15,0,.9),0 0 6px rgba(255,150,20,.85),0 -2px 14px rgba(255,80,0,.55)}
.nametag.inferno::before{left:-.35em;right:-.35em;bottom:-.25em;height:2.05em;transform-origin:50% 100%;
 -webkit-mask:linear-gradient(0deg,transparent,#000 22%),linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent);-webkit-mask-composite:source-in;
 mask:linear-gradient(0deg,transparent,#000 22%),linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent);mask-composite:intersect;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cdefs%3E%3Cfilter id='f' x='-10%25' y='-10%25' width='120%25' height='120%25'%3E%3CfeGaussianBlur stdDeviation='1.1'/%3E%3C/filter%3E%3ClinearGradient id='a' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='%23ff4d00' stop-opacity='.85'/%3E%3Cstop offset='.62' stop-color='%23ff6a00' stop-opacity='.7'/%3E%3Cstop offset='1' stop-color='%23ff2a00' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='%23ffe680' stop-opacity='.95'/%3E%3Cstop offset='.6' stop-color='%23ffa31a' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%23ff7a00' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg filter='url(%23f)'%3E%3Cpath fill='url(%23a)' d='M-2 40C-2 30 3 20 8 8C11 18 18 26 18 40ZM12 40C12 30 20 14 25 2C28 12 36 20 36 40ZM30 40C30 30 38 22 43 10C46 20 54 28 54 40ZM48 40C48 30 57 15 62 3C65 13 72 21 72 40ZM66 40C66 30 74 20 79 8C82 18 90 26 90 40ZM84 40C84 30 91 26 96 14C99 24 104 32 104 40Z'/%3E%3Cpath fill='url(%23b)' d='M3 40C3 30 7 32 12 20C15 30 21 38 21 40ZM21 40C21 30 26 27 31 15C34 25 40 33 40 40ZM40 40C40 30 45 34 50 22C53 32 58 40 58 40ZM58 40C58 30 63 26 68 14C71 24 77 32 77 40ZM77 40C77 30 82 33 87 21C90 31 96 39 96 40Z'/%3E%3C/g%3E%3C/svg%3E"),radial-gradient(55% 40% at 50% 100%,rgba(255,80,0,.5),transparent 80%);background-size:100% 100%;
 animation:fx-flame .8s ease-in-out infinite alternate}
.nametag.inferno::after{left:-.1em;right:-.1em;top:-.85em;bottom:0;
 background-image:var(--fx-dot),var(--fx-dot),var(--fx-dot),var(--fx-dot),var(--fx-dot);filter:hue-rotate(-18deg) saturate(1.6);
 background-size:.34em .34em,.26em .26em,.3em .3em,.22em .22em,.26em .26em;background-position:16% 88%,44% 72%,70% 92%,90% 62%,30% 40%;
 animation:fx-embers 1.8s linear infinite}
@keyframes fx-flame{0%{transform:scaleY(.86) skewX(-3deg);opacity:.85}50%{transform:scaleY(1.06) skewX(2deg);opacity:1}100%{transform:scaleY(.95) skewX(-1deg);opacity:.92}}
@keyframes fx-embers{0%{transform:translate(0,.35em);opacity:0}20%{opacity:1}100%{transform:translate(.12em,-.6em);opacity:0}}

/* 📺 Glitch: the name's colour split jumps around; thin RGB slices tear out past both ends. */
.nametag.glitch{--print-colour:#f4f6ff;--name-light:#1b1b2e;--fx-glow:-1.4px 0 rgba(255,42,109,.9),1.4px 0 rgba(5,217,232,.9);animation:fx-split 3s steps(1) infinite}
.nametag.glitch::before{inset:-.35em -.5em;background-image:radial-gradient(50% 55% at 50% 50%,rgba(5,217,232,.16),rgba(255,42,109,.08) 55%,transparent 75%)}
.nametag.glitch::after{inset:-.15em -.55em;opacity:0;
 background-image:linear-gradient(rgba(5,217,232,.85),rgba(5,217,232,.85)),linear-gradient(rgba(255,42,109,.85),rgba(255,42,109,.85)),linear-gradient(rgba(255,255,255,.7),rgba(255,255,255,.7)),linear-gradient(rgba(5,217,232,.6),rgba(5,217,232,.6));
 background-size:42% .12em,36% .1em,22% .08em,28% .1em;background-position:0 30%,100% 68%,62% 12%,24% 90%;animation:fx-tear 3s steps(1) infinite}
@keyframes fx-split{0%,12%,60%,100%{text-shadow:var(--fx-glow)}6%{text-shadow:-3px 1px rgba(255,42,109,.95),3px -1px rgba(5,217,232,.95)}8%{text-shadow:2px 0 rgba(255,42,109,.95),-2px 0 rgba(5,217,232,.95)}10%{text-shadow:-1px -1px rgba(255,42,109,.9),4px 1px rgba(5,217,232,.9)}55%{text-shadow:-4px 0 rgba(255,42,109,.95),4px 0 rgba(5,217,232,.95)}57%{text-shadow:1px 1px rgba(255,42,109,.9),-1px -1px rgba(5,217,232,.9)}}
@keyframes fx-tear{0%,12%,60%,100%{opacity:0;transform:none}6%{opacity:1;transform:translateX(-.25em)}8%{opacity:1;transform:translateX(.3em) scaleY(-1)}10%{opacity:.8;transform:translateX(-.1em)}55%{opacity:1;transform:translateX(.2em)}57%{opacity:.9;transform:translateX(-.3em) scaleY(-1)}}

/* ⚡ Thunder: an electric halo that flickers as a forked lightning arc snaps over (then under) the name. */
.nametag.thunder{--print-colour:#effaff;--name-light:#0a4f8a;--fx-glow:0 0 2px #fff,0 0 7px rgba(90,200,255,.95),0 0 16px rgba(40,140,255,.6)}
.nametag.thunder::before{inset:-.5em -.65em;background-image:radial-gradient(48% 46% at 50% 50%,rgba(80,180,255,.42),rgba(40,120,255,.12) 55%,transparent 75%);animation:fx-flash 3.2s linear infinite}
.nametag.thunder::after{inset:-.7em -.45em;opacity:0;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cdefs%3E%3Cfilter id='g' x='-20%25' y='-50%25' width='140%25' height='200%25'%3E%3CfeGaussianBlur stdDeviation='1.4'/%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' stroke-linejoin='round' stroke-linecap='round'%3E%3Cg stroke='%2338b6ff' stroke-width='3.2' opacity='.85' filter='url(%23g)'%3E%3Cpolyline points='2.0,21.0 8.9,16.0 15.7,14.8 22.6,10.8 29.4,9.9 36.3,8.3 43.1,3.6 50.0,2.9 56.9,8.5 63.7,5.9 70.6,7.6 77.4,14.8 84.3,14.3 91.1,19.8 98.0,21.0'/%3E%3Cpolyline points='29.4,9.9 33.4,4.9 31.4,0.9'/%3E%3Cpolyline points='70.6,7.6 67.6,1.6 71.6,-2.4'/%3E%3C/g%3E%3Cg stroke='%23e9fbff' stroke-width='1.1'%3E%3Cpolyline points='2.0,21.0 8.9,16.0 15.7,14.8 22.6,10.8 29.4,9.9 36.3,8.3 43.1,3.6 50.0,2.9 56.9,8.5 63.7,5.9 70.6,7.6 77.4,14.8 84.3,14.3 91.1,19.8 98.0,21.0'/%3E%3Cpolyline points='29.4,9.9 33.4,4.9 31.4,0.9'/%3E%3Cpolyline points='70.6,7.6 67.6,1.6 71.6,-2.4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");background-size:100% 100%;animation:fx-bolt 3.2s steps(1) infinite}
@keyframes fx-flash{0%,15%,64%,100%{opacity:.35;transform:scale(1)}6%{opacity:1;transform:scale(1.06)}8%{opacity:.4}10%{opacity:.95;transform:scale(1.04)}61%{opacity:.9;transform:scale(1.05)}}
@keyframes fx-bolt{0%,13%,64%,100%{opacity:0;transform:none}6%{opacity:1;transform:none}8%{opacity:0}10%{opacity:1;transform:scale(-1,-1)}12%{opacity:.5;transform:scale(-1,-1)}61%{opacity:1;transform:scaleX(-1)}63%{opacity:.45;transform:scaleX(-1)}}

/* 🌀 Void: a bright comet orbits an elliptical ring around the name over a pulsing purple nebula. */
.nametag.void{--print-colour:#f3eaff;--name-light:#4b1a8f;--fx-glow:0 0 2px rgba(255,255,255,.8),0 0 8px rgba(180,110,255,.9),0 0 18px rgba(110,40,220,.6)}
.nametag.void::before{inset:-.32em -.55em;border-radius:50%;
 background:conic-gradient(from var(--fx-a),transparent 0 45%,rgba(170,100,255,.3) 62%,rgba(220,170,255,.95) 82%,#fff 86%,transparent 88%),conic-gradient(from calc(var(--fx-a) + 180deg),transparent 0 70%,rgba(255,120,230,.7) 86%,transparent 88%),linear-gradient(rgba(150,90,255,.4),rgba(150,90,255,.4));
 -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3.5px),#000 calc(100% - 3px),#000 calc(100% - .5px),transparent);
 mask:radial-gradient(farthest-side,transparent calc(100% - 3.5px),#000 calc(100% - 3px),#000 calc(100% - .5px),transparent);
 filter:drop-shadow(0 0 4px rgba(200,130,255,.95));animation:fx-orbit 2.6s linear infinite}
.nametag.void::after{inset:-.45em -.6em;background-image:radial-gradient(50% 50% at 50% 50%,rgba(120,50,235,.5),rgba(50,10,110,.3) 50%,transparent 74%);animation:fx-pulse 3s ease-in-out infinite}
@keyframes fx-orbit{to{--fx-a:360deg}}
@keyframes fx-pulse{0%,100%{transform:scale(.94);opacity:.8}50%{transform:scale(1.06);opacity:1}}

/* Stop the effects while a game is open, for reduce motion and on weak devices (a still frame stays). */
.playing .nametag.fx,.playing .nametag.fx::before,.playing .nametag.fx::after,[data-motion=reduce] .nametag.fx,[data-motion=reduce] .nametag.fx::before,[data-motion=reduce] .nametag.fx::after,
:root[data-lowpower] .nametag.fx,:root[data-lowpower] .nametag.fx::before,:root[data-lowpower] .nametag.fx::after{animation:none}
.playing .nametag.thunder::after,[data-motion=reduce] .nametag.thunder::after,:root[data-lowpower] .nametag.thunder::after{opacity:.75}
.playing .nametag.void::before,[data-motion=reduce] .nametag.void::before,:root[data-lowpower] .nametag.void::before{--fx-a:200deg}
@media (prefers-reduced-motion:reduce){.nametag.fx,.nametag.fx::before,.nametag.fx::after{animation:none}.nametag.thunder::after{opacity:.75}}

/* ---- v3 (2026-11-21, owner: "the animated cash shop names look weird and don't scale properly and cut off").
   - One box per name: never wraps, so the effects can't split across two line pieces; long names
     ellipsize where their row clips them (rules above) instead of breaking the effect.
   - Effects keep their own proportions instead of stretching with the name: flames repeat along the
     name, the lightning bolt stays its natural size (centred), and Void's ring is a capsule that hugs
     any length of name. */
.nametag.fx{display:inline-block;max-width:100%;white-space:nowrap}
.nametag.inferno::before{background-size:4.2em 100%;background-repeat:repeat-x;background-position:center bottom}
.nametag.thunder::after{background-size:min(100%,6.5em) 100%;background-position:center}
.nametag.void::before{inset:-.3em -.5em;border-radius:999px;padding:2px;
 -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
 mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.nametag.void::after{border-radius:999px}
