/**
 * 首屏加载占位（原 index.html 内联样式的等价外置）。
 *
 * ★ 为什么在 public/ 而不是 src/：
 * 这是「主资源没来时」给用户看的兜底界面 ⇒ 必须**独立于构建产物**。
 * 放 src/ 会被 Rollup 并进 487KB 的主 CSS，一旦主 CSS 慢或加载失败，
 * 兜底界面就跟着裸奔 —— 恰好在最需要它的场景失效。
 *
 * ★ 不要搬回 index.html 的 <style> 内联块：生产 CSP 走 style-src 'self'，会被直接拦掉。
 */

html,
body,
#app {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.loading-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  cursor: pointer;
}

.loading-text {
  font-size: 14px;
  color: #606266;
  letter-spacing: 0.5px;
}

/* 超时提示色：由 loading.js 挂 class 触发（class 而非 el.style.color，
   让首屏兜底的全部样式都留在本文件，便于审查） */
.loading-text--error {
  color: #f56c6c;
}

.loader,
.loader::before,
.loader::after {
  width: 2.5em;
  height: 2.5em;
  border-radius: 50%;
  animation: load-animation 1.8s infinite ease-in-out;
  animation-fill-mode: both;
}

.loader {
  position: relative;
  font-size: 10px;
  color: #406eeb;
  text-indent: -9999em;
  transform: translateZ(0);
  animation-delay: -0.16s;
}

.loader::before,
.loader::after {
  position: absolute;
  top: 0;
  content: "";
}

.loader::before {
  left: -3.5em;
  animation-delay: -0.32s;
}

.loader::after {
  left: 3.5em;
}

@keyframes load-animation {
  0%,
  80%,
  100% {
    box-shadow: 0 2.5em 0 -1.3em;
  }

  40% {
    box-shadow: 0 2.5em 0 0;
  }
}
