/* Cinematic attack: gathering charge → discharge → impact → falling embers.
   All effects are finite, pointer-transparent, and removed by playback cleanup. */
.attack-cinema{position:absolute;inset:0;pointer-events:none;--electric:#80cfff;--electric-soft:#488eff;--electric-haze:#4a9aff77;--charge-duration:1500ms;--impact-delay:155ms}
.attack-cinema.side-1{--electric:#c2b5ff;--electric-soft:#9479f4;--electric-haze:#9b79ff77}
.attack-vignette{position:absolute;inset:0;background:radial-gradient(ellipse 320px 260px at var(--focus-x) var(--focus-y),transparent 5%,#02061028 60%,#01040b70 130%);animation:attack-exposure var(--charge-duration) ease-out both}
.striking .attack-vignette{animation:attack-release 1050ms ease-out both}
.attack-lightning{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:4;color:var(--electric)}
.attack-lightning path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.charge-filament{stroke:#d7f3ff;stroke-width:.8;stroke-dasharray:1;stroke-dashoffset:1;filter:drop-shadow(0 0 3px var(--electric));opacity:0;animation:charge-filament var(--charge-duration) ease-in both;animation-delay:calc(var(--filament)*18ms)}
.charge-bloom,.discharge-bloom{position:absolute;z-index:4;width:130px;height:130px;transform:translate(-50%,-50%);background:radial-gradient(circle,#fff 0%,#e9f7ffbb 2%,var(--electric) 4%,var(--electric-haze) 14%,transparent 65%);mix-blend-mode:screen;animation:charge-bloom var(--charge-duration) cubic-bezier(.4,0,.85,1) both}
.charge-bloom:after,.discharge-bloom:after{content:'';position:absolute;top:49%;left:-20%;width:140%;height:2%;background:linear-gradient(90deg,transparent,var(--electric-haze),#fff,var(--electric-haze),transparent);filter:blur(.6px)}
.discharge-bloom{animation:source-release var(--strike-duration) ease-out both}
.charge-motes,.impact-sparks{position:absolute;z-index:5;width:0;height:0}
.charge-motes i,.impact-sparks i{position:absolute;width:2px;height:2px;border-radius:50%;background:#e8f8ff;box-shadow:0 0 5px var(--electric);animation:gather-particle var(--particle-time) var(--particle-delay) cubic-bezier(.5,0,.85,1) both}
.lightning-atmosphere{stroke:var(--electric-soft);stroke-width:26;filter:blur(15px);opacity:0;animation:bolt-atmosphere var(--strike-duration) ease-out both}
.lightning-glow{stroke:var(--electric);stroke-width:11;filter:blur(5px);opacity:0;animation:bolt-envelope var(--strike-duration) ease-out both}
.lightning-plasma{stroke:var(--electric);stroke-width:4;filter:drop-shadow(0 0 2px var(--electric));stroke-dasharray:1;animation:bolt-travel var(--strike-duration) cubic-bezier(.1,.7,.2,1) both}
.lightning-core{stroke:#f8fdff;stroke-width:1.6;stroke-dasharray:1;animation:bolt-travel var(--strike-duration) cubic-bezier(.1,.7,.2,1) both}
.lightning-forks{stroke:var(--electric);stroke-width:.85;filter:drop-shadow(0 0 2px var(--electric))}
.lightning-forks path{stroke-dasharray:1;animation:fork-travel var(--strike-duration) ease-out both;animation-delay:calc(var(--fork)*9ms)}
.lightning-impact{position:absolute;width:0;height:0;z-index:5;isolation:isolate;pointer-events:none}
.lightning-impact i{display:block;position:absolute;transform:translate(-50%,-50%);animation-delay:var(--impact-delay);animation-fill-mode:both;animation-timing-function:ease-out;pointer-events:none}
.impact-haze{width:300px;height:260px;background:radial-gradient(ellipse,var(--electric-haze),transparent 68%);mix-blend-mode:screen;filter:blur(9px);animation-name:impact-haze;animation-duration:950ms}
.impact-flare{width:340px;height:8px;background:linear-gradient(90deg,transparent,var(--electric-haze) 25%,#e0f5ff 47%,#fff 50%,#e0f5ff 53%,var(--electric-haze) 75%,transparent);filter:blur(1px);mix-blend-mode:screen;animation-name:impact-flare;animation-duration:600ms}
.impact-wave{width:85px;height:85px;border-radius:50%;border:1px solid #e4f6ff;box-shadow:0 0 12px var(--electric),inset 0 0 12px var(--electric-haze);animation-name:impact-wave;animation-duration:620ms}
.impact-core{width:130px;height:130px;background:radial-gradient(circle,#fff 0 4%,#f2fafff0 8%,var(--electric) 17%,var(--electric-haze) 28%,transparent 65%);mix-blend-mode:screen;animation-name:impact-core;animation-duration:420ms}
.impact-sparks i{width:7px;height:1.4px;border-radius:1px;transform-origin:left center;animation-name:scatter-spark;animation-delay:calc(var(--impact-delay) + var(--particle-delay));animation-timing-function:cubic-bezier(.15,.65,.3,1)}
#move-effects .move-number.damage,#move-effects .move-number.saved{z-index:7}
.unit.action-hit{animation-delay:var(--hit-delay,115ms)}
@keyframes attack-exposure{0%{opacity:0}60%,100%{opacity:1}}
@keyframes attack-release{0%{opacity:1}40%{opacity:.75}100%{opacity:0}}
@keyframes charge-bloom{0%{opacity:0;transform:translate(-50%,-50%) scale(.18)}40%{opacity:.35;transform:translate(-50%,-50%) scale(.45)}78%{opacity:.75;transform:translate(-50%,-50%) scale(.78)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes charge-filament{0%,30%{opacity:0;stroke-dashoffset:1}75%{opacity:.6;stroke-dashoffset:0}100%{opacity:.85;stroke-dashoffset:-.1}}
@keyframes gather-particle{0%{opacity:0;transform:translate(var(--particle-x),var(--particle-y)) scale(.4)}25%{opacity:.65}85%{opacity:.8}100%{opacity:0;transform:translate(0,0) scale(.1)}}
@keyframes source-release{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}15%{opacity:1;transform:translate(-50%,-50%) scale(1.35)}100%{opacity:0;transform:translate(-50%,-50%) scale(.4)}}
@keyframes bolt-travel{0%{stroke-dashoffset:1;opacity:0}5%{opacity:1}28%,37%{stroke-dashoffset:0;opacity:1}75%{stroke-dashoffset:0;opacity:.2}100%{stroke-dashoffset:0;opacity:0}}
@keyframes bolt-envelope{0%{opacity:0}16%{opacity:.5}32%{opacity:.85}100%{opacity:0}}
@keyframes bolt-atmosphere{0%{opacity:0}32%{opacity:.38}100%{opacity:0}}
@keyframes fork-travel{0%,10%{stroke-dashoffset:1;opacity:0}32%{stroke-dashoffset:0;opacity:.8}100%{stroke-dashoffset:0;opacity:0}}
@keyframes impact-core{0%{opacity:0;transform:translate(-50%,-50%) scale(.18)}9%{opacity:1;transform:translate(-50%,-50%) scale(1)}35%{opacity:.65}100%{opacity:0;transform:translate(-50%,-50%) scale(.7)}}
@keyframes impact-haze{0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}15%{opacity:.85}100%{opacity:0;transform:translate(-50%,-50%) scale(1.2)}}
@keyframes impact-flare{0%{opacity:0;transform:translate(-50%,-50%) scaleX(.15)}8%{opacity:1;transform:translate(-50%,-50%) scaleX(1)}100%{opacity:0;transform:translate(-50%,-50%) scaleX(.4)}}
@keyframes impact-wave{0%{opacity:.8;transform:translate(-50%,-50%) scale(.2) rotateX(40deg)}100%{opacity:0;transform:translate(-50%,-50%) scale(2.2) rotateX(40deg)}}
@keyframes scatter-spark{0%{opacity:0;transform:translate(0,0) rotate(var(--particle-angle)) scaleX(.2)}8%{opacity:1}55%{opacity:.7}100%{opacity:0;transform:translate(var(--particle-x),calc(var(--particle-y) + 25px)) rotate(var(--particle-angle)) scaleX(.15)}}
.dust-card{position:absolute;z-index:1;pointer-events:none;isolation:isolate}
.dust-card:after{content:'';position:absolute;inset:0;border:1px solid #d3eaff;border-radius:4px;box-shadow:0 0 20px #b7e6ff88;opacity:0;animation:dust-border .25s var(--dust-start) ease-out backwards}
.dust-fragment{position:absolute;display:block;background-repeat:no-repeat;animation:dust-fragment var(--dust-duration) var(--dust-delay) ease-out both;transform-origin:center}
.dust-grain{position:absolute;display:block;background:#e4e8ed;border-radius:50%;box-shadow:0 0 3px #c5e4ff;animation:dust-grain var(--dust-duration) var(--dust-delay) ease-out both}
@keyframes dust-border{from{opacity:.8}to{opacity:0}}
@keyframes dust-fragment{0%{opacity:1;transform:translate(0,0) scale(1);filter:brightness(1)}25%{opacity:.75;filter:brightness(1.45) grayscale(.5)}100%{opacity:0;transform:translate(var(--dust-x),var(--dust-y)) scale(.06);filter:brightness(1.3) grayscale(1) blur(.7px)}}
@keyframes dust-grain{0%{opacity:0;transform:translate(0,0) scale(.5)}18%{opacity:.8}100%{opacity:0;transform:translate(var(--dust-x),var(--dust-y)) scale(.15)}}
@media(prefers-reduced-motion:reduce){.attack-cinema,.dust-card{display:none}}
