/* =============================================
   PDF MASTER PRO - Animations
   ============================================= */

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

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%  { transform: translateY(-15px) rotate(1deg); }
  66%  { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes scaleOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.85); }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.3); }
  50%  { opacity: 1; transform: scale(1.08); }
  70%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

@keyframes drawCheck {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

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

@keyframes cardHover {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-8px) rotate(0.5deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* ===== UTILITY ANIMATION CLASSES ===== */

.animate-float      { animation: float 6s ease-in-out infinite; }
.animate-fade-in    { animation: fadeIn 0.5s ease-out both; }
.animate-slide-up   { animation: slideUp 0.6s cubic-bezier(0.22,1,0.36,1) both; }
.animate-slide-down { animation: slideDown 0.4s ease-out both; }
.animate-scale-in   { animation: scaleIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
.animate-bounce-in  { animation: bounceIn 0.6s cubic-bezier(0.34,1.56,0.64,1) both; }
.animate-shake      { animation: shake 0.5s ease-in-out; }
.animate-spin       { animation: spin 1s linear infinite; }
.animate-pulse-slow { animation: pulseSlow 3s ease-in-out infinite; }
.animate-gradient   { animation: gradient 6s ease infinite; background-size: 200% 200%; }

/* Staggered animation delays for card grids */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.40s; }

/* ===== HOVER STATES ===== */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(99,102,241,0.18);
}

.hover-scale {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.hover-scale:hover { transform: scale(1.05); }

.hover-glow {
  transition: box-shadow 0.3s ease;
}
.hover-glow:hover {
  box-shadow: 0 0 0 3px rgba(99,102,241,0.3),
              0 8px 32px rgba(99,102,241,0.2);
}

/* ===== PAGE TRANSITIONS ===== */
.page-enter {
  animation: fadeIn 0.4s ease both;
}
.page-exit {
  animation: fadeOut 0.2s ease both;
}

/* ===== LOADING STATES ===== */
.loading-dots {
  display: inline-flex; gap: 4px; align-items: center;
}
.loading-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; animation: bounce-dot 1.4s infinite ease-in-out;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40%            { transform: scale(1); opacity: 1; }
}

/* ===== TOOL ICON HOVER ===== */
.tool-icon-wrapper svg {
  transition: transform 0.3s ease;
}
.tool-card:hover .tool-icon-wrapper svg {
  transform: scale(1.15);
}

/* ===== FLOATING CARDS ANIMATION ===== */
.floating-card {
  animation: float 6s ease-in-out infinite;
}
.floating-card:nth-child(2) { animation-delay: -2s; animation-duration: 7s; }
.floating-card:nth-child(3) { animation-delay: -4s; animation-duration: 8s; }

/* ===== GRADIENT TEXT ANIMATION ===== */
.gradient-text-animated {
  background: linear-gradient(90deg, #6366f1, #d946ef, #6366f1);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient 4s linear infinite;
}

/* ===== CATEGORY TAB TRANSITIONS ===== */
.tab-content-fade {
  animation: fadeIn 0.3s ease-out both;
}

/* ===== MODAL TRANSITIONS ===== */
.modal-entering .modal-box { animation: modalPop 0.35s cubic-bezier(0.34,1.56,0.64,1) both; }
.modal-leaving .modal-box  { animation: scaleOut 0.2s ease both; }
.modal-entering .modal-overlay { animation: fadeIn 0.25s ease both; }
.modal-leaving .modal-overlay  { animation: fadeOut 0.2s ease both; }

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.85) translateY(40px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== PROGRESS BAR ANIMATION ===== */
.progress-indeterminate .progress-fill {
  width: 40% !important;
  animation: progressIndeterminate 1.5s ease-in-out infinite;
}

@keyframes progressIndeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

/* ===== SUCCESS ANIMATION ===== */
.success-checkmark .check-path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawCheck 0.6s cubic-bezier(0.65,0,0.45,1) 0.3s forwards;
}

/* ===== NOTIFICATION BELL ===== */
@keyframes bellRing {
  0%, 100% { transform: rotate(0deg); }
  10%       { transform: rotate(15deg); }
  20%       { transform: rotate(-13deg); }
  30%       { transform: rotate(11deg); }
  40%       { transform: rotate(-9deg); }
  50%       { transform: rotate(7deg); }
  60%       { transform: rotate(-5deg); }
  70%       { transform: rotate(3deg); }
  80%       { transform: rotate(0deg); }
}
.bell-ring { animation: bellRing 1s ease; }

/* ===== HERO PARTICLE DRIFT ===== */
@keyframes particleDrift {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0.3; }
  33%  { transform: translate(30px, -40px) rotate(120deg); opacity: 0.6; }
  66%  { transform: translate(-20px, -80px) rotate(240deg); opacity: 0.3; }
  100% { transform: translate(0, -120px) rotate(360deg); opacity: 0; }
}

/* ===== CARD GRID ENTRANCE ===== */
.tool-card {
  animation: slideUp 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
