@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background: url(image/28.jpg) no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    flex-direction: column; 
}

body::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0.5;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 1;
}

nav {
    position: fixed;
    z-index: 3;
    display: flex;
    justify-content: center; /* Center the logo */
    left: 5%;
    top: 5%;
}

nav a img {
    width: 300px;
}

/* Glassmorphism for the form */
.form-wrapper {
    position: relative;
    left: 20%;
    top: 35%;
    border-radius: 16px;
    padding: 50px;
    width: 450px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.2); /* Semi-transparent */
    backdrop-filter: blur(10px); /* Glass effect */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    z-index: 2;
    flex-direction: column;
    align-items: center;
}

.form-wrapper h2 {
    color: #fff;
    font-size: 2rem;
    text-align: center;
}

.form-wrapper form {
    margin: 25px 0 65px;
}

.form-control {
    height: 50px;
    position: relative;
    margin-bottom: 16px;
}

.form-control input {
    height: 100%;
    width: 100%;
    background: rgba(51, 51, 51, 0.6); /* Transparent input fields */
    border: none;
    outline: none;
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    padding: 0 20px;
}

.form-control input:is(:focus, :valid) {
    background: rgba(68, 68, 68, 0.8);
    padding: 16px 20px 0;
}

.form-control label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    color: #ccc;
    transition: all 0.1s ease;
}

.form-control input:is(:focus, :valid)~label {
    font-size: 0.75rem;
    transform: translateY(-130%);
}

form button {
    width: 100%;
    padding: 16px 0;
    font-size: 1rem;
    background: #e50914;
    color: #fff;
    font-weight: 500;
    border-radius: 4px;
    border: none;
    outline: none;
    margin: 25px 0 10px;
    cursor: pointer;
    transition: 0.1s ease;
}

form button:hover {
    background: #c40812;
}

.form-wrapper a {
    text-decoration: none;
    color: #fff;
}

.form-wrapper a:hover {
    text-decoration: underline;
}

.form-wrapper :where(label, p, small, a) {
    color: #ccc;
}

form .form-help {
    display: flex;
    justify-content: space-between;
}

form .remember-me {
    display: flex;
}

form .remember-me input {
    margin-right: 5px;
    accent-color: #b3b3b3;
}

.form-wrapper p a {
    color: #0071eb;
}

/* Media Queries for Responsive Design */
@media (max-width: 740px) {
    body {
        background-size: cover;
    }
    
    nav, .form-wrapper {
        padding: 20px;
    }

    nav a img {
        width: 140px;
    }

    .form-wrapper {
        width: 100%;
        padding: 20px;
        top: 43%;
    }
    
    .form-wrapper h2 {
        font-size: 1.5rem;
    }

    .form-wrapper form {
        margin: 20px 0 40px;
    }
}
