/* ============================================
   PowerFit Gym Center - Animations
   ============================================ */

/* ---- Keyframe Animations ---- */

/* Pulse glow for neon elements */
@keyframes neon-pulse {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4), 0 0 30px rgba(57, 255, 20, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.7), 0 0 50px rgba(57, 255, 20, 0.4);
  }
}

/* Pulse dot in hero badge */
@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

/* Scroll indicator */
@keyframes scroll-line {
  0% {
    transform: scaleY(0);
    transform-origin: top;
    opacity: 1;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
    opacity: 1;
  }

  51% {
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
    opacity: 0;
  }
}

/* Shimmer skeleton loader */
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Toast notifications */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(120%);
  }
}

/* Hero title letter animation */
@keyframes slide-up-fade {
  from {
    opacity: 0;
    transform: translateY(60px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Float animation for decorative elements */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* Spin animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Ping animation for badge dot */
@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Draw border animation */
@keyframes draw-border {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

/* Counter count up — done in JS, but initial state */
@keyframes count-pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  60% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Card flip for workout plan generator */
@keyframes card-flip-in {
  from {
    transform: rotateY(-90deg);
    opacity: 0;
  }

  to {
    transform: rotateY(0deg);
    opacity: 1;
  }
}

/* Gradient text shimmer */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ---- Hero Entrance Animations ---- */
.hero-badge {
  animation: slide-up-fade 0.6s ease 0.2s both;
}

.hero-title {
  animation: slide-up-fade 0.7s ease 0.35s both;
}

.hero-subtitle {
  animation: slide-up-fade 0.7s ease 0.5s both;
}

.hero-actions {
  animation: slide-up-fade 0.7s ease 0.65s both;
}

.hero-stats {
  animation: slide-up-fade 0.7s ease 0.8s both;
}

.hero-scroll {
  animation: slide-up-fade 0.7s ease 1s both;
}

/* ---- Neon Glow Utility ---- */
.neon-glow {
  animation: neon-pulse 2.5s ease-in-out infinite;
}

/* ---- Floating Decoration ---- */
.float {
  animation: float 4s ease-in-out infinite;
}

.float-delay {
  animation: float 4s ease-in-out infinite 2s;
}

/* ---- Reveal on Scroll (Intersection Observer) ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.stagger-1 {
  transition-delay: 0.05s;
}

.stagger-2 {
  transition-delay: 0.10s;
}

.stagger-3 {
  transition-delay: 0.15s;
}

.stagger-4 {
  transition-delay: 0.20s;
}

.stagger-5 {
  transition-delay: 0.25s;
}

.stagger-6 {
  transition-delay: 0.30s;
}

/* ---- Gradient Animated Text ---- */
.gradient-text {
  background: linear-gradient(90deg, #39FF14, #00ffaa, #39FF14);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s linear infinite;
}

/* ---- Progress Bar (skill bars on trainer cards) ---- */
.skill-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin: 6px 0 14px;
}

.skill-progress {
  height: 100%;
  background: var(--neon-green);
  border-radius: 2px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.skill-progress.animated {
  /* width set by JS */
}

/* ---- Particle cursor effect ---- */
#cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.04) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s linear;
  z-index: 0;
}

/* ---- Page loader ---- */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px;
  font-weight: 900;
  text-transform: uppercase;
}

.loader-logo span {
  color: #39FF14;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: #39FF14;
  border-radius: 2px;
  animation: loader-fill 1s ease forwards;
}

@keyframes loader-fill {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

/* ---- Workout Plan Card ---- */
.workout-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.workout-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  animation: card-flip-in 0.4s ease forwards;
}

.workout-day-card:hover {
  border-color: var(--border-neon);
  transform: translateY(-4px);
}

.workout-day {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--neon-green);
  margin-bottom: 8px;
}

.workout-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.workout-exercises {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.workout-exercises li {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.workout-exercises li::before {
  content: '▸';
  color: var(--neon-green);
  font-size: 10px;
}

/* ---- Supplement Recommendation ---- */
.recommendation-section {
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.03) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  border: 1px solid var(--border-color);
}

.rec-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  align-items: end;
}

.rec-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.rec-card {
  background: var(--bg-card);
  border: 1px solid var(--neon-green);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: slide-up-fade 0.5s ease forwards;
}

.rec-card-icon {
  font-size: 32px;
}

.rec-card-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}

.rec-card-reason {
  font-size: 12px;
  color: var(--text-secondary);
}