/* ============================================================
   BatWin India — Animations & Keyframes
   assets/css/animations.css
   ============================================================ */

/* ── KEYFRAMES ── */

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

@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px currentColor; }
  50%       { opacity: 0.4; box-shadow: none; }
}

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

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

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

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

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

@keyframes popIn {
  from { opacity: 0; transform: scale(0.75); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { transform: translateX(-110%); }
  to   { transform: translateX(0); }
}

@keyframes slideOutLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-110%); }
}

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

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

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

@keyframes floatAlt {
  0%, 100% { transform: translateY(-5px) rotate(-2deg); }
  50%       { transform: translateY(5px)  rotate(2deg); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 12px rgba(245,166,35,0.3); }
  50%       { box-shadow: 0 0 28px rgba(245,166,35,0.7); }
}

@keyframes goldGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(245,166,35,0.4); }
  50%       { text-shadow: 0 0 24px rgba(245,166,35,0.9); }
}

@keyframes ripple {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(2.2); opacity: 0; }
}

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

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

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

@keyframes progressBar {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ── UTILITY ANIMATION CLASSES ── */

.anim-fade-up   { animation: fadeInUp   0.6s ease both; }
.anim-fade-down { animation: fadeInDown 0.6s ease both; }
.anim-fade-left { animation: fadeInLeft 0.6s ease both; }
.anim-fade-right{ animation: fadeInRight 0.6s ease both; }
.anim-scale-in  { animation: scaleIn    0.5s ease both; }
.anim-pop-in    { animation: popIn      0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
.anim-float     { animation: float      3s ease-in-out infinite; }
.anim-float-alt { animation: floatAlt   4s ease-in-out infinite; }
.anim-pulse     { animation: pulse      2s ease-in-out infinite; }
.anim-spin      { animation: spin       1.2s linear infinite; }
.anim-glow      { animation: glow       2s ease-in-out infinite; }
.anim-gold-glow { animation: goldGlow   2.5s ease-in-out infinite; }

/* Delay utilities */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }

/* ── SHIMMER SKELETON ── */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* ── GRADIENT BORDER ANIMATION ── */
.gradient-border-anim {
  background: linear-gradient(90deg, #f5a623, #ffd166, #c8841a, #f5a623);
  background-size: 300% 300%;
  animation: borderRun 3s ease infinite;
}

/* ── RIPPLE BUTTON EFFECT ── */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.btn-ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0) translate(-50%,-50%);
  transform-origin: top left;
}
.btn-ripple:active::before {
  animation: ripple 0.5s ease-out;
}

/* ── FLOATING BADGE ANIMATION ── */
.floating-badge {
  animation: float 3.5s ease-in-out infinite;
}
.floating-badge:nth-child(even) {
  animation: floatAlt 4s ease-in-out infinite;
}

/* ── TICKER / MARQUEE ── */
.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
}
.ticker-content {
  display: inline-block;
  animation: ticker 22s linear infinite;
}
.ticker-content:hover { animation-play-state: paused; }

/* ── SCROLL REVEAL (triggered via JS adding .revealed class) ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.revealed { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-right.revealed { opacity: 1; transform: translateX(0); }

/* ── LOADING SPINNER ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(245,166,35,0.25);
  border-top-color: var(--gold, #f5a623);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ── PROGRESS BAR ── */
.progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold, #f5a623), var(--gold-dark, #c8841a));
  border-radius: 4px;
  animation: progressBar 2s ease forwards;
}

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