/* 首屏与全局 loading（loading.ts）共用：纯 CSS 旋转指示器 */

body {
  margin: 0;
}

.app-loading-spinner {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--app-theme-color, #1989fa);
  border-radius: 50%;
  animation: app-loading-spin 0.75s linear infinite;
}

html.dark .app-loading-spinner {
  border-color: rgba(255, 255, 255, 0.15);
  border-top-color: var(--app-theme-color, #1989fa);
}

@keyframes app-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 首屏占位 */
.first-loading-wrap {
  display: flex;
  width: 100%;
  height: 100dvh;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

html.dark .first-loading-wrap {
  background-color: #fff;
}

.first-loading-inner {
  padding: 98px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 全局 loading 遮罩淡入淡出 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.global-loading {
  animation: fadeIn 0.3s ease-in-out;
}

.global-loading.fade-out {
  animation: fadeOut 0.3s ease-in-out;
}
