.my-tooltip {
  position: fixed; /* 相对于视口定位，避免滚动干扰 */
  word-break: break-all;
  white-space: pre !important;
  padding: 6px 12px;
  background: #333;
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;  /* 默认不换行 */
  pointer-events: none; /* 让鼠标事件穿透，防止干扰 hover 触发 */
  z-index: 9999;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

/* 复制按钮 */
.tooltip-copy-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  cursor: pointer;
  font-size: 24px;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.1s;
  user-select: none;
}
.tooltip-copy-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* 小三角箭头（默认在上方） */
.my-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #333;
}

.my-tooltip.bottom::after {
  top: -6px;
  bottom: auto;
  border-top: none;
  border-bottom: 6px solid #333;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}



.custom-alert {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  padding: 14px 28px;
  background: #333;
  color: #fff;
  font-size: 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: auto;      /* 允许点击关闭 */
  cursor: pointer;
  max-width: 80%;
  text-align: center;
  white-space: nowrap;       /* 单行显示，可改为 normal 换行 */
}

/* 显示状态 */
.custom-alert.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 不同类型配色（可选） */
.custom-alert.success {
  background: #28a745;
}
.custom-alert.error {
  background: #dc3545;
}
.custom-alert.info {
  background: #157FF880;
}