/* Fullscreen overlay dengan opacity dikurangi dan efek blur */
#loading-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: rgba(249, 249, 249, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

/* Kontainer logo + spinner */
#loading-screen .loading-content {
  position: relative;
  text-align: center;
  padding: 2rem;
}

/* Efek pulsasi latar belakang di belakang logo */
#loading-screen .loading-content::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-color) 20%, transparent 80%);
  animation: pulse-bg 2.5s ease-out infinite;
  z-index: -1;
}
@keyframes pulse-bg {
  0%   { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
  50%  { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
  100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
}

/* Animasi heartbeat pada logo */
.logo-loading {
  width: 320px;
  margin-bottom: 1rem;
  animation: heartbeat 1.3s infinite;
}
@keyframes heartbeat {
  0%, 100%   { transform: scale(1); }
  25%, 75%   { transform: scale(1.1); }
  50%        { transform: scale(0.9); }
}

/* Spinner ganda dengan ring sekunder */
.spinner {
  position: relative;
  width: 50px; height: 50px;
}
.spinner::before,
.spinner::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 50px; height: 50px;
  border: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.spinner::after {
  width: 36px; height: 36px;
  top: 7px; left: 7px;
  border-width: 4px;
  border-top-color: var(--primary-color);
  animation-duration: 0.8s;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Saat halaman sudah load, sembunyikan overlay */
#loading-screen.loaded {
  opacity: 0;
  pointer-events: none;
}

/* Kontainer logo + spinner: flex kolom, align center */
#loading-screen .loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 2rem;
}

/* Spinner di bawah logo, dengan jarak atas */
.spinner {
  margin-top: 1rem; /* atur sesuai selera */
  position: relative;
  width: 50px; height: 50px;
}
.spinner::before,
.spinner::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 50px; height: 50px;
  border: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.spinner::after {
  width: 36px; height: 36px;
  top: 7px; left: 7px;
  border-width: 4px;
  border-top-color: var(--primary-color);
  animation-duration: 0.8s;
}
