.update-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(120%);
  z-index: 2500;
  width: min(420px, calc(100vw - 32px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.update-bar.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.update-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(18, 22, 30, 0.97), rgba(12, 15, 22, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.2) inset,
    0 0 24px rgba(var(--accent-rgb, 99, 102, 241), 0.12);
  backdrop-filter: blur(12px);
}

.update-bar-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.update-bar-body {
  flex: 1;
  min-width: 0;
}

.update-bar-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}

.update-bar-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.update-bar-track {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.update-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2, #818cf8));
  box-shadow: 0 0 12px rgba(var(--accent-rgb, 99, 102, 241), 0.55);
  transition: width 0.25s ease;
  position: relative;
}

.update-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  animation: updateShimmer 1.6s ease-in-out infinite;
}

@keyframes updateShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.update-bar-pct {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  min-width: 38px;
  text-align: right;
  flex-shrink: 0;
}

.update-bar--ready .update-bar-track,
.update-bar--ready .update-bar-pct {
  display: none;
}

.update-bar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.update-bar--ready .update-bar-inner {
  flex-wrap: wrap;
}

.update-bar--ready .update-bar-body {
  flex: 1 1 180px;
}

.update-bar--ready .update-bar-actions {
  margin-left: auto;
}

.update-bar--error .update-bar-fill {
  background: var(--danger, #ef4444);
  box-shadow: none;
}

.update-bar--error .update-bar-pct {
  color: var(--danger, #ef4444);
}
