.toast {
  position: fixed;
  left: 50%;
  top: 50%;  /* 初始位置在垂直居中 */
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  
  /* 初始状态 */
  opacity: 0;
  
  /* 动画定义 */
  animation: toast-animation 2s ease-out forwards;
}

@keyframes toast-animation {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -100px) scale(1); /* 上移100px */
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150px) scale(0.95); /* 继续上移并缩小 */
  }
}