.backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #466aff;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(70, 106, 255, 0.35);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.3s, visibility 0.3s;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.backToTop:hover {
  background: #3651d9;
  box-shadow: 0 4px 14px rgba(70, 106, 255, 0.45);
  transform: translateY(-2px);
}

html[data-theme='dark'] .backToTop {
  background: #466aff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

html[data-theme='dark'] .backToTop:hover {
  background: #5b7aff;
  box-shadow: 0 4px 14px rgba(70, 106, 255, 0.35);
}

@media (max-width: 480px) {
  .backToTop {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 40px;
    height: 40px;
  }
}
