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

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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    background: linear-gradient(45deg, #360033, #0b8793);
}

.login-box {
    position: relative;
    width: 90%;
    max-width: 400px;
    height: auto;
    background: linear-gradient(45deg, #283c86, #45a247);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

h2 {
    font-size: 2em;
    color: #ffffff;
    text-align: center;
    transition: .5s ease;
}

.input-check:checked~h2 {
    color: #FFBF00;
    text-shadow: 0 0 15px #FFBF00, 0 0 30px #FFBF00;
}

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

.input-box .input-line {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: #ffffff;
    transition: .5s ease;
}

.input-check:checked~.input-box .input-line {
    background: #FFBF00;
    box-shadow: 0 0 10px #FFBF00;
}

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

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

.input-check:checked~.input-box label {
    color: #FFBF00;
    text-shadow: 0 0 10px #FFBF00;
}

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

.input-check:checked~.input-box input {
    color: #FFBF00;
    text-shadow: 0 0 5px #FFBF00;
}

.input-box .icon {
    position: absolute;
    right: 8px;
    color: #ffffff;
    font-size: 1.2em;
    line-height: 57px;
    transition: .5s ease;
}

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

.remember-forgot {
    color: #ffffff;
    font-size: .9em;
    margin: -15px 0 15px;
    display: flex;
    justify-content: space-between;
    transition: .5s ease;
}

.input-check:checked~.remember-forgot {
    color: #FFBF00;
    text-shadow: 0 0 10px #FFBF00;
}

.remember-forgot label input {
    accent-color: #ffffff;
    margin-right: 3px;
    transition: .5s ease;
}

.input-check:checked~.remember-forgot label input {
    accent-color: #FFBF00;
}

.remember-forgot a {
    color: #ffffff;
    text-decoration: none;
    transition: color .5s ease;
}

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

.input-check:checked~.remember-forgot a {
    color: #FFBF00;
}

button {
    width: 100%;
    height: 40px;
    background: #ffffff;
    border: none;
    outline: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 1em;
    color: #191919;
    font-weight: 500;
    transition: .5s ease;
}

.input-check:checked~button {
    background: #FFBF00;
    box-shadow: 0 0 15px #FFBF00, 0 0 15px #FFBF00;
}

.register-link {
    color: #ffffff;
    font-size: .9em;
    text-align: center;
    margin: 25px 0 10px;
    transition: .5s ease;
}

.input-check:checked~.register-link {
    color: #FFBF00;
    text-shadow: 0 0 10px #FFBF00;
}

.register-link p a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color .5s ease;
}

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

.input-check:checked~.register-link p a {
    color: #FFBF00;
}

/* The yellow bar at the top */
.login-light {
    position: fixed;
    top: 0; /* Center vertically relative to the body */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust to stay at the center */
    width: 100%;
    max-width: 500px; /* Limit its size */
    height: 10px; /* Maintain the height of the yellow line */
    background: #FFBF00; /* Keep the yellow color */
    border-radius: 20px;
    z-index: -1; /* Keep it behind other elements */
}

/* The “torch effect” overlay */
.light {
    position: absolute;
    top: -200%;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.3) -50%,
            rgba(255, 255, 255, 0) 90%);
    clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
    pointer-events: none;
    transition: .5s ease;
}

.input-check:checked~.light {
    top: -90%;
}

/* The toggle switch */
.toggle {
    position: absolute;
    top: 20px;
    right: -70px;
    width: 60px;
    height: 120px;
    background: #191919;
    border-radius: 10px;
    transition: right 0.3s ease;
}

.toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 80%;
    background: #000000;
}

.toggle::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: #333333;
    border: 2px solid #191919;
    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: translateX(-50%);
    color: #ffffff;
    font-size: 1em;
    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: #FFBF00;
    text-shadow: 0 0 15px #FFBF00,
        0 0 30px #FFBF00,
        0 0 45px #FFBF00,
        0 0 60px #FFBF00;
}

/* Media queries for responsiveness */
@media (max-width: 1024px) {
    body {
        background: linear-gradient(45deg, #360033, #0b8793) fixed;
        background-size: cover;
    }

    .toggle {
        right: -90px;
    }
}

@media (max-width: 666px) {
    body {
        background: linear-gradient(45deg, #360033, #0b8793) fixed;
        background-size: cover;
    }

    .toggle {
        right: -68px;
    }
}

@media (max-width: 768px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        padding: 0 10px;
    }


    body {
        background: linear-gradient(45deg, #360033, #0b8793) fixed;
        background-size: cover;
    }

    h2 {
        font-size: 1.8em;
    }

    .input-box {
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        padding: 0 10px;
    }

    body {
        background: linear-gradient(45deg, #360033, #0b8793) fixed;
        background-size: cover;
    }

    h2 {
        font-size: 1.5em;
    }

    .input-box label {
        font-size: 0.9em;
    }

    .toggle {
        right: -70px;
    }
}