/* Toast 通用提示组件样式 */
.toast-container {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  pointer-events: none;
}

.toast {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 10px;
  min-width: 200px;
  max-width: 400px;
  text-align: center;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.hide {
  opacity: 0;
  transform: translateY(-20px);
}

/* Toast 类型样式 */
.toast.success {
  background: linear-gradient(135deg, #52c41a, #389e0d);
  border-left: 4px solid #52c41a;
}

.toast.error {
  background: linear-gradient(135deg, #ff4d4f, #cf1322);
  border-left: 4px solid #ff4d4f;
}

.toast.warning {
  background: linear-gradient(135deg, #faad14, #d48806);
  border-left: 4px solid #faad14;
}

.toast.info {
  background: linear-gradient(135deg, #1890ff, #096dd9);
  border-left: 4px solid #1890ff;
}

/* Toast 图标 */
.toast-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 16px;
  vertical-align: middle;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .toast-container {
    display: flex;
    justify-content: center;
  }
  
  .toast {
    min-width: 200px;
    max-width: 90%;
    font-size: 13px;
    padding: 10px 16px;
  }
}

/* 不同位置的Toast */
.toast-container.top-left {
  top: 120px;
  left: 20px;
  right: auto;
  transform: none;
}

.toast-container.top-right {
  top: 120px;
  right: 20px;
  left: auto;
  transform: none;
}

.toast-container.bottom-left {
  top: auto;
  bottom: 120px;
  left: 20px;
  right: auto;
  transform: none;
}

.toast-container.bottom-right {
  top: auto;
  bottom: 120px;
  right: 20px;
  left: auto;
  transform: none;
}

.toast-container.bottom-center {
  top: auto;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
}

/* 加载动画 */
.toast.loading {
  background: rgba(0, 0, 0, 0.9);
  padding: 16px 24px;
}

.toast-loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: toast-spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes toast-spin {
  to {
    transform: rotate(360deg);
  }
}