@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&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;
    background: #000;
    color: #fff;
}

section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background: url('bg.jpg') no-repeat;
    background-size: cover;
    background-position: center;
    animation: animateBg 5s linear infinite;
}

@keyframes animateBg {
    100% {
        filter: hue-rotate(360deg);
    }
}

.login-box {
    position: relative;
    width: 400px;
    height: 450px;
    background: transparent;
    border: 2px solid rgba(255, 255, .5);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(15px);
}

h2 {
    
    color: #fff;
    text-align: center;
}

.input-box {
    position: relative;
    width: 310px;
    margin: 30px 0;
    border-bottom: 2px solid #fff;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    font-size: 1em;
    color: #fff;
    pointer-events: none;
    transition: .5s;
}

.input-box input:focus + label,
.input-box input:not(:placeholder-shown) + label,
input:-webkit-autofill + label {
    top: -5px;
    font-size: 12px;
    color: #ffffff;
}

.input-box input {
    width: 100%;
    height: 50px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #fff;
    padding: 0 35px 0 5px;
}

.input-box .icon {
    position: absolute;
    right: 7px;
    color: #fff;
    font-size: 1.2em;
    line-height: 57px;
}

.remember-forgot {
    margin: 15px 0;
    font-size: 0.9em;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.remember-forgot label input {
    margin-right: 3px;
}

.remember-forgot a {
    color: #fff;
    text-decoration: none;
}

.remember-forgot a:hover {
    text-decoration: underline;
}

button {
    width: 100%;
    height: 40px;
    background: #fff;
    border: none;
    outline: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 1em;
    color: #000;
    font-weight: 500;
}

.register-link {
    font-size: .9em;
    color: #fff;
    text-align: center;
    margin: 25px 0 10px;
}

.register-link p a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.register-link p a:hover {
    text-decoration: underline;
}

/* Reset styles for autofill fields to match regular input styling */
input:-webkit-autofill {
    box-shadow: 0 0 0px 1000px transparent inset; /* Ensure background is transparent */
    -webkit-text-fill-color: #fff; /* Maintain the text color */
    font-size: inherit; /* Use the same font size */
    border: none; /* Remove border changes */
}

/* Also for any focus events on autofilled inputs */
input:-webkit-autofill:focus {
    box-shadow: 0 0 0px 1000px transparent inset;
    -webkit-text-fill-color: #fff;
}

/* Ensure the label stays in the correct position when autofill is applied */
input:-webkit-autofill ~ label,
input:-webkit-autofill:focus ~ label {
    top: -15px; /* Keep label floated above */
    font-size: 12px; /* Ensure font size remains small */
    color: #ccc; /* Keep label color consistent */
}


.input-box input {
    background: transparent;
    color: #fff;
}
