/* Estilos mejorados para popups de éxito y error */
.flash-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1.2rem 1.8rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 10000;
  min-width: 300px;
  max-width: 450px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.4;
}

.flash-message.success,
.success-flash {
  background: linear-gradient(135deg, #00c851 0%, #007e33 100%) !important;
  color: white !important;
  border-left: 4px solid #ffffff !important;
}

.flash-message.error,
.error-flash {
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%) !important;
  color: white !important;
  border-left: 4px solid #ffffff !important;
}

.success-flash i,
.error-flash i {
  font-size: 1.2rem;
  opacity: 0.9;
}

.success-flash {
  background: linear-gradient(135deg, #00c851 0%, #007e33 100%) !important;
  color: white !important;
  padding: 1.2rem 1.8rem !important;
  border-radius: 12px !important;
  border-left: 4px solid #ffffff !important;
  box-shadow: 0 8px 32px rgba(0, 200, 81, 0.3) !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.error-flash {
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%) !important;
  color: white !important;
  padding: 1.2rem 1.8rem !important;
  border-radius: 12px !important;
  border-left: 4px solid #ffffff !important;
  box-shadow: 0 8px 32px rgba(255, 68, 68, 0.3) !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* Animación mejorada */
@keyframes slideInBounce {
  0% {
    transform: translateX(100%) scale(0.8);
    opacity: 0;
  }
  60% {
    transform: translateX(-10px) scale(1.05);
    opacity: 0.9;
  }
  80% {
    transform: translateX(5px) scale(0.98);
    opacity: 1;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

/* Animación de salida */
.flash-message.fade-out {
  animation: slideOutFade 0.4s ease-in-out forwards;
}

@keyframes slideOutFade {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
}

/* Efecto hover para interactividad */
.flash-message:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 480px) {
  .flash-message {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Efecto de progreso para mostrar tiempo restante */
.flash-message::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 0 12px 12px;
  animation: progressBar 4s linear forwards;
}

@keyframes progressBar {
  0% {
    width: 100%;
  }
  100% {
    width: 0%;
  }
}

/* Estilo especial para mensajes de éxito de contraseña */
.password-success {
  background: linear-gradient(135deg, #ffd200 0%, #ffb700 100%) !important;
  color: #333 !important;
  border-left: 4px solid #333 !important;
  box-shadow: 0 8px 32px rgba(255, 210, 0, 0.4) !important;
}

.password-success i {
  color: #333 !important;
}