/* ==========================================
   KEYFRAMES & TRANSITION STYLES
   ========================================== */

/* Row entry animation */
@keyframes rowSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.team-row-anim-entry {
  animation: rowSlideIn 0.3s ease-out forwards;
}

/* Flashing on points update */
@keyframes ptsFlash {
  0% {
    color: var(--pure-white);
    transform: scale(1);
  }
  50% {
    color: var(--primary-gold);
    transform: scale(1.15);
    text-shadow: 0 0 10px var(--primary-gold);
  }
  100% {
    color: var(--primary-gold);
    transform: scale(1);
  }
}

.pts-flash-anim {
  animation: ptsFlash 0.3s ease-in-out;
}

/* Player death flash (red alert on player alive segment) */
@keyframes segmentDeathFlash {
  0% {
    background-color: var(--danger-red);
    box-shadow: 0 0 10px var(--danger-red);
  }
  50% {
    background-color: #ffffff;
    box-shadow: 0 0 15px #ffffff;
  }
  100% {
    background-color: rgba(255, 61, 61, 0.25);
    box-shadow: none;
  }
}

.segment-death-flash {
  animation: segmentDeathFlash 0.4s ease-out forwards;
}

/* Crown pop animation for rush qualified */
@keyframes crownPop {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-20deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.3) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.crown-pop-anim {
  animation: crownPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Slide in for Champion Rush cards */
@keyframes rushCardSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rush-card-anim {
  animation: rushCardSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Electric pulsing glow overlay for qualified rows */
@keyframes electricAura {
  0% {
    box-shadow: 0 0 4px rgba(255, 214, 0, 0.25);
    border-color: rgba(255, 214, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 10px rgba(255, 214, 0, 0.45);
    border-color: rgba(255, 214, 0, 0.5);
  }
  100% {
    box-shadow: 0 0 4px rgba(255, 214, 0, 0.25);
    border-color: rgba(255, 214, 0, 0.3);
  }
}

.team-row.rush-qualified {
  animation: electricAura 5s infinite ease-in-out;
}

/* Eliminated row styling with red flash on transition */
@keyframes elimFlash {
  0% {
    background-color: rgba(255, 61, 61, 0.3);
  }
  100% {
    background-color: transparent;
  }
}

.team-row.eliminated-transition {
  animation: elimFlash 0.5s ease-out forwards;
}

/* FLIP Rank change animation class */
.row-moving {
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* Champion Rush Panel slide transitions */
@keyframes rushSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-40px);
  }
}

@keyframes rushSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.rush-content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.rush-transition-out {
  animation: rushSlideOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.rush-transition-in {
  animation: rushSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
