/* ===== KEYFRAMES ===== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(var(--accent-rgb, 168,85,247), 0.15); }
  50% { box-shadow: 0 0 20px rgba(var(--accent-rgb, 168,85,247), 0.3); }
}

/* ===== FADE-UP ON SCROLL ===== */

.animate-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.animate-stagger > .animate-fade-up:nth-child(1) { transition-delay: 0s; }
.animate-stagger > .animate-fade-up:nth-child(2) { transition-delay: 0.08s; }
.animate-stagger > .animate-fade-up:nth-child(3) { transition-delay: 0.16s; }
.animate-stagger > .animate-fade-up:nth-child(4) { transition-delay: 0.24s; }
.animate-stagger > .animate-fade-up:nth-child(5) { transition-delay: 0.32s; }
.animate-stagger > .animate-fade-up:nth-child(6) { transition-delay: 0.40s; }
.animate-stagger > .animate-fade-up:nth-child(7) { transition-delay: 0.48s; }
.animate-stagger > .animate-fade-up:nth-child(8) { transition-delay: 0.56s; }
.animate-stagger > .animate-fade-up:nth-child(9) { transition-delay: 0.64s; }
.animate-stagger > .animate-fade-up:nth-child(10) { transition-delay: 0.72s; }

/* ===== GLASS MORPHISM ===== */

.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== HOVER GLOW ===== */

.hover-glow {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 25px rgba(var(--accent-rgb, 168,85,247), 0.15);
  border-color: rgba(var(--accent-rgb, 168,85,247), 0.3);
}

/* ===== SHIMMER BUTTON ===== */

.shimmer-btn {
  position: relative;
  overflow: hidden;
}

.shimmer-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite;
  pointer-events: none;
}

/* ===== GRADIENT TEXT ===== */

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--accent, #a855f7),
    #fff,
    var(--accent, #a855f7)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== PULSE DOT ===== */

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #a855f7);
  animation: pulse 2s infinite;
}

/* ===== TG APP ADAPTATION ===== */

body.tg-app .shimmer-btn::after {
  animation-duration: 4.5s;
}

/* ===== LOW PERFORMANCE ===== */

body.low-perf .glass-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.low-perf .hover-glow:hover {
  box-shadow: none;
}

body.low-perf .shimmer-btn::after {
  animation: none;
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
  .animate-fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .shimmer-btn::after { animation: none; }
  .pulse-dot { animation: none; }
  .hover-glow { transition: none; }
}
