/* Pace 圆角条形加载 - 居中靠上 */
.pace {
  pointer-events: none;
  user-select: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
}
/* 遮罩 */
.pace-running:before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 9998;
}
/* 居中靠上定位 */
.pace .pace-progress {
  margin-top: 45px;
}
/* 头像闪烁 - 进度条上方 */
.pace .pace-progress:before {
  content: '';
  position: absolute;
  top: -62px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: url(/img/avatar.png) center/cover;
  box-shadow: 0 0 16px rgba(99,102,241,.4), 0 0 40px rgba(99,102,241,.2);
  animation: paceAvatarPulse 1.2s ease-in-out infinite;
}
@keyframes paceAvatarPulse {
  0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 16px rgba(99,102,241,.3); }
  50% { transform: translateX(-50%) scale(1.08); box-shadow: 0 0 30px rgba(99,102,241,.6), 0 0 60px rgba(99,102,241,.2); }
}
.pace .pace-progress {
  position: fixed !important;
  top: 35% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 200px !important;
  height: 12px !important;
  z-index: 9999;
  background: rgba(0,0,0,.06) !important;
  border-radius: 10px !important;
  right: auto !important;
  bottom: auto !important;
}
/* 渐变进度条 - 3D 胶囊 */
.pace .pace-progress-inner {
  display: block !important;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #a855f7, #6366f1, #3b82f6);
  background-size: 300% 100%;
  animation: paceGradient .8s ease infinite;
  transition: width .3s;
  position: absolute;
  top: 0; left: 0;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow:
    0 0 30px rgba(99,102,241,.5),
    0 8px 40px rgba(99,102,241,.25),
    0 2px 6px rgba(0,0,0,.2),
    inset 0 2px 0 rgba(255,255,255,.35),
    inset 0 -3px 6px rgba(0,0,0,.25);
}
/* 3D 圆柱明暗遮罩 - 上亮下暗 */
.pace .pace-progress-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(to bottom, rgba(255,255,255,.4) 0%, transparent 40%, rgba(0,0,0,.15) 80%, rgba(0,0,0,.3) 100%);
  pointer-events: none;
}
/* 反光扫光 */
.pace .pace-progress-inner::after {
  content: '';
  position: absolute;
  top: 0; left: -40%;
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: paceShine 1.5s ease-in-out infinite;
  z-index: 1;
}
@keyframes paceShine {
  0% { left: -30%; }
  100% { left: 110%; }
}
/* 加载文字 - 进度条下方 */
.pace .pace-activity {
  display: block !important;
  position: fixed !important;
  top: calc(35% + 20px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 13px;
  color: #6366f1;
  font-weight: 600;
  letter-spacing: 2px;
  z-index: 9999;
}
.pace .pace-activity {
  display: none !important;
}

@keyframes paceGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 完成淡出 - 平滑收缩 */
.pace-done:before {
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}
.pace-done .pace-progress {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scale(.85) !important;
  transition: all .6s cubic-bezier(.4,0,.2,1) !important;
}
.pace-done .pace-activity {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: all .6s cubic-bezier(.4,0,.2,1);
}
