/* 回到顶部按钮样式 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(112, 73, 240, 0.9),
    rgba(87, 50, 218, 0.9)
  );
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(112, 73, 240, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: linear-gradient(
    135deg,
    rgba(112, 73, 240, 1),
    rgba(87, 50, 218, 1)
  );
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(112, 73, 240, 0.4);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 2px 10px rgba(112, 73, 240, 0.3);
  transition: all 0.1s;
}

.back-to-top i {
  transition: transform 0.3s ease;
}

.back-to-top:hover i {
  transform: translateY(-3px);
}

/* 暗色模式适配 */
.dark-mode .back-to-top {
  background: linear-gradient(
    135deg,
    rgba(132, 94, 255, 0.8),
    rgba(112, 73, 240, 0.8)
  );
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .back-to-top:hover {
  background: linear-gradient(
    135deg,
    rgba(132, 94, 255, 0.9),
    rgba(112, 73, 240, 0.9)
  );
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* 移动设备适配 */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
}
