/* login.css */
/* Styles for Login and Registration Pages */

.login-page, .register-page {
    /* Use Flexbox on the main element to center the section */
    display: flex;
    flex-direction: column; /* Stack header/content/footer */
    justify-content: center; /* Center section vertically */
    align-items: center; /* Center section horizontally */
    min-height: 100vh; /* Ensure page takes at least full viewport height */
    padding-top: 80px; /* Space for header (adjust if needed) */
    padding-bottom: 40px; /* Space for footer */
    box-sizing: border-box; /* Include padding in height calculation */
    position: relative; /* Needed for positioning the section */
    overflow: hidden; /* Hide particles extending beyond the page bounds */
    background-color: var(--background-color); /* Ensure background color is set */
    transition: background-color 0.5s ease;
}

/* The section containing the form - NOW acts as the full-page background/particle host */
#login-form.section, #register-form.section {
    position: absolute; /* Position relative to .login-page / .register-page */
    top: 0;
    left: 0;
    width: 100vh;
    height: 100vh;
    display: flex; /* Use flex to center the form inside */
    justify-content: center;
    align-items: center;
    padding: 100px 15px 40px 15px; /* Add padding to account for header/footer inside this layer */
    box-sizing: border-box;
    z-index: 1; /* Below the form, above the body */
    background-color: transparent; /* Ensure section itself is transparent */
    border: none;
    box-shadow: none;
    overflow: hidden; /* Contain particles */
}
/* Override section background for even/odd rules if they apply */
.login-page #login-form.section,
.register-page #register-form.section {
    background-color: transparent;
}


/* Target the particle container SPECIFICALLY on login/register pages */
/* Position relative to its parent section, which now covers the page */
.login-page .section-particle-container,
.register-page .section-particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind the form */
    pointer-events: none;
    overflow: hidden;
}


/* The actual form element */
.auth-form {
    max-width: 400px; /* Max width for the form */
    width: 100%; /* Take full width within the centered flex container */
    margin: 0; /* Remove margin auto as parent flex handles centering */
    text-align: left; /* Align text left inside form */
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--card-default-shadow); /* Use theme shadow */
    border: 1px solid var(--border-color);
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.3s ease;
    position: relative; /* Keep relative positioning */
    z-index: 2; /* Ensure form is above section and particles */
    box-sizing: border-box; /* Include padding in width calculation */
    background: transparent;
    backdrop-filter: blur(4px);
}

.auth-form h2 { /* Style the heading inside the form */
    text-align: center;
    margin-bottom: 30px;
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.8em; /* Adjust size */
}


.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block; /* Label on its own line */
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color); /* Use text color for labels */
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%; /* Use 100% width */
    box-sizing: border-box; /* Include padding and border in width */
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background-color: var(--input-background);
    color: var(--text-color);
    font-size: 1em;
    transition: border-color 0.3s ease, background-color 0.5s ease, box-shadow 0.2s ease;
    background: transparent;
    backdrop-filter: blur(4px);
}

.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    outline: none;
}

.dark-mode .auth-form input:focus {
     box-shadow: 0 0 5px rgba(0, 188, 212, 0.3);
}

.auth-form button {
    width: 100%; /* Full width button */
    display: block; /* Ensure it's a block element */
    margin-top: 20px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
    color: var(--text-color);
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    text-decoration: underline;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .login-page, .register-page {
        /* Keep min-height, but adjust padding if header shrinks */
        padding-top: 80px; /* Assume header shrinks */
    }
    /* Adjust section padding for smaller header */
    #login-form.section, #register-form.section {
         padding: 80px 15px 40px 15px; /* Adjust top padding */
    }

    .auth-form {
        padding: 30px; /* Adjust form padding */
        max-width: 90%; /* Allow form to use more width on tablets */
    }
     .auth-form h2 {
         font-size: 1.6em;
     }
}

@media (max-width: 480px) {
     .auth-form {
         padding: 20px; /* Further reduce padding */
         max-width: 95%; /* Allow form to use even more width */
     }
     .auth-form h2 {
         font-size: 1.4em;
         margin-bottom: 20px;
     }
     .auth-form .form-group {
         margin-bottom: 15px;
     }
      .auth-form button {
          padding: 12px 20px; /* Adjust button padding */
          font-size: 1em;
      }
}