body.page-loading {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

.splash-screen {
  display: none;
}

.page-loading .splash-screen {
  position: fixed;
  z-index: 1000000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
  font-family: 'pelakFA', 'pelak', Tahoma, sans-serif;
  background: radial-gradient(circle at 85% 15%, rgba(36, 93, 216, 0.1), transparent 28%),
    radial-gradient(circle at 12% 90%, rgba(22, 170, 146, 0.09), transparent 26%), #f6f9fd;
}

.splash-card {
  width: min(310px, calc(100vw - 32px));
  padding: 27px 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 55px rgba(24, 49, 82, 0.14);
}

.splash-card::before {
  content: '';
  width: 150px;
  height: 150px;
  position: absolute;
  top: -100px;
  right: -70px;
  border-radius: 50%;
  background: rgba(36, 93, 216, 0.08);
}

.splash-mark {
  width: 78px;
  height: 78px;
  margin-bottom: 15px;
  display: grid;
  place-items: center;
  position: relative;
}

.splash-mark img {
  width: 55px;
  height: 55px;
  z-index: 1;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(36, 93, 216, 0.12));
}

.splash-orbit {
  position: absolute;
  inset: 0;
  border: 2px solid #e6edf8;
  border-top-color: #245dd8;
  border-right-color: #16aa92;
  border-radius: 50%;
  animation: splashSpin 1.05s linear infinite;
}

.splash-orbit::after {
  content: '';
  width: 7px;
  height: 7px;
  position: absolute;
  top: 4px;
  right: 9px;
  border-radius: 50%;
  background: #16aa92;
  box-shadow: 0 0 0 4px rgba(22, 170, 146, 0.12);
}

.splash-title {
  color: #263a55;
  font-size: 13px;
  font-weight: 900;
}

.splash-detail {
  margin-top: 6px;
  color: #8290a3;
  font-size: 9px;
}

.splash-progress {
  width: 150px;
  height: 4px;
  margin-top: 17px;
  overflow: hidden;
  border-radius: 99px;
  background: #eaf0f7;
}

.splash-progress span {
  width: 45%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #245dd8, #16aa92);
  animation: splashProgress 1.35s ease-in-out infinite;
}

.splash-actions {
  margin-top: 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.splash-actions button {
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  color: #56708f;
  background: #f0f4f9;
  font-family: inherit;
  font-size: 8px;
  cursor: pointer;
}

#error-message {
  max-width: 260px;
  color: #b42343;
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

@keyframes splashSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes splashProgress {
  0% {
    transform: translateX(130%);
  }
  50% {
    width: 65%;
  }
  100% {
    transform: translateX(-230%);
  }
}

@media (max-width: 575.98px) {
  .splash-card {
    padding: 23px 22px 19px;
    border-radius: 18px;
  }
  .splash-mark {
    width: 68px;
    height: 68px;
  }
  .splash-mark img {
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-orbit {
    animation-duration: 2.4s;
  }
  .splash-progress span {
    width: 62%;
    margin: auto;
    animation: none;
  }
}
