#alert-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 90vw;
}

/* Alert Box */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  min-width: 240px;
  max-width: 320px;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #fff;
  background: #17496B;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: all;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  animation: popInTop 0.35s ease forwards, fadeOutTop 0.35s 4.6s forwards;
}

/* SUCCESS */
.alert.success {
  background: linear-gradient(135deg, #1F5F8B, #2E7DA6);
}

.alert.error {
  background: linear-gradient(135deg, #ff4d4f, #c62828);
  box-shadow: 0 10px 25px rgba(255, 77, 79, 0.4);
  border-left: 4px solid #ff1a1a;
  color: #fff;

  animation:
    popInTop 0.35s ease forwards,
    shake 0.3s ease,
    glowError 1.5s ease-in-out infinite alternate,
    fadeOutTop 0.35s 4.6s forwards;
}

/* ICON */
.alert .icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  background: rgba(0,0,0,0.25);
  color: #fff;
  flex-shrink: 0;
}

/* Error Icon */
.alert.error .icon-circle {
  background: rgba(255, 255, 255, 0.2);
}

/* TEXT */
.alert span {
  flex: 1;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* CLOSE BUTTON */
.alert .close-btn {
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0.7;
  transition: 0.2s;
  color: #fff;
}

.alert .close-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* LIGHT BORDER EFFECT */
.alert::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(45deg, rgba(255,255,255,0.25), transparent);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* PROGRESS BAR */
.alert::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,0.6);
  animation: progress 5s linear forwards;
}

/* ANIMATIONS */
@keyframes popInTop {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOutTop {
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

@keyframes progress {
  to {
    width: 0%;
  }
}

/* SHAKE */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* GLOW */
@keyframes glowError {
  from {
    box-shadow: 0 0 10px rgba(255, 77, 79, 0.4);
  }
  to {
    box-shadow: 0 0 18px rgba(255, 77, 79, 0.7);
  }
}

/* MOBILE */
@media (max-width: 480px) {
  #alert-container {
    right: 10px;
    left: 10px;
  }

  .alert {
    width: 100%;
    padding: 10px 12px;
  }
}