/* Estilos para PWA y Splash Screen */

/* Splash Screen */
#pwa-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #3498db;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#pwa-splash.show {
  opacity: 1;
}

#pwa-splash.hide {
  opacity: 0;
}

.splash-container {
  text-align: center;
  color: #ffffff;
}

.splash-logo {
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.splash-logo img {
  width: 120px;
  height: auto;
}

.splash-title {
  margin-bottom: 30px;
}

.splash-text {
  font-size: 2.5rem;
  font-weight: bold;
  margin: 0;
  animation: fadeInUp 1s ease-out;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.splash-spinner {
  display: flex;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s linear infinite;
}

/* Animaciones */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

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

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Botón de instalación de PWA */
.pwa-install-button {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
}

.pwa-install-button:hover {
  background-color: #2980b9;
  transform: scale(1.05);
}

.pwa-install-button.show {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: bounceIn 0.5s;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}
