/* 加载指示器 */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }
.spinner-xl { width: 56px; height: 56px; border-width: 4px; }

.spinner-cyan { border-top-color: var(--accent-cyan); }
.spinner-success { border-top-color: var(--success); }
.spinner-danger { border-top-color: var(--danger); }

/* skeleton 骨架 */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, .04) 0%,
    rgba(255, 255, 255, .08) 50%,
    rgba(255, 255, 255, .04) 100%);
  background-size: 200% 100%;
  border-radius: var(--radius-md);
  animation: shimmer 1.4s infinite;
}
.skeleton-text {
  height: 12px;
  border-radius: var(--radius-sm);
}
.skeleton-text + .skeleton-text { margin-top: 8px; }
.skeleton-text-lg { height: 18px; }
.skeleton-card { height: 160px; }
.skeleton-circle { border-radius: 50%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 进度条 */
.progress {
  height: 6px;
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}
.progress-lg { height: 10px; }
.progress-sm { height: 4px; }

.progress-bar {
  height: 100%;
  background: var(--grad-primary);
  border-radius: inherit;
  transition: width var(--dur-slow) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
  animation: progressShine 1.6s linear infinite;
}
.progress-indeterminate .progress-bar {
  width: 30% !important;
  animation: progressIndeterminate 1.4s ease-in-out infinite;
}
@keyframes progressShine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
@keyframes progressIndeterminate {
  0%   { transform: translateX(-130%); }
  100% { transform: translateX(430%); }
}

/* 全屏遮罩 loader */
.fullscreen-loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  background: rgba(10, 10, 18, .85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  color: var(--text-primary);
}
