/* ===========================================================
   ANIMEVERSE - Custom Animations & Transitions
   =========================================================== */

* { scroll-behavior: smooth; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0505; }
::-webkit-scrollbar-thumb { background: #7a1015; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #e0111a; }

/* Fade + slide-up entrance */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.7s cubic-bezier(.22,1,.36,1) both; }

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
.animate-fadeIn { animation: fadeIn 0.5s ease both; }

/* Staggered children */
.stagger > * { animation: fadeInUp 0.6s cubic-bezier(.22,1,.36,1) both; }
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .12s; }
.stagger > *:nth-child(3) { animation-delay: .19s; }
.stagger > *:nth-child(4) { animation-delay: .26s; }
.stagger > *:nth-child(5) { animation-delay: .33s; }
.stagger > *:nth-child(6) { animation-delay: .40s; }

/* Floating hero glow */
@keyframes floatGlow {
  0%,100% { transform: translateY(0) scale(1); opacity: .55; }
  50%     { transform: translateY(-16px) scale(1.04); opacity: .8; }
}
.float-glow { animation: floatGlow 6s ease-in-out infinite; }

/* Slow ember/crow drift used on hero */
@keyframes drift {
  0%   { transform: translate(0,0) rotate(0deg); }
  50%  { transform: translate(-10px,-14px) rotate(-3deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}
.animate-drift { animation: drift 5s ease-in-out infinite; }

/* Pulsing live dot */
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(224,17,26,.6); }
  70%  { box-shadow: 0 0 0 10px rgba(224,17,26,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,17,26,0); }
}
.pulse-dot { animation: pulseDot 1.8s infinite; }

/* Card hover lift */
.card-hover { transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease, border-color .35s ease; }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 15px 35px -10px rgba(224,17,26,.35); }

/* Shimmer skeleton (used while content loads via AJAX) */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.shimmer {
  background: linear-gradient(90deg, #150a0a 0%, #241010 50%, #150a0a 100%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* Like heart pop */
@keyframes heartPop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.heart-pop { animation: heartPop .4s ease; }

/* Toast slide-in */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast-in { animation: toastIn .35s cubic-bezier(.22,1,.36,1) both; }

/* Modal pop */
@keyframes modalPop {
  from { opacity: 0; transform: scale(.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-pop { animation: modalPop .3s cubic-bezier(.22,1,.36,1) both; }

/* Gradient text underline hover for links */
.link-underline { position: relative; }
.link-underline::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: #e0111a; transition: width .3s ease;
}
.link-underline:hover::after { width: 100%; }

/* Progress bar for polls/stats */
.progress-fill { transition: width 1s cubic-bezier(.22,1,.36,1); }

/* Page load fade */
body { animation: fadeIn .4s ease both; }

/* Focus ring styling matching theme */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(224,17,26,.25);
}
