/* =========================================
   BlockZen - Animations Stylesheet
   ========================================= */

/* ----- Keyframes ----- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(108, 99, 255, 0.3); }
  50%       { box-shadow: 0 0 30px rgba(108, 99, 255, 0.7); }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

@keyframes ripple {
  0%   { transform: scale(0);   opacity: 1; }
  100% { transform: scale(4);   opacity: 0; }
}

/* ----- Utility Animation Classes ----- */
.animate-fade-up    { animation: fadeInUp 0.6s ease forwards; }
.animate-fade-down  { animation: fadeInDown 0.6s ease forwards; }
.animate-fade-left  { animation: fadeInLeft 0.6s ease forwards; }
.animate-fade-right { animation: fadeInRight 0.6s ease forwards; }
.animate-zoom-in    { animation: zoomIn 0.6s ease forwards; }
.animate-float      { animation: float 3s ease-in-out infinite; }
.animate-pulse      { animation: pulse 2s ease-in-out infinite; }
.animate-spin       { animation: spin 8s linear infinite; }
.animate-glow       { animation: glow 2s ease-in-out infinite; }

/* ----- Delay Helpers ----- */
.delay-100  { animation-delay: 0.1s; }
.delay-200  { animation-delay: 0.2s; }
.delay-300  { animation-delay: 0.3s; }
.delay-400  { animation-delay: 0.4s; }
.delay-500  { animation-delay: 0.5s; }
.delay-600  { animation-delay: 0.6s; }

/* ----- Animated Gradient Background ----- */
.animated-gradient {
  background: linear-gradient(135deg, #6c63ff, #00d4aa, #6c63ff);
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
}

/* ----- Hover Effects ----- */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(108, 99, 255, 0.25);
}

/* ----- Page Preloader ----- */
#preloader {
  position: fixed;
  inset: 0;
  background: #0d0d1a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-ring {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(108, 99, 255, 0.2);
  border-top-color: #6c63ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
