@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* Forzar fuentes del proyecto (definidas en base.css) */
body {
  font-family: var(--fuente-textos) !important;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fuente-titulos) !important;
}

/* Centrar el contenedor */
main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  min-height: calc(100vh - 120px);
}

body {
  background: url('/static/img/background.jpeg') no-repeat center / cover;
  background-attachment: fixed;
  /* Ajustar el tamaño de la imagen de fondo */
  background-size: cover; /* La imagen ocupará todo el espacio disponible */
  background-position: center; /* Centrar la imagen */
  background-repeat: no-repeat; /* Evitar que la imagen se repita */
}

/* Contenedor principal */
.wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  min-height: 440px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 192, 203, 0.3);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 25px rgba(255, 192, 203, 0.2);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: height 0.2s ease;
}

.wrapper.active {
  height: 520px;
}

/* Formularios */
.wrapper .form-box {
  width: 100%;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(31, 0, 31, 0.15);
  transition: transform 0.3s ease;
}

.wrapper .form-box.login {
  display: block;
}

.wrapper.active .form-box.login {
  display: none;
  opacity: 0;
}

.wrapper .form-box.register {
  position: absolute;
  transform: translateX(400px);
  opacity: 0;
  display: none;
}

.wrapper.active .form-box.register {
  transform: translateX(0);
  opacity: 1;
  display: block;
}

/* Título */
.form-box h2 {
  font-size: 2em;
  color: #ffb6c1;
  text-align: center;
}

/* Inputs */
.input-box {
  position: relative;
  width: 100%;
  height: 50px;
  border-bottom: 2px solid #ffb6c1;
  margin: 30px 0;
}

.input-box label {
  position: absolute;
  top: 50%;
  left: 5px;
  transform: translateY(-50%);
  color: #fff;
  font-weight: 500;
  pointer-events: none;
  transition: 0.3s;
}

.input-box input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1em;
  color: #fff;
  padding: 0 35px 0 5px;
}

/* EFECTO levantar label (compatible con Django forms) */
.input-box input:focus ~ label,
.input-box input:valid ~ label {
  top: -5px;
  color: #ff69b4;
}

/* Iconos */
.input-box .icon {
  position: absolute;
  right: 8px;
  font-size: 1.2em;
  color: #ffb6c1;
  line-height: 57px;
}

/* Recordarme y olvidar contraseña */
.remember-forgot {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  margin: -15px 0 15px;
  color: #fff;
}

.remember-forgot label input {
  accent-color: #ff69b4;
  margin-right: 3px;
}

.remember-forgot a {
  color: #ffb6c1;
  text-decoration: none;
}

.remember-forgot a:hover {
  text-decoration: underline;
}

/* Botón */
.btn {
  width: 100%;
  height: 45px;
  background: #ff69b4;
  border: none;
  outline: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  color: #fff;
  font-weight: 600;
  transition: 0.3s;
}
.form-box register{
  margin-top: -30px;
}

.btn:hover {
  background: #ff85c1;
  box-shadow: 0 0 10px #ff69b4;
}

/* Enlaces */
.login-register {
  font-size: 0.9em;
  text-align: center;
  margin: 25px 0 10px;
  color: #fff;
}

.login-register a,
.login-register p a {
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.login-register a:hover,
.login-register p a:hover {
  color: #ffb6c1 !important;
  text-decoration: underline;
}

/* Ajustar el contenedor del formulario */
form {
    max-height: 90vh; /* Limitar la altura máxima al 90% de la ventana */
    overflow-y: auto; /* Agregar desplazamiento vertical si el contenido excede la altura */
    margin: auto; /* Centrar el formulario */
}

/* Responsive */
@media (max-width: 420px) {
  .wrapper {
    padding: 20px;
    min-height: 520px;
  }

  .form-box {
    padding: 20px;
  }

  .input-box {
    height: 48px;
    margin: 18px 0;
  }
}
