#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1000000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms ease;
}

#topbar.active { opacity: 1; }
#topbar.finishing { opacity: 0; transition-delay: 200ms; }

#topbar i {
  display: block;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #2d5a41, #5fae7e 60%, #b7e4c7);
  box-shadow: 0 0 10px rgba(95, 174, 126, 0.7), 0 0 4px rgba(183, 228, 199, 0.6);
  border-radius: 0 3px 3px 0;
  transition: transform 300ms cubic-bezier(0.2, 0, 0, 1);
}

#topbar i::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 90px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55));
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  #topbar i { transition: none; }
}
