/* ===================== SPLASH SCREEN ===================== */
html.sp-lock, html.sp-lock body { overflow: hidden; }

#splash {
  position: fixed; inset: 0; z-index: 2147483647;
  background-color: #ffffff;
  direction: rtl;
  opacity: 1; visibility: visible;
  transition: opacity .7s ease, visibility .7s;
}
#splash.sp-hide { opacity: 0; visibility: hidden; pointer-events: none; }


#splash .sp-stage {
  position: absolute; top: 25%; left: 50%;
  width: clamp(200px, 58vw, 340px);
  transform: translate(-50%, -50%);
}



#splash .sp-logo {
  position: relative;
  opacity: 0; transform: scale(.25); filter: blur(24px);
  will-change: transform, filter, opacity;
}
#splash .sp-logo img { display: block; width: 100%; height: auto; }

/* برق عبوري روي شکل لوگو (ماسک آن با اسکريپت تنظيم مي‌شود) */
#splash .sp-shine {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
#splash .sp-shine::after {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 45%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.95) 50%, transparent 100%);
  transform: translateX(-160%) skewX(-20deg);
  will-change: transform;
}

#splash .sp-star {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  fill: #f5b82e; opacity: 0; transform: scale(0);
  will-change: transform, opacity;
  filter: drop-shadow(0 0 5px #f5b82e);
}
#splash .sp-star:nth-child(2){ left: 4%;   top: 12%; width: 26px; height: 26px; }
#splash .sp-star:nth-child(3){ left: 96%;  top: 6%; }
#splash .sp-star:nth-child(4){ left: 100%; top: 62%; width: 16px; height: 16px; }
#splash .sp-star:nth-child(5){ left: 8%;   top: 92%; width: 18px; height: 18px; }
#splash .sp-star:nth-child(6){ left: 52%;  top: -6%; width: 14px; height: 14px; }
#splash .sp-star:nth-child(7){ left: 78%;  top: 100%; width: 24px; height: 24px; }


/* نيمه پايين صفحه: لودر و متن */
#splash .sp-bottom {
  position: absolute; top: 50%; bottom: 0; left: 0; right: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px;
}
#splash .sp-dots {
  display: flex; gap: 14px; direction: ltr;
  opacity: 0; transform: translateY(28px);
  will-change: transform, opacity;
}
#splash .sp-dots i {
  display: block; width: 16px; height: 16px; border-radius: 50%;
  background: #c0392b;
  transform: scale(.5); opacity: .5;
  will-change: transform, opacity;
}

#splash .sp-text {
  text-align: center; font-size: 16px; color: #777;
  opacity: 0; transform: translateY(28px);
  will-change: transform, opacity;
}



#splash.go .sp-logo { animation: sp-logo-in 1.9s cubic-bezier(.22,1,.36,1) forwards; }
#splash.go .sp-shine::after { animation: sp-shine 2.8s ease-in-out 2.1s infinite; }
#splash.go .sp-star { animation: sp-star 1.9s ease-in-out infinite; }
#splash.go .sp-star:nth-child(2){ animation-delay: 2.0s; }
#splash.go .sp-star:nth-child(3){ animation-delay: 2.4s; }
#splash.go .sp-star:nth-child(4){ animation-delay: 2.8s; }
#splash.go .sp-star:nth-child(5){ animation-delay: 2.2s; }
#splash.go .sp-star:nth-child(6){ animation-delay: 3.0s; }
#splash.go .sp-star:nth-child(7){ animation-delay: 2.6s; }
#splash.go .sp-dots { animation: sp-rise 1s cubic-bezier(.22,1,.36,1) 0.5s forwards; }
#splash.go .sp-text { animation: sp-rise 1s cubic-bezier(.22,1,.36,1) 0.8s forwards; }
#splash.go .sp-dots i { animation: sp-dot 1.2s ease-in-out infinite; }
#splash.go .sp-dots i:nth-child(2){ animation-delay: .18s; }
#splash.go .sp-dots i:nth-child(3){ animation-delay: .36s; }

@keyframes sp-logo-in {
  0%   { opacity: 0; transform: scale(.25); filter: blur(24px); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1);   filter: blur(0); }
}
@keyframes sp-shine {
  0%        { transform: translateX(-160%) skewX(-20deg); }
  55%, 100% { transform: translateX(330%)  skewX(-20deg); }
}
@keyframes sp-star {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1) rotate(90deg); }
}
@keyframes sp-rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sp-dot {
  0%, 100% { transform: scale(.5); opacity: .5; }
  50%      { transform: scale(1.15); opacity: 1; }
}
/* =================== END SPLASH SCREEN =================== */
