/*
 * 全局 Loading 组件样式
 * 新增功能：提供统一的加载遮罩层和旋转动画
 * PHP 原版无此功能，为 jxy-bbs 新增
 */

/* 加载遮罩层 */
.global-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.global-loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 加载动画容器 */
.global-loading-spinner {
  width: 50px;
  height: 50px;
  position: relative;
}

/* 旋转动画 */
.global-loading-spinner::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 5px;
  border-radius: 50%;
  border: 3px solid #409EFF;
  border-top-color: transparent;
  animation: global-loading-spin 1s linear infinite;
}

/* 加载文本 */
.global-loading-text {
  margin-top: 15px;
  color: #409EFF;
  font-size: 14px;
  font-weight: 500;
}

/* 旋转关键帧 */
@keyframes global-loading-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 暗色模式适配 */
.dark-theme .global-loading-overlay {
  background-color: rgba(0, 0, 0, 0.85);
}

.dark-theme .global-loading-text {
  color: #79bbff;
}

.dark-theme .global-loading-spinner::after {
  border-color: #79bbff;
  border-top-color: transparent;
}