.alert {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    min-width: 350px;
    margin: 0.5rem;
    padding: 1rem 1.5rem 2rem 1.5rem;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    animation: fadeOutAlert 4s forwards;
}

.closebtn {
    margin-left: 15px;
    color: #fff;
    font-weight: bold;
    float: right;
    cursor: pointer;
}

/* Estilos del modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: block;
  opacity: 1;
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal .close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

/* Estilos de alertas */
.alert-success {
    background-color: #4CAF50;
}

.alert-warning {
    background-color: #ff9800;
    color: #000;
}

.alert-error {
    background-color: #f44336;
}
@keyframes fadeOutAlert {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    width: 100%;
    animation: progressBar 4s linear forwards;
}
@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

.alert-info {
  background-color: #2196F3;
}

@media (max-width: 576px) {
.alert {
  min-width: auto;
  width: calc(100% - 2rem);
  left: 1rem;
  right: 1rem;
}
}
