* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  width: 100%;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f5f5;
}

.splash-screen {
  background-color: #ffffff;
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  animation: splashIn 1.5s ease-out forwards;
}

.splash-logo {
  width: 300px;
  opacity: 1;
  transform: none;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.fade-out .splash-logo {
  opacity: 0;
  transform: translateY(-40px);
}

.fade-out {
  animation: fadeOut 0.6s ease forwards;
}

@keyframes splashIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.main-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(to bottom, #006fb9, #145b97);
  padding: 40px 20px;
  text-align: center;
}

.hidden {
  display: none !important;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.bienvenida {
  font-size: 1.8rem;
  color: white;
  margin-bottom: 20px;
}

.logo {
  width: 180px;
  height: auto;
}

.btn-container {
  background-color: #003d66;
  color: white;
  font-size: 1rem;
  padding: 14px;
  border: none;
  border-radius: 30px;
  width: 100%;
  max-width: 300px;
  margin-top: 200px;
  margin-bottom: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  transition: background 0.2s ease;
}

.btn-container:hover {
  background-color: #002f4d;
}

.spinner {
  margin-top: 100px;
  border: 4px solid #ffffff;
  border-top: 4px solid transparent;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-container {
  background: white;
  padding: 30px 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  text-align: left;
  margin: 0 auto;
}

.form-logo {
  display: block;
  margin: 0 auto 20px auto;
  width: 220px;
  height: auto;
}

.form-container h2 {
  color: #003d66;
  margin-bottom: 25px;
  text-align: center;
  font-size: 1.1rem;
}

/* Inputs tipo material design */
.input-floating {
  position: relative;
  margin-bottom: 25px;
  width: 100%;
}

.input-floating input,
.input-floating select {
  width: 100%;
  padding: 16px 10px 10px; /* antes era: 14px 10px 6px */
  font-size: 1rem;
  border: none;
  border-bottom: 1px solid #ccc;
  background: transparent;
  outline: none;
  transition: all 0.3s ease;
  color: #222;
}
.input-floating select option {
  color: #000;
}

.input-floating input::placeholder {
  color: transparent;
}

.input-floating label {
  position: absolute;
  top: 12px;
  left: 10px;
  font-size: 1rem;
  color: #777;
  pointer-events: none;
  transition: 0.2s ease all;
}

.input-floating input:focus,
.input-floating select:focus {
  border-bottom: 2px solid #007acc;
}

.input-floating input:focus + label,
.input-floating input:not(:placeholder-shown) + label,
.input-floating select:focus + label,
.input-floating select:not([value=""]) + label {
  top: -12px; /* 🧠 Más separación al flotar */
  left: 10px;
  font-size: 0.75rem;
  color: #007acc;
  background-color: white;
  padding: 0 4px;
}

/* Texto informativo dinámico */
.info-text {
  font-size: 0.85rem;
  color: #007acc;
  margin-top: -10px; /* más compacto */
  margin-bottom: 18px;
  padding-left: 2px;
}

/* Checkbox estilo moderno */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  margin: 10px 0;
  font-size: 0.9rem;
  color: #444;
}

.checkbox-wrapper input {
  margin-right: 10px;
}

.checkbox-wrapper a {
  color: #007acc;
  text-decoration: none;
}

.checkbox-wrapper a:hover {
  text-decoration: underline;
}

/* Botón del formulario */
.form-container button {
  width: 100%;
  padding: 12px;
  background-color: #003d66;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}

.form-container button:hover {
  background-color: #002f4d;
}

/* Animación de entrada */
.animar-formulario {
  animation: fadeInUp 0.3s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  #pantallaFormulario {
    background: white !important;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .form-container {
    box-shadow: none;
    border-radius: 0;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 25px;
  }
}
/* SPINNER DENTRO DEL BOTÓN */
.btn-spinner {
  margin-left: 10px;
  border: 3px solid #fff;
  border-top: 3px solid transparent;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 768px) {
  .main-screen {
    background: white !important;
    height: 100vh;
    width: 100vw;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .form-container {
    box-shadow: none;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 30px 20px;
    margin: 0;
  }

  .form-logo {
    width: 180px;
    margin: 20px auto 30px;
  }

  .input-floating {
    margin-bottom: 30px;
  }

  .input-floating input,
  .input-floating select {
    padding: 18px 10px 10px;
    font-size: 1.1rem;
    border-bottom: 2px solid #eee;
  }

  .input-floating label {
    font-size: 1.1rem;
    top: 15px;
  }

  .input-floating input:focus + label,
  .input-floating input:not(:placeholder-shown) + label,
  .input-floating select:focus + label,
  .input-floating select:not([value=""]) + label {
    top: -8px;
    font-size: 0.85rem;
  }

  .checkbox-wrapper {
    margin: 15px 0;
    font-size: 0.95rem;
  }

  #btnContinuar {
    margin-top: 30px;
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 8px;
  }

  /* Asegurar que el formulario no quede centrado verticalmente */
  body, html {
    height: auto;
    min-height: 100vh;
  }
}