.story-progress {
  max-width: 600px;
  margin: 20px auto;
  font-family: "Orbitron", system-ui, sans-serif;
  color: #7df9ff;
}

.story-progress .progress-text {
  margin-bottom: 8px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.story-progress .progress-bar {
  position: relative;
  width: 100%;
  height: 12px;
  background: linear-gradient(90deg, #111, #222);
  border: 1px solid #00f6ff;
  box-shadow: 0 0 12px rgba(0, 246, 255, 0.7);
  overflow: hidden;
}

.story-progress .progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f6ff, #ff00ff);
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.9);
  transition: width 0.6s ease-out;
}

/* Boot animation */
.story-progress .progress-fill {
  animation: neon-pulse 2.5s infinite alternate;
}

/* Neon pulse */
@keyframes neon-pulse {
  0% {
    filter: brightness(0.9) saturate(1);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.6);
  }
  100% {
    filter: brightness(1.2) saturate(1.3);
    box-shadow: 0 0 18px rgba(255, 0, 255, 1);
  }
}

/* Glitch overlay */
.story-progress .progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  opacity: 0;
  pointer-events: none;
}

/* Triggered glitch sweep */
.story-progress.glitch .progress-bar::after {
  animation: glitch-sweep 0.6s linear;
}

@keyframes glitch-sweep {
  0% {
    left: -40%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    left: 110%;
    opacity: 0;
  }
}


/* Scanlines overlay */
.story-progress .progress-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.25;
  pointer-events: none;
  mix-blend-mode: overlay;
}
/* Noise overlay */
.story-progress .progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
  opacity: 0.15;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Micro jitter on text */
.story-progress.glitch .progress-text {
  animation: text-jitter 0.35s steps(2, end);
}

@keyframes text-jitter {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-1px, 0); }
  40%  { transform: translate(1px, 0); }
  60%  { transform: translate(-1px, 0); }
  80%  { transform: translate(1px, 0); }
  100% { transform: translate(0, 0); }
}


.story-progress.updating .progress-fill {
  box-shadow:
    0 0 20px rgba(255, 0, 255, 1),
    0 0 40px rgba(255, 0, 255, 0.6);
}

