/* ====== Base general ====== */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /*background: linear-gradient(180deg, #227bd3bd, #e0f7fa 60%, #ffffff 100%);*/
  background:  #227bd3bd ;
  overflow: hidden;
  animation: fadeInBody 0.5s ease-in-out;
}

@keyframes fadeInBody {
  from { opacity: 0; transform: scale(1.01); }
  to { opacity: 1; transform: scale(1); }
}

/* ====== Tarjeta principal ====== */
.form {
  position: relative;
  background: #ffffffb9;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  padding: 60px 40px 30px 40px;
  width: 600px;
  text-align: center;
  transition: transform 0.3s ease, opacity 0.5s ease;
  animation: fadeInForm 0.6s ease forwards;
  box-sizing: border-box;
  margin-top: auto;
  margin-bottom: auto;
}

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

/* ====== Logo NEURO ====== */
.neuro-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeInLogo 0.8s ease-out forwards;
}

@keyframes fadeInLogo {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.neuro-svg-anim {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.2));
}

/* ====== Cabecera ====== */
.login-header h2 {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 8px;
  animation: fadeInHeader 0.7s ease;
}

.login-header p {
  color: #555;
  font-size: 16px;
  margin: 0 0 20px 0;
  animation: fadeInHeader 0.9s ease;
}

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

/* ====== Formulario ====== */
.login-form {
  width: 85%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

/* ====== Inputs ====== */
.login-form input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1.5px 4px rgba(0, 0, 0, 0.08);
  text-align: center;
  font-size: 17px;
  color: #1a1a1a;
  outline: none;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
  animation: fadeInInput 0.6s ease forwards;
}

.login-form input:focus {
  border-color: #185b9d;
  box-shadow: 0 0 6px rgba(34, 123, 211, 0.4);
}

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

/* ====== Botón principal ====== */
.login-form button {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(90deg, #3663a5ab, #185b9dbd);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 5px;
  animation: fadeInButton 0.7s ease forwards;
  box-sizing: border-box;
}

.login-form button:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #4c87dfab, #227bd3bd);
}

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

/* ====== Enlace secundario ====== */
.message {
  font-size: 16px;
  color: #000;
  text-align: center;
  margin-top: 15px;
  line-height: 1.4;
  animation: fadeInFooter 0.9s ease;
}

.message a {
  color: #004aad;
  text-decoration: none;
  font-weight: 500;
}
.message a:hover {
  text-decoration: underline;
}

/* ====== Responsividad ====== */
@media (max-width: 768px) {
  .form {
    width: 85%;
    padding: 50px 20px 25px 20px;
  }

  .login-form {
    width: 90%;
  }

  .neuro-svg-anim {
    width: 120px;
  }

  .login-header h2 {
    font-size: 20px;
  }

  .login-header p,
  .message {
    font-size: 14px;
  }
}

/* ===== Fade out, in ==== */
body {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 0.2s ease, filter 0.3s ease;
}

body.fade-in {
  opacity: 1;
  filter: blur(0);
}

body.fade-out {
  opacity: 0;
  filter: blur(6px);
}
