/* pixel-progressbar — HP / Mana / EXP variants with striped animation */

.pixel-progressbar {
  position: relative;
  width: 100%;
  height: 24px;
  background-color: var(--bg-dark);
  border: var(--border-width) solid var(--border);
  box-shadow: var(--pixel-shadow-inset);
  border-radius: var(--radius);
  overflow: hidden;
}

.pixel-progressbar--lg {
  height: 32px;
}

.pixel-progressbar__fill {
  height: 100%;
  width: var(--progress, 0%);
  transition: width 400ms steps(8);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(255, 255, 255, 0.15) 4px,
    rgba(255, 255, 255, 0.15) 8px
  );
  background-size: 16px 16px;
  animation: pixel-bar-stripe 1s linear infinite;
}

.pixel-progressbar--hp .pixel-progressbar__fill {
  background-color: var(--hp-color);
}

.pixel-progressbar--mana .pixel-progressbar__fill {
  background-color: var(--mana-color);
}

.pixel-progressbar--exp .pixel-progressbar__fill {
  background-color: var(--exp-color);
}

.pixel-progressbar__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: var(--font-size-pixel-min);
  color: var(--text-main);
  text-shadow: 1px 1px 0 var(--text-dark);
  pointer-events: none;
  z-index: 1;
}

.pixel-progressbar__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
}

.pixel-progressbar__header-label {
  font-family: var(--font-pixel);
  font-size: var(--font-size-pixel-min);
  color: var(--text-muted);
}

@keyframes pixel-bar-stripe {
  0% { background-position: 0 0; }
  100% { background-position: 16px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-progressbar__fill {
    animation: none;
    transition: none;
  }
}

@media (max-width: 479px) {
  .pixel-progressbar__label,
  .pixel-progressbar__header-label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-xs);
  }
}
