/* -------------------------------------------------------------------------------- */
/* ! THEME VARIABLES & BASE STYLES */
/* -------------------------------------------------------------------------------- */

:root {
    --link-color-main: #4da6ff; /* Bright Blue Accent */
    --text-color-light: #f0f0f0; /* Near-white text */
    --card-bg-transparent: rgba(40, 40, 40, 0.5); /* Transparent Dark grey for container */
    --main-bg: #121212; /* Very dark background */
    --input-line: rgba(240, 240, 240, 0.3); /* Subtle white line for input */
    --focus-glow: rgba(77, 166, 255, 0.7); /* Blue glow/shadow */
    --input-bg-transparent: rgba(255, 255, 255, 0.05); /* Very slight white tint for inputs */
}

*, ::before, ::after {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    box-sizing: border-box;
}

/* Helper class to hide labels visually but keep them for accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* -------------------------------------------------------------------------------- */
/* ! BODY & LAYOUT (Uses a background image placeholder for the blur effect) */
/* -------------------------------------------------------------------------------- */

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--main-bg); 
    color: var(--text-color-light);
    padding: 20px;
}

/* Simple class to simulate a dynamic background for the blur effect */
.background-placeholder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Replace this URL with an actual background image for the best effect */
    background-image: url('https://images.unsplash.com/photo-1517849845500-ed758a03a628?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    z-index: -2; /* Place behind the form container */
}

/* -------------------------------------------------------------------------------- */
/* ! FORM CONTAINER (The "Glassy Card") */
/* -------------------------------------------------------------------------------- */

.form-container {
    padding: 50px 30px;
    /* Glassmorphism Effect */
    background: var(--card-bg-transparent); /* Semi-transparent dark background */
    backdrop-filter: blur(10px); /* The key blurring effect */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); /* Subtle floating shadow */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle white border */
    width: 90%;
    max-width: 360px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(30px);}
    to {opacity: 1; transform: translateY(0);}
}

form {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Increased gap for floating feel */
    width: 100%;
}

h1 {
    color: var(--link-color-main); 
    font-weight: 700;
    font-size: 2.2rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(77, 166, 255, 0.5); /* Glowing title */
}

/* -------------------------------------------------------------------------------- */
/* ! INPUT GROUP STYLES (Minimalist Bar Inputs) */
/* -------------------------------------------------------------------------------- */

.form-q {
    position: relative;
    width: 100%;
}

/* Styling for both text and password inputs */
.form-q input[type="text"],
.form-q input[type="password"] {
    width: 100%;
    padding: 10px 0; /* Padding is top/bottom only */
    border: none;
    border-bottom: 2px solid var(--input-line); /* The bar underneath */
    background-color: transparent; /* Must be transparent */
    color: var(--text-color-light);
    font-size: 1.1rem;
    transition: border-bottom-color 0.3s, box-shadow 0.3s;
    outline: none; /* Remove default focus outline */
    border-radius: 0; /* Important for bar look */
    text-align: center;
}

/* Placeholder style */
.form-q input::placeholder {
    color: rgba(240, 240, 240, 0.6);
    transition: color 0.3s;
    text-align: center;
}

/* Input focus style */
.form-q input:focus {
    border-bottom-color: var(--link-color-main); /* Blue line on focus */
    box-shadow: 0 1px 0 0 var(--link-color-main); /* Creates a subtle line shadow */
}


/* -------------------------------------------------------------------------------- */
/* ! PASSWORD TOGGLE IMPLEMENTATION */
/* -------------------------------------------------------------------------------- */

.password-input-control {
    position: relative;
    display: flex;
    align-items: center;
}

/* Adjust input padding to prevent text from overlapping the icon */
.password-input-control input {
    /* Need more padding on the right for the icon button */
    padding-right: 40px; 
}

/* The eye icon button */
.toggle-password {
    position: absolute;
    right: 0; /* Position from the right edge of the input */
    top: 50%;
    transform: translateY(-50%); 
    
    background: none;
    border: none;
    cursor: pointer;
    color: var(--link-color-main);
    font-size: 1.1rem;
    padding: 8px;
    line-height: 1; 
    transition: color 0.2s;
    z-index: 2; 
}

.toggle-password:hover {
    color: #66b3ff;
}

/* -------------------------------------------------------------------------------- */
/* ! SUBMIT BUTTON & MESSAGES */
/* -------------------------------------------------------------------------------- */

button[type="submit"] {
    background-color: var(--link-color-main);
    color: var(--main-bg); 
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.3s, box-shadow 0.3s;
    margin-top: 10px;
}

button[type="submit"]:hover {
    background-color: #66b3ff; 
    box-shadow: 0 0 15px var(--focus-glow); /* Stronger glow on hover */
}

/* Error Message Style */
.error-message { 
    display: block; 
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    color: #ff4d4d; 
    padding: 10px;
    margin-bottom: 10px;
    /* Glassy error background */
    background-color: rgba(255, 77, 77, 0.1); 
    border: 1px solid #ff4d4d;
    border-radius: 5px;
}


/* -------------------------------------------------------------------------------- */
/* ! SCROLLBAR */
/* -------------------------------------------------------------------------------- */

/* Custom Scrollbar Styles (for Webkit browsers: Chrome, Safari) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--main-bg); border-radius: 10px; }
::-webkit-scrollbar-thumb {
    background-color: rgba(77, 166, 255, 0.3); /* Slightly transparent for 'glass' feel */
    border-radius: 10px;
    border: 3px solid var(--main-bg);
}
::-webkit-scrollbar-thumb:hover { background-color: var(--link-color-main); }



/* --- FIX: Ensure Font Awesome Icon Displays --- */

/* Target the icon specifically */
.toggle-password i.fa-solid {
    /* Ensure the font family is set to Font Awesome for the icon to render */
    font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free";
    font-weight: 900; /* Use 'solid' weight for full icon display */
    
    /* Ensure display and visibility */
    display: inline-block;
    color: var(--link-color-main); /* Force it to use your accent color */
    font-size: 1.1rem; /* Ensure consistent size */
    
    /* Remove any potential scaling issues from previous CSS */
    transform: none !important;
}

/* Ensure the button containing the icon doesn't hide it */
.toggle-password {
    background: transparent !important; /* Make sure no background is covering it */
    padding: 0; /* Remove conflicting padding */
    line-height: 1;
}