#exit {
  position: fixed;
  bottom: 25px;
  right: 20px;
  width: 65px;
  height: 65px;
  background-color: #59a861;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  z-index: 1000;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;

  animation: pop-in 0.6s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#exit img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

#exit:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  background-color: #f60808;
}

/* Animación: aparición estilo rebote */
@keyframes pop-in {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

/* ========================================
   RESPONSIVE DESIGN PARA BOTÓN SALIR
   ======================================== */

@media (max-width: 1024px) {
  #exit {
    bottom: 25px;
    right: 15px;
    width: 60px;
    height: 60px;
    padding: 6px;
  }

  #exit img {
    width: 60px;
    height: 60px;
  }

  #exit:hover {
    transform: scale(1.1);
  }
}

@media (max-width: 768px) {
  #exit {
    bottom: 20px;
    right: 15px;
    width: 55px;
    height: 55px;
    padding: 5px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.8);
  }

  #exit img {
    width: 50px;
    height: 50px;
  }

  #exit:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 576px) {
  #exit {
    bottom: 15px;
    right: 10px;
    width: 50px;
    height: 50px;
    padding: 4px;
  }

  #exit img {
    width: 45px;
    height: 45px;
  }

  #exit:hover {
    transform: scale(1.02);
  }
}

@media (max-width: 480px) {
  #exit {
    bottom: 12px;
    right: 8px;
    width: 45px;
    height: 45px;
    padding: 3px;
  }

  #exit img {
    width: 40px;
    height: 40px;
  }
}

/* ========================================
   ORIENTACIÓN LANDSCAPE EN MÓVILES
   ======================================== */
@media (max-width: 768px) and (orientation: landscape) {
  #exit {
    bottom: 10px;
    right: 10px;
    width: 45px;
    height: 45px;
  }

  #exit img {
    width: 40px;
    height: 40px;
  }
}

/* ========================================
   MEJORAS DE ACCESIBILIDAD
   ======================================== */
@media (max-width: 768px) {
  #exit:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
  }

  #exit:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
  }
}

/* ========================================
   ESTADOS DESHABILITADOS
   ======================================== */
#exit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#exit:disabled:hover {
  transform: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
  background-color: #59a861;
}
