
/* ========= 容器与文字基础样式 ========= */
.loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  width: max-content;
  margin: 32px auto;
  font: 600 24px/1 'Poppins', sans-serif;
  user-select: none;
  color: #334155;
}

/* ========= 160×160 光栅 ========= */
.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160px;
  height: 160px;
  transform: translate(-50%, -50%);
  z-index: 1;
  mask: repeating-linear-gradient(
    90deg,
    transparent 0 6px,
    black 7px 8px
  );
}
.loader::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 50%, #bfdbfe 0%, transparent 50%),
    radial-gradient(circle at 45% 45%, #93c5fd 0%, transparent 45%),
    radial-gradient(circle at 55% 55%, #dbeafe 0%, transparent 45%),
    radial-gradient(circle at 45% 55%, #60a5fa 0%, transparent 45%),
    radial-gradient(circle at 55% 45%, #3b82f6 0%, transparent 45%);
  animation: transform-animation 2s infinite alternate,
             opacity-animation 4s infinite;
  animation-timing-function: cubic-bezier(0.6, 0.8, 0.5, 1);
}

/* ========= 光栅动画 ========= */
@keyframes transform-animation {
  0%   { transform: translate(-48px, 0); }
  100% { transform: translate(48px, 0); }
}
@keyframes opacity-animation {
  0%,100% { opacity: 0; }
  15%     { opacity: 1; }
  65%     { opacity: 0; }
}

/* ========= 单个文字 ========= */
.loader-letter {
  display: inline-block;
  opacity: 0;
  animation: scan-pop 4s infinite linear;
  z-index: 2;
}
/* 依次错开 */
.loader-letter:nth-child(1)  { animation-delay: 0.1s; }
.loader-letter:nth-child(2)  { animation-delay: 0.205s; }
.loader-letter:nth-child(3)  { animation-delay: 0.31s; }
.loader-letter:nth-child(4)  { animation-delay: 0.415s; }
.loader-letter:nth-child(5)  { animation-delay: 0.521s; }
.loader-letter:nth-child(6)  { animation-delay: 0.626s; }
.loader-letter:nth-child(7)  { animation-delay: 0.731s; }
.loader-letter:nth-child(8)  { animation-delay: 0.837s; }
.loader-letter:nth-child(9)  { animation-delay: 0.942s; }
.loader-letter:nth-child(10) { animation-delay: 1.047s; }

/* 小跳循环：每 4 秒重新挨个闪现 + 轻轻蹦一下 */
@keyframes scan-pop {
  0%   { opacity: 0; }
  6.25% { opacity: 1; text-shadow: 0 0 4px rgba(255,255,255,.6); transform: scale(1.1) translateY(-2px); }
  25%  { opacity: 0.2; transform: scale(1) translateY(0); }
  80%  { opacity: 0.2; transform: scale(1) translateY(0); }
  86%  { transform: translateY(-6px) scale(1.08); text-shadow: 0 0 6px rgba(255,255,255,.8); } /* 小跳 */
  92%  { transform: translateY(0) scale(1); }
  96%  { transform: translateY(-3px) scale(1.04); }
  100% { transform: translateY(0) scale(1); opacity: 0.2; }
}
