/* Progress Container - visibility controlled by JS */
#progress-container {
  opacity: 0;
  pointer-events: none;
  /* not clickable when hidden */
  transition: opacity 0.4s ease;
}

#progress-container.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Progress bar (vertical, left) - Enhanced styling ───────────────────────────── */
.progress-bar.vertical.left {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 100vh;
  z-index: 50;
  background:
    /* Filled portion with gradient */
    linear-gradient(180deg,
      #ff70b1 0%,
      #EC5493 50%,
      #d03070 100%) no-repeat;
  background-size: 100% var(--scroll, 0%);
  border-radius: 0 3px 3px 0;
}

/* Track background (behind the progress) */
.progress-bar.vertical.left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: inherit;
  z-index: -1;
}

/* Glowing dot at the progress point */
.progress-bar.vertical.left::after {
  content: '';
  position: absolute;
  top: var(--scroll, 0%);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #fff 0%, #EC5493 60%, transparent 100%);
  border-radius: 50%;
  box-shadow:
    0 0 8px 2px rgba(236, 84, 147, 0.8),
    0 0 16px 4px rgba(236, 84, 147, 0.4);
  opacity: 1;
  transition: top 0.1s ease-out;
}

@keyframes barGlow {

  0%,
  100% {
    box-shadow:
      0 0 10px rgba(236, 84, 147, 0.5),
      0 0 20px rgba(236, 84, 147, 0.3);
  }

  50% {
    box-shadow:
      0 0 15px rgba(236, 84, 147, 0.7),
      0 0 30px rgba(236, 84, 147, 0.5),
      0 0 45px rgba(236, 84, 147, 0.2);
  }
}

/* ── Milestone Ticks ───────────────────────────── */
.tick {
  --size: 32px;
  position: fixed;
  z-index: 60;
  left: 0px;
  top: var(--pos);
  transform: translateY(-50%) scale(1);
  width: var(--size);
  height: var(--size);
  display: flex;
  justify-content: center;
  align-items: center;
  font: 600 12px/1 'Segoe UI', sans-serif;
  color: rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, #2a2a2e 0%, #1a1a1e 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tick:hover {
  transform: translateY(-50%) scale(1.15);
  opacity: 1;
  border-color: rgba(236, 84, 147, 0.5);
  box-shadow: 0 0 12px rgba(236, 84, 147, 0.4);
}

.tick::after {
  content: attr(data-label);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Pop animation for when milestone is reached */
@keyframes pop {
  0% {
    transform: translateY(-50%) scale(0.5);
    opacity: 0.6;
    background: linear-gradient(135deg, #2a2a2e 0%, #1a1a1e 100%);
  }

  50% {
    transform: translateY(-50%) scale(1.3);
    opacity: 1;
  }

  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
    background: linear-gradient(135deg, #ff70b1 0%, #EC5493 50%, #d03070 100%);
  }
}

/* Subtle glow for reached milestones */
@keyframes subtleGlow {

  0%,
  100% {
    box-shadow:
      0 0 8px 2px rgba(236, 84, 147, 0.6),
      0 2px 8px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow:
      0 0 16px 4px rgba(255, 112, 177, 0.8),
      0 0 24px 6px rgba(236, 84, 147, 0.4),
      0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

/* Reached milestone state */
.tick.reached {
  animation:
    pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) forwards,
    subtleGlow 2.5s ease-in-out 0.5s infinite;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}