/* ============================================================================
   Global Loading Overlay
   全屏 Loading 遮罩
   ============================================================================ */

.global-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  backdrop-filter: blur(3px);
  transition: opacity 0.3s ease;
}

.global-loading.hidden {
  display: none;
}

/* Loading Spinner */
.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Loading Text */
.loading-text {
  margin-top: 20px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* 當 loading 顯示時，禁用 body 滾動 */
body.loading-active {
  overflow: hidden;
}
