/* Combat effects rendered inside the arena. */

.tactical .fighter.acting-pose .sprite {animation:none}
.tactical:has(.skill-callout)::before {
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse at 50% 62%,#24295229 21%,#13102491 100%);
  animation:skill-reveal .25s ease-out both;
}

.field-fx[data-effect] {
  --fx-color:#8de5ff; --fx-core:#efffff;
  width:clamp(55px,12vw,136px); animation:none;
}
.field-fx[data-effect]::before,.field-fx[data-effect]::after {content:"";position:absolute;inset:0}
.field-fx[data-effect] i {
  position:absolute;z-index:2;top:50%;left:50%;width:9px;height:4px;border-radius:50%;
  background:var(--fx-core);box-shadow:0 0 9px var(--fx-color);
  transform:rotate(var(--ray)) translateX(0);
  animation:effect-sparks calc(var(--fx-time) - 125ms) ease-out var(--delay) both;
}
.field-fx[data-effect] b {position:absolute;display:block}
@keyframes effect-sparks {
  0% {opacity:0;transform:rotate(var(--ray)) translateX(6px) scale(.45)}
  28% {opacity:1}
  100% {opacity:0;transform:rotate(var(--ray)) translateX(var(--distance)) scale(.5)}
}
@keyframes effect-inward {
  0% {opacity:0;transform:rotate(var(--ray)) translateX(var(--distance)) scale(.35)}
  22% {opacity:1}
  75% {opacity:.95}
  100% {opacity:0;transform:rotate(var(--ray)) translateX(0) scale(.6)}
}
@keyframes effect-aura {
  0% {opacity:0;scale:.28}
  30% {opacity:1;scale:.86}
  70% {opacity:.88;scale:1.13}
  100% {opacity:0;scale:1.28}
}
.fx-stage-electric-gather,.fx-stage-electric-recoil,.fx-stage-electric-shock {--fx-color:#36dbff!important}
.fx-stage-electric-gather::before,.fx-stage-electric-recoil::before,.fx-stage-electric-shock::before {
  background:radial-gradient(circle,#eeffffa8 0%,#37cfff50 24%,transparent 68%);
  border:2px dashed #91e9ff;border-radius:50%;box-shadow:0 0 15px #58d2ff;
  animation:effect-aura var(--fx-time) ease-out both;
}
.fx-stage-electric-gather::after,.fx-stage-electric-shock::after {
  inset:8%!important;
  background:conic-gradient(from 13deg,transparent 2%,#62dcff 10%,#eaffff 14%,transparent 24%,#71caff 45%,transparent 57%,#e4faff 82%,transparent 91%);
  clip-path:polygon(47% 0,53% 37%,97% 13%,67% 48%,100% 66%,60% 64%,62% 100%,46% 72%,6% 87%,36% 53%,4% 27%,45% 40%);
  animation:current-cage var(--fx-time) ease-out both;
}
.fx-stage-electric-gather i,.fx-stage-regen-form i,.fx-stage-regen-absorb i,.fx-stage-gravity-well i {
  animation-name:effect-inward!important;
}
@keyframes current-cage {
  0% {opacity:0;rotate:-27deg;scale:.5}
  32% {opacity:.88}
  70% {opacity:.8}
  100% {opacity:.2;rotate:37deg;scale:1.12}
}

.field-fx:is(.fx-stage-electric-line,.fx-stage-crimson-beam,.fx-stage-gravity-lob,.fx-stage-vacuum-blades,[data-effect^="shot-"]) {
  width:var(--line-length);height:24px;aspect-ratio:auto;border-radius:0;
  transform:translateY(-50%) rotate(var(--line-angle));transform-origin:left center;
}
.fx-stage-electric-line {filter:drop-shadow(0 0 8px #3acbff);animation:line-unfurl var(--fx-time) linear both!important}
.fx-stage-electric-line b {
  inset:0;background:linear-gradient(#38aeff,#efffff 49%,#47cfff);
  clip-path:polygon(0 54%,9% 38%,15% 61%,23% 29%,30% 58%,40% 33%,49% 53%,59% 24%,66% 62%,75% 41%,83% 60%,93% 39%,100% 49%,94% 52%,83% 70%,75% 53%,66% 76%,59% 38%,49% 67%,40% 47%,30% 71%,23% 43%,15% 76%,9% 53%);
  animation:arc-flow 220ms alternate infinite ease-in-out;
}
.fx-stage-electric-line b + b {opacity:.66;scale:1 -.75;animation-delay:-100ms}
@keyframes line-unfurl {from{clip-path:inset(-100% 99% -100% -5%)} 32%,80%{clip-path:inset(-100% -3% -100% -5%);opacity:1}to{opacity:.25}}
@keyframes arc-flow {from{translate:0 -3px;scale:1 .85}to{translate:0 3px;scale:1 1.15}}

.fx-stage-regen-form,.fx-stage-regen-absorb,.fx-stage-regen-breath {--fx-color:#6cff96!important;--fx-core:#dfffd4!important;}
.fx-stage-regen-form::before,.fx-stage-regen-absorb::before,.fx-stage-regen-breath::before {
  border-radius:50%;border:2px solid #baffae;
  background:radial-gradient(ellipse at 40% 62%,#7eff8a23 36%,#44ff9966 73%,#edffe28a 90%);
  box-shadow:0 0 22px #40fc92ac,inset 0 0 20px #7dffab;
  animation:regen-grow var(--fx-time) ease-out both;
}
.fx-stage-regen-form::after,.fx-stage-regen-absorb::after {
  inset:17% -5%!important;border:2px dashed #d4ffbb;border-radius:50%;
  box-shadow:inset 0 0 11px #47ffac;animation:regen-ring var(--fx-time) ease-out both;
}
.fx-stage-regen-absorb::before {animation:regen-absorb var(--fx-time) ease-in-out both}
.fx-stage-regen-absorb::after {animation:regen-absorb var(--fx-time) ease-out both}
.fx-stage-regen-breath::before {opacity:.4}
@keyframes regen-grow {0%{opacity:0;scale:.24}30%{opacity:.95;scale:.87}78%{opacity:1;scale:1.1}100%{opacity:.75;scale:1.03}}
@keyframes regen-ring {0%{opacity:0;transform:rotate(-45deg) scale(.2,.35)}60%{opacity:1;transform:rotate(13deg) scale(1.03,.65)}100%{opacity:.35;transform:rotate(35deg) scale(1.18,.74)}}
@keyframes regen-absorb {0%{opacity:.15;scale:.28}38%,51%{opacity:1;scale:1.14}88%{opacity:.85;scale:.47}100%{opacity:.15;scale:.08}}

.fx-stage-radio-signal::after {
  inset:14% 6% auto auto!important;width:42%;aspect-ratio:1;border:2px solid #88f8ff;border-radius:50%;
  box-shadow:0 0 11px #303bc6;animation:effect-aura var(--fx-time) ease-out both;
}
.field-fx.fx-stage-orbit-beacon{width:clamp(42px,9vw,105px);height:360px;aspect-ratio:auto;transform:translate(-50%,-100%);border-radius:0;}
.fx-stage-orbit-beacon::before{
  background:linear-gradient(90deg,#6d8bff32,#c4f5ff8c 42%,#edffffc9 51%,#6689ff32);
  clip-path:polygon(45% 0,55% 0,98% 100%,2% 100%);box-shadow:inset 0 0 24px #736bff;
  transform-origin:top;animation:beacon-down var(--fx-time) ease-in-out both;
}
.fx-stage-orbit-beacon b {
  bottom:-13.5%;width:100%;height:27%;border:2px solid #e0fffe;border-radius:50%;
  background:repeating-radial-gradient(ellipse,#7a8fff3b 0 7px,#b0fbff60 8px 9px,transparent 10px 14px);
  animation:beacon-floor var(--fx-time) linear both;
}
@keyframes beacon-down {0%{opacity:0;scale:.3 .05}24%,77%{opacity:.93;scale:1 1}100%{opacity:.4}}
@keyframes beacon-floor {0%,16%{opacity:0;scale:.35 .12}33%,85%{opacity:1;scale:1.12 .48}100%{opacity:.5;scale:1 .4}}
.field-fx.fx-stage-orbit-ship{
  width:clamp(60px,11vw,128px);border-radius:0;z-index:2;
  transform:translate(-50%,-84%);transform-origin:0 0;
  animation:ship-drop var(--fx-time) cubic-bezier(.65,.03,.94,.65) both;
}
.fx-stage-orbit-ship::before{
  inset:-72% 22% 28%!important;background:linear-gradient(0deg,#fff4ce,#91f7ff8c,transparent);
  clip-path:polygon(33% 0,64% 0,100% 100%,0 100%);
}
.fx-stage-orbit-ship i{
  top:19%!important;left:0!important;width:100%!important;height:65%!important;
  border-radius:0!important;box-shadow:none!important;transform:none!important;animation:none!important;
  background:linear-gradient(163deg,#f6fbff 13%,#9aaadb 38%,#3a456b 60%,#222b45 73%,#f5a56f 83%)!important;
  clip-path:polygon(50% 0,63% 29%,93% 62%,100% 82%,70% 77%,55% 100%,45% 100%,30% 77%,0 82%,7% 62%,37% 29%);
}
.fx-stage-orbit-ship b {
  inset:30% 38% 36%;z-index:3;background:linear-gradient(#142e62,#53ffdf 52%,#eefaff);
  clip-path:polygon(50% 0,100% 65%,50% 100%,0 65%);
}
@keyframes ship-drop {0%{opacity:0;translate:0 -275px;scale:.6}17%{opacity:1}100%{opacity:1;translate:0 0;scale:1.1}}
.fx-stage-orbit-blast,.fx-stage-quake-shards {--fx-color:#ff9d50!important;--fx-core:#fff2b1!important}
.fx-stage-orbit-blast::before,.fx-stage-quake-shards::before,.fx-stage-orbit-aftermath::before {
  background:radial-gradient(circle,#fff7c4 0%,#ffcf63 26%,#ee6b5460 55%,transparent 70%);
  clip-path:polygon(50% 0,59% 22%,82% 7%,80% 31%,98% 43%,82% 55%,94% 74%,65% 76%,60% 100%,46% 81%,24% 97%,29% 75%,1% 70%,18% 54%,2% 31%,25% 29%,28% 6%,42% 29%);
  animation:effect-aura var(--fx-time) ease-out both;
}
.fx-stage-orbit-blast::after,.fx-stage-quake-shards::after {
  border:4px solid #ffc98a;border-radius:50%;scale:1 .45;
  box-shadow:0 0 16px #ffc174;animation:shockwave var(--fx-time) ease-out both;
}
@keyframes shockwave {0%{scale:.18 .08;opacity:.95}100%{scale:1.8 .78;opacity:0}}
.fx-stage-quake-shards i {width:11px!important;height:13px!important;background:#d8a77c!important;clip-path:polygon(50% 0,100% 34%,78% 90%,0 100%,11% 34%)}

.fx-stage-gravity-well,.fx-stage-gravity-collapse,.fx-stage-gravity-spill {--fx-color:#c673ff!important;--fx-core:#f4c9ff!important}
.fx-stage-gravity-well::before,.fx-stage-gravity-collapse::before,.fx-stage-gravity-spill::before {
  border-radius:50%;border:2px solid #e2a3ff;
  background:radial-gradient(circle,#15132b 0 24%,#4f2b82 30%,#ae56eb 37%,#ec98e768 57%,transparent 73%);
  box-shadow:0 0 18px #a960ffbb;animation:effect-aura var(--fx-time) ease-out both;
}
.fx-stage-gravity-collapse::before {animation:gravity-implode var(--fx-time) ease-in-out both}
.fx-stage-gravity-collapse::after {
  border-radius:50%;border:3px dotted #dd95ff;filter:drop-shadow(0 0 8px #ba78fa);animation:gravity-implode var(--fx-time) ease-in-out reverse both;
}
@keyframes gravity-implode {0%{opacity:.8;scale:1.25;rotate:-32deg}50%{opacity:1;scale:.45}68%{opacity:1;scale:.16}81%{opacity:1;scale:1.05}100%{opacity:0;scale:1.34;rotate:95deg}}
.fx-stage-gravity-lob b {
  top:0;width:30px;height:30px;border-radius:50%;background:radial-gradient(circle,#191841 17%,#9657ff 40%,#f8c3ff 61%,transparent 68%);
  filter:drop-shadow(0 0 10px #c66cff);animation:gravity-flight var(--fx-time) ease-in-out both;
}
@keyframes gravity-flight {0%{left:0;translate:-50% 0}45%{translate:-50% -49px;scale:1.2}100%{left:100%;translate:-50% 0;scale:1}}

.fx-stage-vacuum-coil,.fx-stage-vacuum-wake,.fx-stage-vacuum-slash,.fx-stage-constellation-cut {--fx-color:#59ffd6!important;--fx-core:#dbffef!important}
.fx-stage-vacuum-coil::before,.fx-stage-vacuum-wake::before {
  border:3px solid transparent;border-radius:50%;border-right-color:#b3fff2;border-bottom-color:#68ebd5;
  filter:drop-shadow(0 0 7px #45ffcf);animation:wind-coil var(--fx-time) ease-out both;
}
@keyframes wind-coil {0%{opacity:0;scale:.22;rotate:-165deg}36%{opacity:1}100%{opacity:.38;scale:1.15;rotate:65deg}}
.fx-stage-vacuum-blades b {
  top:-18px;width:36px;height:55px;border-radius:50%;border-right:5px solid #d5fff9;box-shadow:5px 0 9px -2px #59f3cd;
  animation:projectile-flight var(--fx-time) linear both;
}
.fx-stage-vacuum-blades b:nth-child(2) {top:-35px;scale:.67;animation-delay:45ms}
.fx-stage-vacuum-blades b:nth-child(3) {top:3px;scale:.72;animation-delay:82ms}
.fx-stage-vacuum-slash::before,.fx-stage-constellation-cut::before,.fx-stage-predator-cross::before {
  border-radius:0;background:linear-gradient(145deg,transparent 43%,var(--fx-color) 46%,var(--fx-core) 50%,transparent 57%);
  transform:rotate(var(--cut-angle,0deg));filter:drop-shadow(0 0 8px var(--fx-color));animation:effect-aura var(--fx-time) ease-out both;
}
.fx-stage-constellation-cut::after,.fx-stage-predator-cross::after{
  background:linear-gradient(35deg,transparent 43%,var(--fx-color) 47%,var(--fx-core) 49%,transparent 53%);
  animation:effect-aura var(--fx-time) ease-out 40ms both;
}
.fx-stage-predator-cross,.fx-stage-beam-lens,.fx-stage-crimson-burn,.fx-stage-beam-embers {--fx-color:#ff4b91!important;--fx-core:#ffe1ef!important}
.fx-stage-predator-cross {--cut-angle:22deg}
.fx-stage-beam-lens::before,.fx-stage-crimson-burn::before,.fx-stage-beam-embers::before {
  border:3px double #ffaad1;border-radius:50%;background:radial-gradient(circle,#ffe6f6c9,#ff44a277 21%,transparent 55%);
  box-shadow:0 0 22px #ff359e;animation:effect-aura var(--fx-time) ease-out both;
}
.fx-stage-crimson-beam b {
  inset:7px 0;border-radius:45%;background:linear-gradient(0deg,#f13981,#fff2d7 49%,#ff96c4);
  box-shadow:0 0 18px #ff378b;animation:line-unfurl var(--fx-time) ease-out both;
}
.fx-stage-crimson-beam::before {
  inset:11px 0!important;background:#ff7abc;box-shadow:0 0 17px #ee78d8;
  animation:line-unfurl var(--fx-time) ease-out both;
}

.field-fx[data-effect^="shot-"] b {
  top:8px;width:19px;height:8px;border-radius:50%;background:var(--fx-core);
  box-shadow:0 0 8px var(--fx-color),-14px 0 10px 2px var(--fx-color);
  animation:projectile-flight var(--fx-time) ease-in both;
}
@keyframes projectile-flight {from{left:0;translate:-50% 0}to{left:100%;translate:-50% 0}}
.fx-stage-shot-gun,.fx-stage-muzzle-gun {--fx-color:#ffc469!important;--fx-core:#fff4ca!important}
.fx-stage-shot-rocket,.fx-stage-muzzle-rocket {--fx-color:#ff8b52!important;--fx-core:#fff2b9!important}
.field-fx.fx-stage-shot-rocket b {height:12px;width:27px;top:5px;border-radius:3px 55% 55% 3px;background:linear-gradient(0deg,#ba4f55,#e3af9e 50%,#f7e4bf 61%,#6e4c65)}
.fx-stage-shot-wand,.fx-stage-muzzle-wand {--fx-color:#a57fff!important;--fx-core:#f1d9ff!important}
.fx-stage-shot-glove,.fx-stage-muzzle-glove {--fx-color:#5effcf!important;--fx-core:#e1fff1!important}
.field-fx:is(.fx-stage-shot-wand,.fx-stage-shot-glove) b {width:16px;height:16px;top:2px}
.field-fx[data-effect^="muzzle-"]::before,.fx-stage-projectile-cue::before{
  inset:27%!important;background:radial-gradient(circle,var(--fx-core),var(--fx-color) 33%,transparent 67%);
  animation:effect-aura var(--fx-time) ease-out both;
}

@media (prefers-reduced-motion:reduce) {
  .field-fx[data-effect],.field-fx[data-effect]::before,.field-fx[data-effect]::after,.field-fx[data-effect] b {animation:none!important}
  .field-fx:is(.fx-stage-vacuum-blades,.fx-stage-gravity-lob) b {left:60%}
}

