/* ========================================
   rakez ركز — Animations
   ======================================== */

/* ─── Entrance Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

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

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

/* ─── Pulse Glow ─── */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(129,140,248,0.3); }
  50%       { box-shadow: 0 0 30px rgba(129,140,248,0.6), 0 0 60px rgba(129,140,248,0.2); }
}

.pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }

/* ─── Spinning ─── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }

/* ─── Bounce ─── */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  30%       { transform: translateY(-8px); }
  60%       { transform: translateY(-4px); }
}
.bounce { animation: bounce 0.5s ease; }

/* ─── Shimmer Loading ─── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ─── Float ─── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
.float { animation: float 3s ease-in-out infinite; }

/* ─── Ripple ─── */
@keyframes ripple {
  from { transform: scale(0); opacity: 0.6; }
  to   { transform: scale(2.5); opacity: 0; }
}

/* ─── Prayer Check Animation ─── */
@keyframes checkBounce {
  0%   { transform: scale(0) rotate(-45deg); }
  50%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.check-animate { animation: checkBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ─── Counter Flip ─── */
@keyframes counterFlip {
  0%   { transform: rotateX(0deg); }
  50%  { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

/* ─── Progress Ring ─── */
@keyframes ringFill {
  from { stroke-dashoffset: 879; }
}

/* ─── Stars / Celebration ─── */
@keyframes starPop {
  0%   { transform: scale(0) rotate(0deg); opacity: 1; }
  70%  { transform: scale(1.2) rotate(20deg); opacity: 1; }
  100% { transform: scale(0) rotate(40deg); opacity: 0; }
}

/* ─── Stagger children ─── */
.stagger-children > * {
  animation: fadeInUp 0.3s ease backwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.10s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.30s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.35s; }

/* ─── Page Transition ─── */
.page-enter {
  animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ─── Flicker number ─── */
@keyframes numberFlicker {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ─── Breathing animation for active session ─── */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50%       { transform: scale(1.03); opacity: 1; }
}

.breathing { animation: breathe 4s ease-in-out infinite; }

/* ─── Bell ring ─── */
@keyframes bellRing {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(10deg); }
  30%  { transform: rotate(-10deg); }
  45%  { transform: rotate(6deg); }
  60%  { transform: rotate(-4deg); }
  75%  { transform: rotate(2deg); }
  90%  { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

.bell-ring { animation: bellRing 0.7s ease; }

/* ─── Typing dots ─── */
@keyframes dot1 { 0%, 100% { opacity: 0.2; } 20% { opacity: 1; } }
@keyframes dot2 { 0%, 100% { opacity: 0.2; } 40% { opacity: 1; } }
@keyframes dot3 { 0%, 100% { opacity: 0.2; } 60% { opacity: 1; } }

/* ─── Reduce motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── AI Processing Visuals ─── */
@keyframes glow {
  0% { box-shadow: 0 0 10px rgba(129,140,248,0.5), inset 0 0 10px rgba(129,140,248,0.5); border-color: rgba(129,140,248,0.8); }
  100% { box-shadow: 0 0 30px rgba(96, 165, 250,0.8), inset 0 0 20px rgba(96, 165, 250,0.6); border-color: rgba(96, 165, 250,1); }
}

.ai-stars {
  display: inline-block;
  animation: bounce 1s infinite alternate;
}
