@import url("https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap");
@import url("https://use.fontawesome.com/releases/v6.5.1/css/all.css");

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #25252b;
}

* {
  font-family: "Poppins", sans-serif;
  /* Esto ayuda a que el padding no afecte el ancho total de los elementos */
  box-sizing: border-box;
}

@property --a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.box {
  position: relative;
  width: 500px;
  max-width: 92%;
  height: 550px;
  background: repeating-conic-gradient(
    from var(--a),
    #ff2770 0%,
    #ff2770 5%,
    transparent 5%,
    transparent 40%,
    #ff2770 50%
  );
  filter: drop-shadow(0 15px 50px #000);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: rotating 4s linear infinite;
}

@keyframes rotating {
  0% {
    --a: 0deg;
  }

  100% {
    --a: 360deg;
  }
}

.box::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: repeating-conic-gradient(
    from var(--a),
    #45f3ff 0%,
    #45f3ff 5%,
    transparent 5%,
    transparent 40%,
    #45f3ff 50%
  );
  filter: drop-shadow(0 15px 50px #000);
  border-radius: 20px;
  animation: rotating 4s linear infinite;
  animation-delay: -1s;
}

.box::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: #2d2d39;
  border-radius: 15px;
  border: 8px solid #25252b;
}

.login {
  position: absolute;
  inset: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border-radius: 10px;
  background: #00000033;
  color: #fff;
  z-index: 1000;
  box-shadow: inset 0 10px 20px #00000080;
  border-bottom: 2px solid #ffffff80;
  transition: 0.5s;
  overflow: hidden;
}

.loginBx {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  width: 70%;
  transform: translateY(0px);
}

h2 {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.2em;
  width: 100%;
  text-align: center;
}

h2 i {
  color: #ff2770;
  text-shadow: 0 0 5px #ff2770, 0 0 20px #ff2770;
}

input {
  width: 100%;
  padding: 10px 20px;
  margin-bottom: 15px;
  outline: none;
  border: none;
  font-size: 1em;
  color: #fff;
  background: #0000001a;
  border: 2px solid #fff;
  border-radius: 30px;

}

input::placeholder {
  color: #999;
}

input[type="submit"] {
  background: #45f3ff;
  border: none;
  font-weight: 500;
  color: #111;
  cursor: pointer;
  transition: 0.5s;
}

input[type="submit"]:hover {
  box-shadow: 0 0 10px #45f3ff, 0 0 60px #45f3ff;
}

.group {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.group a {
  color: #fff;
  text-decoration: none;
}

.group a:nth-child(2) {
  color: #ff2770;
  font-weight: 600;
}

.password-wrapper {
  display: flex;
  position: relative;
  width: 100%;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-78%); /* Ajustado para subir el icono */
  cursor: pointer;
  font-size: 1.2em;
  color: #fff;
  user-select: none;
}

/* Clase simple para ocultar los formularios que no están activos */
.hidden {
  display: none;
}

/* --- Mobile Responsive Rules para Login y Registro --- */
@media (max-width: 600px) {
  .box {
    width: 95vw; /* Casi todo el ancho disponible */
    height: 600px; /* Un poco más de altura vertical por las dudas */
  }
  
  .login {
    inset: 15px; /* Reducir márgenes gruesos del borde animado en celulares */
  }
  
  .loginBx {
    width: 90%; /* Expandir el formulario interior */
  }
  
  .group {
    flex-direction: column; /* Apilar los textos de "Olvidó su contraseña" y "Crear una" para poder leerlos claramente */
    gap: 15px;
    align-items: center;
    text-align: center;
    font-size: 0.9em;
  }
}
