/* ============================================
   e-world Hub — Animations CSS
   Glassmorphism + Neon Effects
   ============================================ */

/* ========== KEYFRAMES ========== */
@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.2); }
  50% { box-shadow: 0 0 40px rgba(124, 58, 237, 0.4); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.1); }
  50% { transform: translate(-20px, 20px) scale(0.9); }
  75% { transform: translate(15px, 10px) scale(1.05); }
}

@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-40px, 20px) scale(0.95); }
  50% { transform: translate(30px, -30px) scale(1.1); }
  75% { transform: translate(-15px, -20px) scale(1); }
}

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ========== NEON GLOW EFFECTS ========== */
.neon-glow {
  text-shadow:
    0 0 10px rgba(167, 139, 250, 0.5),
    0 0 20px rgba(167, 139, 250, 0.3),
    0 0 40px rgba(167, 139, 250, 0.1);
}

.neon-glow-green {
  text-shadow:
    0 0 10px rgba(6, 255, 165, 0.5),
    0 0 20px rgba(6, 255, 165, 0.3),
    0 0 40px rgba(6, 255, 165, 0.1);
}

.neon-box {
  box-shadow:
    0 0 15px rgba(124, 58, 237, 0.15),
    0 0 30px rgba(124, 58, 237, 0.08),
    inset 0 0 15px rgba(124, 58, 237, 0.05);
}

.neon-box-green {
  box-shadow:
    0 0 15px rgba(6, 255, 165, 0.15),
    0 0 30px rgba(6, 255, 165, 0.08);
}

/* ========== ANIMATED GRADIENT BUTTON ========== */
.btn-gradient-animated {
  background: linear-gradient(135deg, #7C3AED, #06FFA5, #00D4FF, #7C3AED);
  background-size: 300% 300%;
  animation: gradient-shift 4s ease infinite;
  color: white;
  border: none;
}

/* ========== HERO PARTICLES CANVAS ========== */
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ========== HERO ORBS ========== */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(124, 58, 237, 0.12);
  top: 10%;
  left: 20%;
  animation: orb-float-1 15s ease-in-out infinite;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(6, 255, 165, 0.06);
  bottom: 20%;
  right: 15%;
  animation: orb-float-2 18s ease-in-out infinite;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: rgba(0, 212, 255, 0.05);
  top: 50%;
  left: 60%;
  animation: orb-float-1 12s ease-in-out infinite reverse;
}

/* ========== ANIMATED COUNTER ========== */
.counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ========== CARD HOVER GLOW per app color ========== */
.app-card[data-app="cv_generator"]:hover {
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.15), 0 0 1px rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.3);
}
.app-card[data-app="cv_generator"]:hover .app-card-icon {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.app-card[data-app="calorie_analyzer"]:hover {
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.15), 0 0 1px rgba(16, 185, 129, 0.3);
  border-color: rgba(16, 185, 129, 0.3);
}
.app-card[data-app="calorie_analyzer"]:hover .app-card-icon {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.app-card[data-app="email_writer"]:hover {
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.15), 0 0 1px rgba(245, 158, 11, 0.3);
  border-color: rgba(245, 158, 11, 0.3);
}
.app-card[data-app="email_writer"]:hover .app-card-icon {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.app-card[data-app="social_posts"]:hover {
  box-shadow: 0 20px 60px rgba(236, 72, 153, 0.15), 0 0 1px rgba(236, 72, 153, 0.3);
  border-color: rgba(236, 72, 153, 0.3);
}
.app-card[data-app="social_posts"]:hover .app-card-icon {
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.app-card[data-app="flashcards_ai"]:hover {
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.15), 0 0 1px rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.3);
}
.app-card[data-app="flashcards_ai"]:hover .app-card-icon {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.app-card[data-app="creator_ai"]:hover {
  box-shadow: 0 20px 60px rgba(255, 0, 0, 0.12), 0 0 1px rgba(255, 0, 0, 0.25);
  border-color: rgba(255, 0, 0, 0.25);
}
.app-card[data-app="creator_ai"]:hover .app-card-icon {
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.25);
}

/* ========== GRID LINE BACKGROUND ========== */
.grid-bg {
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ========== LOADING SPINNER ========== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: rotate-slow 0.8s linear infinite;
}

/* ========== PAGE TRANSITIONS ========== */
.page-enter {
  animation: fade-in 0.3s ease-out;
}

/* ========== HOVER TILT (for cards) ========== */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ========== EARLY ACCESS BANNER ========== */
.early-banner {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.15), rgba(6, 255, 165, 0.08), rgba(124, 58, 237, 0.15));
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  z-index: 1002;
  overflow: hidden;
  max-height: 60px;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease, border-bottom-width 0.4s ease;
}

.early-banner.hidden {
  max-height: 0;
  padding: 0 24px;
  opacity: 0;
  border-bottom-width: 0;
  pointer-events: none;
}

.early-banner strong {
  color: var(--neon-green);
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-orb {
    animation: none;
  }
}
