#scrollTopBtn {
  position: fixed;
  overflow: hidden;
  /* optional but helps */
  bottom: 80px;
  right: 16px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--stc-surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: var(--stc-shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--stc-transition-normal);
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* SVG */
.progress-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  width: 46px;
  height: 46px;
}

/* background ring */
.progress-ring-bg {
  fill: none;
  stroke: var(--stc-border-soft);
  stroke-width: 3;
}

/* progress ring */
.progress-ring-fill {
  fill: none;
  stroke: var(--stc-action-primary);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.2s linear;
}

/* center icon */
.icon {
  font-size: 20px;
  font-weight: 900;
  color: var(--stc-text-primary);
  pointer-events: none;
  line-height: 1;
  position: relative;
  z-index: 2;
}

#scrollTopBtn .icon svg {
  width: 18px;
  height: 18px;
}

/* hover */
#scrollTopBtn:hover {
  transform: scale(1.08);
  background: var(--stc-surface-secondary);
}

@media (min-width: 768px) {
  #scrollTopBtn {
    width: 52px;
    height: 52px;
    bottom: 90px;
    right: 24px;
  }

  /* keep SVG perfectly aligned */
  #scrollTopBtn .progress-ring {
    width: 52px;
    height: 52px;
  }

  /* icon size */
  #scrollTopBtn .icon svg {
    width: 20px;
    height: 20px;
  }
}