/* 悬浮球样式 */
.floating-btn {
  position: fixed;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #409eff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  z-index: 2100;
  user-select: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, left, top, right, bottom;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 贴左边时，hover显示完整，重置旋转 */
.floating-btn.snapped-left:hover {
  left: 0px !important;
  transform: rotate(0deg) scale(1);
  box-shadow: 0 4px 16px 0 rgba(64, 158, 255, 0.3);
}

/* 贴右边时，hover显示完整，重置旋转 */
.floating-btn.snapped-right:hover {
  right: 0px !important;
  transform: rotate(0deg) scale(1);
  box-shadow: 0 4px 16px 0 rgba(64, 158, 255, 0.3);
}

/* 未贴边时的hover效果 */
.floating-btn:not(.snapped-left):not(.snapped-right):hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px 0 rgba(64, 158, 255, 0.3);
}

/* 拖拽时的样式 */
.floating-btn:active {
  cursor: grabbing;
}

.floating-btn i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.floating-btn:hover i {
  transform: scale(1.1);
}

.icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none; /* 禁止图片的鼠标事件 */
  user-select: none; /* 禁止选择 */
  -webkit-user-drag: none; /* 禁止拖拽 */
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none; /* 禁止长按菜单 */
}
