/* J-1002-TYPING-TARRASQUE-FINAL: hall 10 final boss dressing (js/tarrasque-final.js). */

/* pulsing red body glow, deeper and slower than the hall mini-boss */
.monster-rect.final-boss img {
  filter: drop-shadow(0 0 8px rgba(255,60,50,.9)) drop-shadow(0 0 26px rgba(230,0,20,.85)) drop-shadow(0 8px 14px rgba(0,0,0,.55));
  animation: tarr-red-pulse 1.6s ease-in-out infinite;
}
@keyframes tarr-red-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255,60,50,.75)) drop-shadow(0 0 18px rgba(220,0,20,.65)) drop-shadow(0 8px 14px rgba(0,0,0,.55)); }
  50% { filter: brightness(1.08) drop-shadow(0 0 12px rgba(255,70,55,1)) drop-shadow(0 0 40px rgba(255,10,25,.95)) drop-shadow(0 0 70px rgba(170,0,10,.8)) drop-shadow(0 8px 14px rgba(0,0,0,.55)); }
}
.monster-rect.final-boss.die img { animation: none; filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); }

/* lightning eyes: a hot core plus crackling bolts, sized to the sprite box */
.tarr-eyes { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.monster-rect:not(.final-boss) .tarr-eyes { display: none; }
.tarr-eye { position: absolute; width: 12%; aspect-ratio: 1; translate: -50% -50%; }
.tarr-eye::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 22%, #cfe9ff 34%, rgba(110,180,255,.85) 52%, rgba(255,40,40,.35) 72%, transparent 78%);
  opacity: var(--spark, 1); scale: var(--spark, 1);
  box-shadow: 0 0 6px 2px rgba(150,210,255,.9), 0 0 14px 4px rgba(255,40,40,.5);
}
.tarr-eye svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tarr-bolt-glow { fill: none; stroke: rgba(120,190,255,.55); stroke-linecap: round; stroke-linejoin: round; filter: blur(1.2px); }
.tarr-bolt { fill: none; stroke: #f4fbff; stroke-linecap: round; stroke-linejoin: round; }

/* FINAL BOSS! banner, top centre of the stage; normal flashes drop below it */
.final-boss-banner {
  position: absolute; top: .55rem; left: 50%; z-index: 30; pointer-events: none;
  translate: -50% 0; padding: .3rem 1.1rem; border-radius: 999px;
  font-weight: 900; font-size: clamp(1rem, 2.1vw, 1.55rem); letter-spacing: .12em; color: #fff;
  border: 2px solid rgba(255,70,70,.95);
  background: linear-gradient(120deg, rgba(120,0,10,.95), rgba(40,0,4,.95));
  text-shadow: 0 0 8px #ff2a35, 0 0 18px #ff2a35;
  box-shadow: 0 0 16px rgba(255,35,45,.85), 0 0 40px rgba(175,0,16,.55);
  opacity: 0; transition: opacity .35s ease;
  animation: final-boss-throb 1.6s ease-in-out infinite;
}
.viewport.final-boss-on .final-boss-banner { opacity: 1; }
@keyframes final-boss-throb { 0%, 100% { scale: 1; } 50% { scale: 1.07; } }
.viewport.final-boss-on .combat-flash { top: 3.4rem; }

/* steps out of the line at his queue size (0.96 = 2/3 of 1.44) and grows 1.5x.
   Origin = his feet; the small start sits 46 canvas units left (old x 774 vs 820
   = 5.4% of the 857-unit box) so he starts exactly where he stood in line. */
.monster-rect.tarr-step-forward { transform-origin: 50% 96.2%; animation: tarr-step-forward 1.3s cubic-bezier(.3,.1,.25,1) both; }
@keyframes tarr-step-forward {
  0%   { scale: .6667; translate: -5.4% 0; }
  35%  { scale: .80;   translate: -3.8% -1.2%; }
  50%  { scale: .86;   translate: -3% 0; }
  80%  { scale: 1.03;  translate: -.3% -.8%; }
  100% { scale: 1;     translate: 0 0; }
}
