/* ===== PREMIUM LOADER ===== */

body {
  margin: 0;
}

html {
  overflow: hidden scroll;
}

/* Background loader */
#loading-bg {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--initial-loader-bg, #fafafa);
  block-size: 100%;
  inline-size: 100%;
}

/* Container utama */
.loading-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.8s ease;
  block-size: 140px;
  inline-size: 140px;
}

/* Logo tengah */
.loading-logo {
  position: relative;
  z-index: 10;
  padding: 12px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 3%);
}

.loading-logo img {
  display: block;
  block-size: 70px;
  inline-size: 70px;
  object-fit: contain;
}

/* Area spinner */
.loading-spinner {
  position: absolute;
  block-size: 100%;
  inline-size: 100%;
}

/* Ring luar */
.ring-outer {
  position: absolute;
  border: 1px solid rgba(102, 126, 234, 10%);
  border-radius: 50%;
  animation: rotateSlow 8s linear infinite;
  block-size: 100%;
  inline-size: 100%;
}

/* Ring dalam */
.ring-inner {
  position: absolute;
  border: 1px solid rgba(102, 126, 234, 15%);
  border-radius: 50%;
  animation: rotate 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  block-size: 80%;
  border-block-start: 1px solid #667eea;
  inline-size: 80%;
  inset-block-start: 10%;
  inset-inline-start: 10%;
}

/* Orbit container */
.ring-dot {
  position: absolute;
  animation: rotate 2s linear infinite;
  block-size: 100%;
  inline-size: 100%;
}

/* Dot yang mengorbit */
.ring-dot::after {
  position: absolute;
  border-radius: 50%;
  background: #667eea;
  block-size: 6px;
  box-shadow: 0 0 6px rgba(102, 126, 234, 50%);
  content: "";
  inline-size: 6px;
  inset-block-start: -3px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
}

/* Animasi */
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateSlow {
  to {
    transform: rotate(-360deg);
  }
}

/* Fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .loading-container {
    block-size: 120px;
    inline-size: 120px;
  }

  .loading-logo img {
    block-size: 60px;
    inline-size: 60px;
  }
}

@media (max-width: 480px) {
  .loading-container {
    block-size: 100px;
    inline-size: 100px;
  }

  .loading-logo img {
    block-size: 50px;
    inline-size: 50px;
  }
}
