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

:root {
    /* colors */
    --body-color: #0f0a06;
    --white-color: #fff;
    --container-color: #1a1a1a96;
    --light-bacco: #00FFDD;
    --yellow-light: #FFED00;

    /* font sizes */
    --h2-font-size: 2em;
    --small-font-size: 1em;
    --medium-font-size: 1.2em;
    --smaller-font-size: 0.9em;
}

* {
    margin: 0;
    font-family: "Poppins";
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--body-color);
    overflow: hidden;
}

.login-container {
    position: relative;
    width: 400px;
    height: 450px;
    background-color: var(--container-color);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

h2 {
    font-size: var(--h2-font-size);
    color: var(--white-color);
    text-align: center;
    transition: 0.5s ease;
}

.input-check:checked ~ h2 {
    color: var(--light-bacco);
    text-shadow: 0 0 15px var(--light-bacco),
                 0 0 30px var(--light-bacco);
}

.input-box {
    position: relative;
    width: 310px;
    margin: 30px 0;
}

.input-box .input-line {
    position: absolute;
    width: 100%;
    bottom: -2px;
    left: 0;
    height: 2.5px;
    background: var(--white-color);
    transition: 0.5s ease;
}

.input-check:checked ~ .input-box .input-line {
    background: var(--light-bacco);
    box-shadow: 0 0 10px var(--light-bacco);
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    font-size: var(--small-font-size);
    pointer-events: none;
    color: var(--white-color);
    transition: .5s ease;
}

.input-box input:focus ~ label,
.input-box input:valid ~ label {
    top: -5px;
}

.input-check:checked ~ .input-box label {
    color: var(--light-bacco);
    text-shadow: 0 0 10px var(--light-bacco);
}

.input-box input {
    width: 100%;
    height: 50px;
    background: transparent;
    border: none;
    outline: none;
    font-size: var(--small-font-size);
    color: var(--white-color);
    padding: 0 35px 0 5px;
    transition: 0.5s ease;
}

.input-check:checked ~ .input-box input {
    color: var(--light-bacco);
    text-shadow: 0 0 5px var(--light-bacco);
}

.input-box .icon {
    position: absolute;
    right: 8px;
    color: var(--white-color);
    font-size: var(--medium-font-size);
    line-height: 57px;
    transition: 0.5s;
}

.input-check:checked ~ .input-box .icon {
    color: var(--light-bacco);
    filter: drop-shadow(0 0 5px --light-bacco);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    color: var(--white-color);
    font-size: var(--smaller-font-size);
    margin: -15px 0 15px;
    transition: 0.5s ease;
}

.input-check:checked ~ .remember-forgot {
    color: var(--light-bacco);
    text-shadow: 0 0 10px var(--light-bacco);
}

.remember-forgot label input {
    accent-color: var(--white-color);
    margin-right: 3px;
    transition: 0.5s ease;
}

.input-check:checked ~ .remember-forgot label input {
    accent-color: var(--light-bacco);
}

.remember-forgot a {
    color: var(--white-color);
    text-decoration: none;
    transform: color .5s ease
}

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

.input-check:checked ~ .remember-forgot a {
    color: var(--light-bacco);
}

button {
    width: 100%;
    height: 40px;
    background: var(--white-color);
    border-radius: 10px;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: var(--small-font-size);
    color: var(--body-color);
    font-weight: 500;
    transition: 0.5s ease;
}

.input-check:checked ~ button {
    background: var(--light-bacco);
    box-shadow: 0 0 15px var(--light-bacco);
}

.register-link {
    color: var(--white-color);
    font-size: var(--smaller-font-size);
    text-align: center;
    margin: 25px 0 10px;
    transition: 0.5s ease;
}

.input-check:checked ~ .register-link {
    color: var(--light-bacco);
    text-shadow: 0 0 10px var(--light-bacco);
}

.register-link p a {
    color: var(--white-color);
    text-decoration: none;
    font-weight: 550;
    transition: 0.5s ease;
}

.input-check:checked ~ .register-link p a {
    color: var(--light-bacco);
}

.register-link p a:hover {
    text-decoration: underline;
}

/* LUZ redonda arreglada */
.login-light {
  width: 18px;
  height: 18px;
  background: #333;
  border-radius: 50%;
  box-shadow: none;
  transition: 0.4s;
  position: absolute;
  top: 3px;
  right: 3px;
  overflow: hidden;
}

.login-light::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, var(--yellow-light), transparent);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.input-check:checked ~ .toggle .login-light::before {
  opacity: 1;
}

/* TOGGLE (interruptor) */
.toggle {
    position: absolute;
    top: 20px;
    width: 60px;
    height: 120px;
    background: var(--container-color);
    right: -70px;
    border-radius: 10px;
}

.toggle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 80%;
    background: var(--body-color);
}

.toggle::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translate(-50%);
    width: 45px;
    height: 45px;
    background: #333;
    border: 2px solid var(--container-color);
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, .5);
    transition: .5s ease;
}

.input-check:checked ~ .toggle::after {
    top: 65px;
}

.input-check {
    position: absolute;
    right: -70px;
    z-index: 1;
    opacity: 0;
}

.toggle .text {
    position: absolute;
    top: 17px;
    left: 50%;
    transform: translate(-50%);
    color: var(--white-color);
    font-size: var(--small-font-size);
    z-index: 1;
    text-transform: uppercase;
    pointer-events: none;
    transition: .5s ease;
}

.toggle .text.off {
    opacity: 1;
}

.input-check:checked ~ .toggle .text.off {
    top: 76px;
    opacity: 0;
}

.toggle .text.on {
    opacity: 0;
}

.input-check:checked ~ .toggle .text.on {
    top: 76px;
    opacity: 1;
    color: var(--light-bacco);
    text-shadow: 0 0 15px var(--light-bacco),
                 0 0 30px var(--light-bacco),
                 0 0 45px var(--light-bacco),
                 0 0 60px var(--light-bacco);
}

/* SCROLL CONTENEDOR */
.form-container {
  max-height: 90vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: var(--container-color);
  padding: 30px 40px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 255, 221, 0.4);
  width: 380px;
}

/* TÍTULO PRINCIPAL */
.form-container > h1 {
  text-align: center;
  color: var(--light-bacco);
  margin-bottom: 20px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  font-size: 2em;
  user-select: none;
}
