.scroll-to-top-button {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
  font-size: 1.5rem;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  animation: pulse 2s infinite;
  will-change: transform, box-shadow;
}

.scroll-to-top-button:hover {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.8);
  transform: scale(1.1);
}

@keyframes pulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
  }
  50% {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.7);
  }
}

/* انیمیشن fade+scale هنگام ظاهر شدن دکمه */
.scroll-to-top-enter {
  animation: fadeScaleIn 0.3s forwards;
}
.scroll-to-top-exit {
  animation: fadeScaleOut 0.3s forwards;
}

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeScaleOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.7);
  }
}
