html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
    /* allows only vertical scroll */
}


body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #ffffffff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.703);
    /* adjust darkness here */
    z-index: -1;
}

.login-container {

    width: 400px;
    padding: 25px;
    border-radius: 8px;
    border: solid 1px;

    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
    background: #00000070;
    border-color: #ffffff66;
    color: #ffffff;
}

h3 {
    text-align: center;
    margin-bottom: 20px;
}

label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.input-group input:focus {
    border-color: rgb(1, 49, 193);
    outline: none;
    box-shadow: 0px 4px 15px rgba(0, 132, 255, 0.16);
}

button {
    width: 100%;
    padding: 10px;
    background: rgb(1, 87, 193);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: rgb(20, 0, 121);
}

/* Error Message Box */
.error-box {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff1a1a;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
    color: #b30000;
    backdrop-filter: blur(4px);
    text-align: center;
}

.error-box ul {
    margin: 0;
    padding-left: 18px;
    list-style: none;
}

.error-box li {
    margin-bottom: 4px;
}


.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: white;
    font-size: 16px;
}


.input-group input {
    width: 100%;
    padding: 10px 45px 10px 35px;
    /* left icon + extra space for toggle */
    border: 1px solid white;
    border-radius: 5px;
    font-size: 14px;
    background: #ffffff59;
    color: white;
    box-sizing: border-box;
    /* include padding in width */
    font-family: inherit;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.53);
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 40px;
    /* fixed distance from right */
    transform: translateY(-50%);
    cursor: pointer;
    color: white;
    font-size: 16px;
    z-index: 2;
}

.profile-image {
    text-align: center;
    margin-bottom: 20px;
}

.profile-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
}

/* Dark Mode Button */
.dark-mode-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 999;
    padding: 8px 12px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: #ffffff88;
    color: #000;
    transition: 0.3s;
    width: auto;

}

.dark-mode-btn:hover {
    background: #ffffffcc;
}

/* Dark Mode Styles */
.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}

.dark-mode .login-container {
    background: #ffffff36;
    border-color: white;

}

.input-group input {
    background: #ffffff22;
    border-color: #ffffff55;
    color: #fff;
}


.dark-mode .toggle-password {
    color: #fff;
}

.dark-mode::before {


    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    /* adjust darkness here */
    z-index: -1;
}

/* ========== Responsive ========== */

/* Small tablets and phones */
@media (max-width: 768px) {
    .login-container {
        width: 300px;
        padding: 20px;
    }

    .input-group input {
        padding: 10px 40px 10px 35px;
        font-size: 13px;
    }

    .toggle-password {
        right: 40px;
        font-size: 15px;
    }

    button {
        font-size: 15px;
        padding: 10px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .login-container {
        width: 80%;
        padding: 15px;
    }

    h3 {
        font-size: 18px;
    }

    .input-group input {
        padding: 10px 35px 10px 30px;
        font-size: 13px;
    }

    .toggle-password {
        right: 35px;
        font-size: 14px;
    }

    button {
        font-size: 14px;
        padding: 8px;
    }
}

/* Footer inside login box */
.login-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Line above footer */
.login-container hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.75);
    margin: 20px 0 10px 0;
}

/* Dark mode footer */
.dark-mode .login-footer {
    color: rgba(255, 255, 255, 0.6);
}

.dark-mode .login-container hr {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

/* Responsive footer */
@media (max-width: 480px) {
    .login-footer {
        font-size: 11px;
        margin-top: 12px;
    }
}