/* components.player-animations.css
 * Dedicated transitions & keyframes for player profile card animations:
 * - Tokyo entry / exit flights
 * - Damage highlight pulses
 */

@keyframes kot-damage-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  35% { transform: scale(1.06); filter: brightness(1.3) saturate(1.4); }
  70% { transform: scale(0.97); filter: brightness(0.85) saturate(0.9); }
  100% { transform: scale(1); filter: brightness(1); }
}

.cmp-player-profile-card[data-damage-flash="true"] {
  animation: kot-damage-pulse 620ms cubic-bezier(.25,.6,.3,1);
}

/* Tokyo flight clones */
.tokyo-flight-clone {
  pointer-events: none;
  will-change: transform, opacity;
  transition: transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 900ms ease-out;
  opacity: 1;
}
.tokyo-flight-clone[data-phase="landing"] { opacity: .9; }

/* Exit variant (Tokyo leave) */
.tokyo-flight-clone[data-mode="exit"] { filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.tokyo-flight-clone[data-mode="exit"][data-phase="landing"] { opacity: 0; }

/* Staging marker when original card is parked during animation */
.cmp-player-profile-card[data-flight-hidden="true"] { visibility: hidden; }

/* Anchor visual (invisible by default; can pulse when active) */
.tokyo-anchor { position:absolute; width:40px; height:40px; top:4px; right:6px; pointer-events:none; border-radius:50%; }
.tokyo-anchor[data-glow="true"] { animation: tokyo-anchor-glow 1400ms ease-out; }
@keyframes tokyo-anchor-glow {
  0% { box-shadow:0 0 0 rgba(255,255,255,0); transform:scale(.6); opacity:0; }
  25% { box-shadow:0 0 22px 6px rgba(255,230,120,.95); opacity:1; }
  55% { box-shadow:0 0 30px 10px rgba(255,180,60,.7); }
  100% { box-shadow:0 0 0 rgba(255,255,255,0); transform:scale(1.4); opacity:0; }
}

/* Entry glow overlay on card (temporary burst) */
.cmp-player-profile-card[data-entry-glow="true"] { position:relative; }
.cmp-player-profile-card[data-entry-glow="true"]::after {
  content:""; position:absolute; inset:-4px; border-radius:10px; pointer-events:none; animation: kot-entry-glow 900ms ease-out; background:radial-gradient(circle at 50% 50%, rgba(255,230,120,.85), rgba(255,180,40,.25) 60%, rgba(0,0,0,0) 75%);
}
@keyframes kot-entry-glow {
  0% { opacity:0; filter:blur(2px) brightness(1.3); }
  40% { opacity:1; filter:blur(0) brightness(1.15); }
  80% { opacity:.6; filter:blur(1px) brightness(1); }
  100% { opacity:0; filter:blur(2px) brightness(.9); }
}

/* Subtle settle / bounce effect when a card finishes flying into Tokyo */
.cmp-player-profile-card.tokyo-settle {
  animation: kot-tokyo-settle 720ms cubic-bezier(.25,.9,.35,1.4);
}
@keyframes kot-tokyo-settle {
  0% { transform: translateY(-6px) scale(.9); filter: brightness(1.05); }
  35% { transform: translateY(2px) scale(1.03); filter: brightness(1.12); }
  55% { transform: translateY(-2px) scale(.97); filter: brightness(.96); }
  75% { transform: translateY(1px) scale(1.01); filter: brightness(1.02); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

/* Tokyo entry particles (extracted from inline styles for consistency & theming) */
.tokyo-entry-particle {
  position: fixed;
  background: radial-gradient(circle, #ffe878, #ff9d30 60%, rgba(0,0,0,0) 75%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 4999;
  opacity: 0;
  transform: translate(0,0) scale(.4);
  will-change: transform, opacity;
  transition: transform 700ms cubic-bezier(.25,.6,.3,1), opacity 700ms ease;
}
body[data-disable-animations] .tokyo-entry-particle {
  transition-duration: 120ms;
}
