.toast {
  visibility: hidden;
  /* 默认隐藏 */
  /* min-width: 250px; */
  color: white;
  text-align: center;
  padding: 16px;
  position: fixed;
  z-index: 90000;
  left: 50%;
  /* 将元素的左边缘定位在页面宽度的 50% */
  bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  /* 通过 transform 将元素的水平位置移动到正中央 */
  border-radius: 20px;
  background-color: #7f82ff;
}

.toast.success {
  background-color: #4caf50;
  /* 成功的绿色 */
}

.toast.error {
  background-color: #f44336;
  /* 失败的红色 */
}

.toast .close-btn {
  margin-left: 20px;
  font-size: 20px;
  line-height: 20px;
  cursor: pointer;
  color: white;
}

.toast.show {
  visibility: visible;
  /* 显示提示框 */
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }

  to {
    bottom: 20px;
    opacity: 1;
  }
}

@keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }

  to {
    bottom: 20px;
    opacity: 1;
  }
}

@-webkit-keyframes fadeout {
  from {
    bottom: 20px;
    opacity: 1;
  }

  to {
    bottom: 0;
    opacity: 0;
  }
}

@keyframes fadeout {
  from {
    bottom: 20px;
    opacity: 1;
  }

  to {
    bottom: 0;
    opacity: 0;
  }
}
