/* 容器：居中容器 */
.toast-container {
  position: fixed;
  top: 50%;                 /* 垂直居中 */
  left: 50%;                /* 水平居中 */
  transform: translate(-50%, -50%);
  z-index: 9999;

  display: flex;            /* 多条消息垂直堆叠 */
  flex-direction: column;
  gap: 8px;
  align-items: center;      /* 让每条 toast 横向居中 */
}

/* 基础样式 */
.toast {
  min-width: 120px;
  max-width: 320px;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  color: #fff;
  pointer-events: none;              /* 穿透鼠标事件 */

  opacity: 0;
  transform: translateY(-20px);
  transition: opacity .3s ease, transform .3s ease;
}

/* 颜色风格，可自行扩展 */
.toast-success { background: #4caf50; }
.toast-error   { background: #f44336; }
.toast-info    { background: rgba(0,0,0,.85); }

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
