@-webkit-keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@-webkit-keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.toast-message {
  position: fixed;
  z-index: 99999;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  min-width: 280px;
  max-width: min(92vw, 420px);
  padding: 14px 18px 14px 16px;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  -webkit-animation: toastIn 0.25s ease-out;
  animation: toastIn 0.25s ease-out;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toast-message.toast-hiding {
  -webkit-animation: toastOut 0.2s ease-in forwards;
  animation: toastOut 0.2s ease-in forwards;
}

.toast-message .toast-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  margin-top: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.toast-message .toast-text {
  flex: 1;
  word-break: break-word;
}

.toast-message.toast-error {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.35);
}

.toast-message.toast-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 16px 40px rgba(22, 163, 74, 0.32);
}

.toast-message.toast-warning {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  box-shadow: 0 16px 40px rgba(234, 88, 12, 0.32);
}

.toast-message.toast-info {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.32);
}
