/* ===== 加载进度遮罩 ===== */
.loading {
  position: absolute;
  inset: 0;
  z-index: var(--z-loading);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 16, .82);
  backdrop-filter: blur(8px);
}
.loading-box {
  text-align: center;
}

/* ===== 加载进度：液态变形球 + 进度环 ===== */
.loader {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}
.loader-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.loader-track {
  stroke: rgba(255, 255, 255, .08);
  stroke-width: 5;
}
.loader-fill {
  stroke: url(#loaderGrad);
  stroke-width: 5;
  stroke-linecap: round;
}
/* 中心液态变形球：随进度逐步充盈圆内 */
.blob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, .3);
  animation: blob-morph 4s ease-in-out infinite;
}
@keyframes blob-morph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50% { border-radius: 50% 60% 30% 60% / 30% 40% 70% 50%; }
  75% { border-radius: 40% 60% 50% 40% / 60% 50% 30% 70%; }
}
.loader-pct {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
.loading-title {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .7);
  letter-spacing: .3px;
}

/* 不确定进度：进度环旋转 + blob 变形 */
.loader.indeterminate .loader-ring {
  animation: loader-spin 1.2s linear infinite;
}
.loader.indeterminate .loader-fill {
  stroke-dasharray: 70 206.46;
  stroke-dashoffset: 0;
}
@keyframes loader-spin { to { transform: rotate(270deg); } }
