#welcomeScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Fill the screen vertically */
    background-color: var(--nasa-bg, #f2f2f7); /* USE GLOBAL VAR */
}

/* Login Form Container */
.login-widget {
    background-color: var(--white, #ffffff); /* USE GLOBAL VAR */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    max-width: 320px;
    width: 100%;
    font-family: 'Inter', sans-serif; /* Added for font consistency */
}

/* Labels */
.login-widget label {
    margin-top: 16px;
    color: var(--nasa-text, #555555); /* USE GLOBAL VAR (or a lighter text like #555) */
    font-size: 0.9rem;
    font-weight: 600;
}

/* Input Fields */
.login-widget input {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--light-gray, #d1d1d6); /* USE GLOBAL VAR */
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    transition: border 0.3s ease-in-out;
    background-color: var(--white, #ffffff);
    color: var(--nasa-text, #1c1c1e);
}

.login-widget input:focus {
    outline: none;
    border-color: var(--nasa-blue, #0a84ff); /* USE GLOBAL VAR */
    box-shadow: 0px 0px 5px color-mix(in srgb, var(--nasa-blue, #0a84ff) 20%, transparent); /* USE GLOBAL VAR */
}

/* Password Field Styling */
.login-widget .password-container { /* Specificity for .login-widget */
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.login-widget .password-container input {
    width: 100%;
    padding: 10px;
    padding-right: 40px; /* Make space for eye button */
    border: 1px solid var(--light-gray, #d1d1d6); /* USE GLOBAL VAR */
    border-radius: 4px;
    font-size: 1rem;
}

/* Eye Button */
.login-widget .toggle-password { /* Specificity for .login-widget */
    position: absolute;
    right: 5px;
    top: 50%; /* Adjusted for better centering if input height varies slightly */
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--light-gray, #e0e0e0); /* USE GLOBAL VAR or a light bg */
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 5px;
    transition: background 0.3s ease-in-out;
}

.login-widget .toggle-password:hover {
    background: #c7c7c7; /* Slightly darker gray */
}

.login-widget #eyeImg { /* Specificity for .login-widget */
    max-width: 20px;
    padding: 3px;
    border-radius: 4px;
}

/* Buttons */
.login-widget button {
    margin-top: 16px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px; /* Consistent radius */
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

/* Login Button */
#signInButton { /* Specificity for .login-widget */
    background: var(--nasa-blue, #0a84ff); /* USE GLOBAL VAR */
    color: var(--white, #ffffff); /* USE GLOBAL VAR */
    border: 2px solid var(--nasa-blue, #0a84ff); /* USE GLOBAL VAR */
}

#signInButton:hover {
    background: color-mix(in srgb, var(--nasa-blue, #0a84ff) 85%, black); /* Darken global blue */
    border-color: color-mix(in srgb, var(--nasa-blue, #0a84ff) 85%, black);
    /* color: var(--nasa-blue, #0a84ff); */ /* Keep text white or change as preferred */
}

/* Sign Up Button */
#signUpButton { /* Specificity for .login-widget */
    background: transparent;
    color: var(--nasa-red, #ff3b30); /* USE GLOBAL VAR */
    border: 2px solid var(--nasa-red, #ff3b30); /* USE GLOBAL VAR */
}

#signUpButton:hover {
    background: var(--nasa-red, #ff3b30); /* USE GLOBAL VAR */
    color: var(--white, #ffffff); /* USE GLOBAL VAR */
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .login-widget {
        max-width: 90%;
    }

    .login-widget .password-container input {
        padding-right: 40px; /* Adjust space for the eye icon */
    }

    .login-widget .toggle-password {
        width: 28px;
        height: 28px;
    }

    #eyeImg {
        max-width: 18px;
        background-color: transparent;
    }
}

#authScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px); /* Adjust for header height */
    padding-top: 60px; /* Add padding for header */
    background-color: var(--nasa-bg, #f2f2f7); /* USE GLOBAL VAR */
    font-family: 'Inter', sans-serif; /* Set consistent font for the auth screen */
}

/* Auth Form Container (Shared Styles) */
.auth-widget {
    background-color: var(--white, #ffffff); /* USE GLOBAL VAR */
    padding: 30px; /* Increased padding */
    border-radius: 8px;
    border: 1px solid var(--light-gray, #d1d1d6); /* USE GLOBAL VAR */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    max-width: 380px; /* Slightly wider */
    width: 90%; /* Responsive width */
    font-family: inherit; /* Inherit from #authScreen */
}

/* Headings */
.auth-widget h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--nasa-text, #1c1c1e); /* USE GLOBAL VAR */
    font-weight: 600;
}

/* Labels */
.auth-widget label {
    margin-top: 16px;
    color: var(--nasa-text, #555555); /* USE GLOBAL VAR (or a lighter text) */
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px; /* Increased margin-bottom for more space before the input */
}

/* Input Fields */
.auth-widget input {
    height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--light-gray, #d1d1d6);
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    background-color: var(--white, #ffffff);
    color: var(--nasa-text, #1c1c1e);
    transition: border 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-sizing: border-box;
}


.auth-widget input:focus {
    outline: none;
    border-color: var(--nasa-blue, #0a84ff); /* USE GLOBAL VAR */
    box-shadow: 0px 0px 0px 3px color-mix(in srgb, var(--nasa-blue, #0a84ff) 20%, transparent); /* Adjusted focus shadow */
}

/* Password Field Styling */
.auth-widget .password-container { /* Added .auth-widget for specificity */
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    
}

.auth-widget .password-container input {
    /* This input inherits height, box-sizing, border, border-radius, font-size, width,
       background-color, color, transition, padding-top, padding-bottom, and padding-left
       from the general .auth-widget input style defined above. */
    padding-right: 45px; /* Override only the right padding to make space for the eye icon */
}

/* Eye Button */
.auth-widget .toggle-password { /* Added .auth-widget */
    position: absolute;
    right: 5px; /* Adjusted position */
    top: 50%;   /* Center vertically */
    transform: translateY(-50%);
    width: 32px; /* Adjusted size */
    height: 32px; /* Adjusted size */
    background: transparent; /* Cleaner look */
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent; /* Added transparent border */
    padding: 5px;
    transition: background 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.auth-widget .toggle-password:hover {
    background: color-mix(in srgb, var(--light-gray, #d1d1d6) 30%, transparent); /* Subtle hover */
}

.auth-widget .toggle-password img { /* Added .auth-widget */
    max-width: 20px;
    height: auto; /* Maintain aspect ratio */
    opacity: 0.6; /* Slightly dim */
    transition: opacity 0.3s ease;
}
.auth-widget .toggle-password:hover img { /* Added .auth-widget */
    opacity: 1; /* Full opacity on hover */
}

/* Buttons */
.auth-widget .auth-button { /* Shared button class */
    margin-top: 25px; /* Increased margin */
    padding: 12px 20px; /* Slightly more horizontal padding */
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px; /* Consistent radius */
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    line-height: 1.2; /* Ensure text is centered well */
}

/* Primary Button Style (Login/Sign Up) */
.auth-widget .auth-button.primary { /* Added .auth-widget */
    background: var(--nasa-blue, #0a84ff); /* USE GLOBAL VAR */
    color: var(--white, #ffffff); /* USE GLOBAL VAR */
    border: 2px solid var(--nasa-blue, #0a84ff); /* USE GLOBAL VAR */
}

.auth-widget .auth-button.primary:hover { /* Added .auth-widget */
    background: color-mix(in srgb, var(--nasa-blue, #0a84ff) 85%, black); /* Darken global blue */
    border-color: color-mix(in srgb, var(--nasa-blue, #0a84ff) 85%, black);
}

/* Secondary/Switch Auth Styles */
.auth-widget .switch-auth { /* Added .auth-widget */
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--nasa-text, #1c1c1e); /* USE GLOBAL VAR */
}

.auth-widget .switch-auth a { /* Added .auth-widget */
    color: var(--nasa-blue, #0a84ff); /* USE GLOBAL VAR for links */
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-widget .switch-auth a:hover { /* Added .auth-widget */
    color: color-mix(in srgb, var(--nasa-blue, #0a84ff) 85%, black); /* Darken link on hover */
    text-decoration: underline;
}

/* Utility class to hide elements */
.hidden {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .auth-widget {
        max-width: 90%;
        padding: 20px; /* Adjust padding */
    }

    .auth-widget .password-container input {
        padding-right: 40px; /* Adjust space for the eye icon */
    }

    .auth-widget .toggle-password {
        width: 30px; /* Adjust size */
        height: 30px; /* Adjust size */
    }

    .auth-widget .toggle-password img {
        max-width: 18px;
    }
}

.error-message {
    color: red;
    font-size: 14px;
    margin-top: 5px; 
}

.success-message {
    color: green;
    font-size: 14px;
    margin-top: 5px;
}

/* Styling for password strength indicator (Optional)  */
.password-strength {
  height: 5px;
  margin-top: 5px;
  background-color: #ddd;
  width: 100%;
}

.strength-weak { width: 33%; background-color: #f00; }
.strength-medium { width: 66%; background-color: #ffa500; }
.strength-strong { width: 100%; background-color: #0f0; }