/* toast.css - 横向中央，Header下面 */
/* .toast-container {
  position: fixed;
  top: 5rem; 
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
  width: auto;
  max-width: 90%;
}

.toast {
  background: white;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  min-width: 300px;
  max-width: 450px;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
} */

.toast-container {
  position: fixed;
  top: 5rem; /* 在Header下面 */
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
  width: auto;
  max-width: 90%;
}

.toast {
  background: white;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  min-width: 300px;
  max-width: 450px;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.hide {
  transform: translateY(-20px);
  opacity: 0;
}

/* Toast类型样式 */
/* .toast-success {
  border-left: 4px solid #10B981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.toast-error {
  border-left: 4px solid #EF4444;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.toast-warning {
  border-left: 4px solid #F59E0B;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.toast-info {
  border-left: 4px solid #3B82F6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
} */
.toast-success {
  background-color: #10B981;
}

.toast-error {
  background-color: #EF4444;
}

.toast-warning {
  background-color: #F59E0B;
}

.toast-info {
  background-color: #3B82F6;
}

/* 图标样式 */
.toast-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* .toast-success .toast-icon {
  background: #10B981;
  color: white;
}

.toast-error .toast-icon {
  background: #EF4444;
  color: white;
}

.toast-warning .toast-icon {
  background: #F59E0B;
  color: white;
}

.toast-info .toast-icon {
  background: #3B82F6;
  color: white;
} */
.toast-success .toast-icon {
  background: white;
  color: #10B981;
}

.toast-error .toast-icon {
  background: white;
  color: #EF4444;
}

.toast-warning .toast-icon {
  background: white;
  color: #F59E0B;
}

.toast-info .toast-icon {
  background: white;
  color: #3B82F6;
}

/* 内容区域 */
.toast-content {
  flex: 1;
  min-width: 0;
}

/* .toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1F2937;
  margin-bottom: 0.125rem;
  line-height: 1.3;
}

.toast-message {
  font-size: 0.8rem;
  color: #6B7280;
  line-height: 1.3;
  word-wrap: break-word;
} */

/* .toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  margin-bottom: 0.125rem;
  line-height: 1.3;
}

.toast-message {
  font-size: 0.8rem;
  color: #e2e2e2;
  line-height: 1.3;
  word-wrap: break-word;
} */

.toast-title {
  font-weight: 400;
  font-size: 1.25rem;
  color: white;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.toast-message {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
  word-wrap: break-word;
}

/* 关闭按钮 */
/* .toast-close {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
} */
.toast-close {
  background: none;
  border: none;
  color: #e4e4e4;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}


.toast-close:hover {
  color: #000000;
  background-color: #F3F4F6;
}

/* 进度条 */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.9;
  width: 100%;
  transform-origin: left;
  animation: toastProgress linear forwards;
}

@keyframes toastProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* 装饰元素 */
.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
}

/* 悬停效果 */
.toast:hover {
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 640px) {
  .toast-container {
    max-width: 95%;
    padding: 0 1rem;
  }
  
  .toast {
    min-width: unset;
    width: 100%;
    max-width: 100%;
    padding: 0.875rem 1rem;
  }
  
  .toast-title {
    font-size: 0.85rem;
  }
  
  .toast-message {
    font-size: 0.75rem;
  }
}

/* 入场动画 */
.toast.slide-in {
  animation: slideInFromTop 0.4s ease-out;
}

@keyframes slideInFromTop {
  from {
    transform: translateY(-40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 多个Toast时的堆叠效果 */
.toast-container .toast:nth-child(1) {
  z-index: 4;
}

.toast-container .toast:nth-child(2) {
  z-index: 3;
  transform: translateY(-10px);
  opacity: 0.9;
}

.toast-container .toast:nth-child(3) {
  z-index: 2;
  transform: translateY(-20px);
  opacity: 0.8;
}

/* 确保在移动端不会遮挡内容 */
@media (max-width: 768px) {
  .toast-container {
    top: 4.5rem;
  }
}

/* 紧凑模式 */
.toast.compact {
  padding: 0.75rem 1rem;
  min-width: 250px;
}

.toast.compact .toast-title {
  font-size: 1.2rem;
  margin-bottom: 0;
}

.toast.compact .toast-message {
  font-size: 0.75rem;
}