/* ==== RESET ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==== BODY ==== */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(120deg, #0a0f1e, #101b3a);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh; /* más flexible que 100vh en móviles */
  color: #fff;
  padding: 20px;
  overflow-y: auto; /* permite desplazarse si el teclado empuja el contenido */
}

/* ==== CONTAINER ==== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ==== CARD ==== */
.login-card {
  background: rgba(15, 22, 43, 0.95);
  backdrop-filter: blur(8px);
  padding: 45px 35px;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 198, 255, 0.25);
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: fadeIn 1.2s ease;
  transition: transform 0.3s ease;
}

.login-card h1 {
  color: #00c6ff;
  font-size: 1.9em;
  margin-bottom: 12px;
}

.subtitle {
  font-size: 1em;
  color: #bbb;
  margin-bottom: 28px;
}

/* ==== INPUTS ==== */
.login-card input {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  background: #141d33;
  color: #fff;
  margin-bottom: 18px;
  outline: none;
  font-size: 1em;
  transition: box-shadow 0.3s, transform 0.15s;
}

.login-card input:focus {
  box-shadow: 0 0 0 2px #00c6ff;
  transform: scale(1.02);
}

/* ==== BUTTONS ==== */
.btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.3s, transform 0.2s;
}

.btn-primary {
  background: #00c6ff;
  color: #fff;
}

.btn-primary:hover {
  background: #00a0cc;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #444;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

.btn-secondary:hover {
  background: #666;
}

.btn-link {
  background: none;
  border: none;
  color: #00c6ff;
  margin-top: 12px;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.95em;
}

.btn-link:hover {
  color: #00e0ff;
}

/* ==== MESSAGE ==== */
.message {
  margin-top: 18px;
  font-size: 0.95em;
}

.success {
  color: #32ff89;
}

.error {
  color: #ff5f5f;
}

/* ==== REGISTER TEXT ==== */
.register-text {
  margin-top: 28px;
  color: #bbb;
  font-size: 0.9em;
}

.register-text a {
  color: #00c6ff;
  text-decoration: none;
}

.register-text a:hover {
  text-decoration: underline;
}

/* ==== ANIMATION ==== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==== RESPONSIVE ==== */
@media (max-width: 480px) {
  body {
    display: block; /* evita que el teclado desplace el contenido fuera de vista */
    padding: 25px 0;
  }

  .login-card {
    margin: 40px auto;
    padding: 35px 25px;
    max-width: 90%;
    border-radius: 14px;
  }

  .login-card h1 {
    font-size: 1.6em;
  }

  .subtitle {
    font-size: 0.9em;
    margin-bottom: 22px;
  }

  .login-card input {
    font-size: 0.95em;
    padding: 12px;
  }

  .btn {
    padding: 12px;
    font-size: 0.95em;
  }

  .register-text {
    font-size: 0.85em;
    margin-top: 22px;
  }
}
