/* مؤثرات حركة مأخوذة فكرتها من Magic UI (https://magicui.design، رخصة MIT) ومكتوبة بـ CSS و JS عادي.
   كلها ألوان صافية، وتنطفي إذا الجهاز مفعّل «تقليل الحركة». */

/* ---- Blur Fade: العنصر يطلع بنعومة من ضبابية لما يوصله التمرير ---- */
.mu-fade { opacity: 0; filter: blur(6px); transform: translateY(14px); transition: opacity .7s ease, filter .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.mu-fade.mu-in { opacity: 1; filter: none; transform: none; }

/* ---- Border Beam: شعاع ضوء يدور على حافة البطاقة ---- */
@property --mu-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.mu-beam { position: relative; isolation: isolate; }
.mu-beam::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: var(--beam-w, 2px); pointer-events: none; z-index: 3;
  background: conic-gradient(from var(--mu-a), transparent 0 78%, var(--beam, #1a4fd6) 88%, var(--beam2, #7cb4ff) 92%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: mu-spin var(--beam-t, 6s) linear infinite;
}
@keyframes mu-spin { to { --mu-a: 360deg; } }

/* ---- Ripple: دوائر هادئة تطلع من ورا العنصر ---- */
.mu-ripple { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.mu-ripple i { position: absolute; top: 50%; left: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%; border: 1px solid var(--rc, #1a4fd6); background: color-mix(in srgb, var(--rc, #1a4fd6) 5%, transparent);
  opacity: var(--o); animation: mu-ripple 3.4s ease-in-out infinite; animation-delay: var(--dl); }
@keyframes mu-ripple { 50% { transform: scale(.92); } }

/* ---- Pulsating Button: زر ينبض حتى يلفت النظر ---- */
.mu-pulse { position: relative; }
.mu-pulse::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--pulse, var(--primary, #1a4fd6)); z-index: -1; animation: mu-pulse 2s ease-out infinite; }
@keyframes mu-pulse { from { transform: scale(1); opacity: .45; } to { transform: scale(1.18, 1.45); opacity: 0; } }

/* ---- Dot Pattern: خلفية نقاط ناعمة تختفي على الأطراف ---- */
.mu-dots { position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image: radial-gradient(circle, var(--dot, #c5cfe6) 1.2px, transparent 1.6px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 30%, transparent 75%); }

/* ---- Animated List: العناصر تنزل وحدة وحدة مثل الإشعارات ---- */
.mu-list > * { animation: mu-pop .5s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--i, 0) * 120ms); }
@keyframes mu-pop { from { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* ---- Number Ticker ---- */
[data-ticker], .mu-num { font-variant-numeric: tabular-nums; }

/* ---- Confetti ---- */
.mu-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }

@media (prefers-reduced-motion: reduce) {
  .mu-fade { opacity: 1; filter: none; transform: none; transition: none; }
  .mu-beam::after, .mu-ripple i, .mu-pulse::before, .mu-list > * { animation: none; }
  .mu-pulse::before { display: none; }
}
