/* ===== Micro-Animations ===== */

/* Fade-in on load with slide up */
@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fade-slide-in 600ms ease both;
}

.animate-in:nth-child(1) { animation-delay: 0ms; }
.animate-in:nth-child(2) { animation-delay: 100ms; }
.animate-in:nth-child(3) { animation-delay: 200ms; }
.animate-in:nth-child(4) { animation-delay: 300ms; }
.animate-in:nth-child(5) { animation-delay: 400ms; }

/* Tab indicator slide */
@keyframes tab-indicator {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Active tab pulse */
@keyframes tab-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.tab-btn[aria-selected="true"] {
  animation: tab-pulse 300ms ease;
}

/* Result glow */
@keyframes result-glow {
  0% {
    box-shadow: var(--shadow-md);
  }
  50% {
    box-shadow: var(--shadow-glow), var(--shadow-md);
  }
  100% {
    box-shadow: var(--shadow-md);
  }
}

.results-panel.glow-active {
  animation: result-glow 1s ease;
}

/* Shimmer for ad placeholders */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Hover lift on cards */
.calculator-panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Slider thumb pulse on active */
@keyframes thumb-pulse {
  0% { box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4); }
  50% { box-shadow: 0 2px 16px rgba(108, 92, 231, 0.6); }
  100% { box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4); }
}

.custom-slider:active::-webkit-slider-thumb {
  animation: thumb-pulse 400ms ease;
}

.custom-slider:active::-moz-range-thumb {
  animation: thumb-pulse 400ms ease;
}

/* CountUp number transition — handled in JS */

/* Smooth fade for panel switch */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Copy success animation */
@keyframes copy-success {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.copy-success-anim {
  animation: copy-success 300ms ease;
}

/* Hero floating effect */
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-title {
  animation: hero-float 6s ease-in-out infinite;
}

/* Modal entry animation */
@keyframes modal-entry {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

dialog.pro-modal[open] {
  animation: modal-entry 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes golden-lock-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.9)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6)); }
}

.golden-lock-anim {
  animation: golden-lock-pulse 2s infinite ease-in-out;
}
