/* 返回顶部按钮 - 容器样式 */
.back-to-top {
  position: fixed;
  right: 30px;       /* 距离右侧30px，可根据需要调整 */
  bottom: 30px;      /* 距离底部30px，可根据需要调整 */
  width: 44px;       /* 按钮宽度 */
  height: 44px;      /* 按钮高度 */
  background-color: rgba(120, 170, 200, 0.5); /* 背景色，可修改 */
  border-radius: 50%;    /* 圆形按钮，如果是方形可改为 4px */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* 阴影效果 */
  cursor: pointer;
  text-decoration: none;
  z-index: 9999;     /* 确保在最上层 */
  
  /* 透明度与过渡动画，默认隐藏 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* 鼠标悬停效果 */
.back-to-top:hover {
  background-color: #555; /* 悬停背景色 */
  transform: translateY(-3px); /* 向上微浮效果 */
}

/* 图标样式 */
.back-to-top-icon {
  width: 20px;       /* 图标宽度 */
  height: 20px;      /* 图标高度 */
  object-fit: contain;
}

/* 当网页往下翻过指定高度后，通过JS添加此类名来显示按钮 */
.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
