/* ┌────────────────────────────────────────────┐
 * │ 9.1  返回顶部按钮                           │
 * └────────────────────────────────────────────┘ */

/* ── 回到顶部按钮 ── */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  z-index: 1000;
  background: transparent;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  display: none;
}

/* ── 回到顶部按钮显示状态 ── */
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: slideUpFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease,
    visibility 0.3s ease;
}

/* ── 悬停效果 ── */
.back-to-top:hover {
  transform: scale(1.1);
  bottom: 33px;
  cursor: pointer;
  transition: bottom 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 回到顶部按钮弹入动画 ── */
@keyframes slideUpFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
