/* ============================================
 * 进度条样式
 * 血条 / 经验条 / 任务积分进度条
 * ============================================ */

/* ---- 进度条基础 ---- */
.g-progress {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.g-progress-fill {
  height: 100%;
  border-radius: inherit;
  transition: width var(--transition-normal);
  position: relative;
}

/* 进度条内文字 */
.g-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-primary);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  white-space: nowrap;
  z-index: 1;
}

/* 进度条光泽 */
.g-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  border-radius: inherit;
  pointer-events: none;
}

/* ---- 血条 ---- */
.g-progress-hp {
  height: 20px;
  border: 1px solid rgba(76,175,80,0.3);
}

.g-progress-hp .g-progress-fill {
  background: linear-gradient(90deg, #3D8B40, var(--green));
}

/* 低血量（<30%）变红 */
.g-progress-hp.g-progress-low .g-progress-fill {
  background: linear-gradient(90deg, #8B2020, var(--red));
  animation: hp-pulse 1s ease-in-out infinite;
}

.g-progress-hp.g-progress-low {
  border-color: rgba(196,75,75,0.4);
}

@keyframes hp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* ---- 经验条 ---- */
.g-progress-exp {
  height: 12px;
  border: 1px solid rgba(200,155,60,0.2);
}

.g-progress-exp .g-progress-fill {
  background: linear-gradient(90deg, var(--primary-active), var(--primary));
}

/* 经验条变色（根据进度） */
.g-progress-exp.g-progress-exp-low .g-progress-fill {
  background: linear-gradient(90deg, #C44B4B, #E05555);
  box-shadow: 0 0 4px rgba(196,75,75,0.4);
}

.g-progress-exp.g-progress-exp-mid .g-progress-fill {
  background: linear-gradient(90deg, #E05555, #C89B3C);
  box-shadow: 0 0 4px rgba(200,155,60,0.4);
}

.g-progress-exp.g-progress-exp-high .g-progress-fill {
  background: linear-gradient(90deg, #C89B3C, #4CAF50);
  box-shadow: 0 0 4px rgba(76,175,80,0.4);
}

.g-progress-exp.g-progress-exp-full .g-progress-fill {
  background: linear-gradient(90deg, #4CAF50, #4A8FD4);
  box-shadow: 0 0 6px rgba(74,143,212,0.5);
}

/* ---- 任务积分进度条 ---- */
.g-progress-quest {
  height: 8px;
  border: 1px solid rgba(74,143,212,0.2);
}

.g-progress-quest .g-progress-fill {
  background: linear-gradient(90deg, #3A6FA0, var(--blue));
}

/* 任务完成态 */
.g-progress-quest.g-progress-done .g-progress-fill {
  background: linear-gradient(90deg, #3D8B40, var(--green));
}

.g-progress-quest.g-progress-done {
  border-color: rgba(76,175,80,0.3);
}

/* ---- 迷你进度条（用于卡片内嵌） ---- */
.g-progress-mini {
  height: 4px;
  border: none;
  border-radius: 2px;
}

.g-progress-mini .g-progress-fill {
  border-radius: 2px;
}

.g-progress-mini .g-progress-fill::after {
  display: none;
}

/* ---- 带标签的进度条 ---- */
.g-progress-labeled {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.g-progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.g-progress-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.g-progress-value {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ---- 进度条展示区辅助 ---- */
.progress-demo-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.progress-demo-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-demo-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
}