/* ==========================================
   🍎 Loading Screen — iOS Style
   ========================================== */

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* کانتینر */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* 📝 متن Loading... */
.loading-text {
  font-family: -apple-system, 'Vazirmatn', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin: 0;
  direction: ltr;
}

/* ⭕ اسپینر ۱۲ خطی */
.loading-spinner {
  position: relative;
  width: 60px;
  height: 60px;
}

.loading-spinner span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 16px;
  background: #ffffff;
  border-radius: 2px;
  transform-origin: 50% 30px;
  margin-left: -1.5px;
  opacity: 0.15;
  animation: spinnerFade 1s linear infinite;
}

/* ۱۲ خط با چرخش ۳۰ درجه */
.loading-spinner span:nth-child(1)  { transform: rotate(0deg);   animation-delay: -1s; }
.loading-spinner span:nth-child(2)  { transform: rotate(30deg);  animation-delay: -0.916s; }
.loading-spinner span:nth-child(3)  { transform: rotate(60deg);  animation-delay: -0.833s; }
.loading-spinner span:nth-child(4)  { transform: rotate(90deg);  animation-delay: -0.75s; }
.loading-spinner span:nth-child(5)  { transform: rotate(120deg); animation-delay: -0.666s; }
.loading-spinner span:nth-child(6)  { transform: rotate(150deg); animation-delay: -0.583s; }
.loading-spinner span:nth-child(7)  { transform: rotate(180deg); animation-delay: -0.5s; }
.loading-spinner span:nth-child(8)  { transform: rotate(210deg); animation-delay: -0.416s; }
.loading-spinner span:nth-child(9)  { transform: rotate(240deg); animation-delay: -0.333s; }
.loading-spinner span:nth-child(10) { transform: rotate(270deg); animation-delay: -0.25s; }
.loading-spinner span:nth-child(11) { transform: rotate(300deg); animation-delay: -0.166s; }
.loading-spinner span:nth-child(12) { transform: rotate(330deg); animation-delay: -0.083s; }

@keyframes spinnerFade {
  0% { opacity: 1; }
  100% { opacity: 0.15; }
}

/* Mobile */
@media (max-width: 640px) {
  .loading-text {
    font-size: 18px;
  }
  .loading-spinner {
    width: 50px;
    height: 50px;
  }
  .loading-spinner span {
    height: 13px;
    transform-origin: 50% 25px;
  }
}