/* Original styles */
.form-container { /* This class was on main, maybe remove if not needed */
    /* display: flex; */ /* Remove flex if main isn't the flex container */
    /* justify-content: center; */
    /* align-items: flex-start; */
    /* flex-wrap: wrap; */
    padding: 20px 10px; /* Keep padding on main or add to wrappers */
}

.signup-form,
.login-form {
    /* width: 400px; Replaced by wrapper width */
    max-width: 100%;
    padding: 25px;
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    /* margin: 20px; Margin now handled by wrapper */
    background-color: var(--form-background);
    box-sizing: border-box;
}

/* --- New Tab Styles --- */
.tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color-light);
}

.tab-button {
    padding: 10px 25px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--icon-color); /* Use icon color for inactive */
    border-bottom: 3px solid transparent; /* Space for active border */
    margin-bottom: -2px; /* Overlap container border */
    transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-button:hover {
    color: var(--icon-color-hover);
}

.tab-button.active {
    color: var(--primary-color); /* Use primary color for active */
    border-bottom: 3px solid var(--primary-color);
}
/* --- End New Tab Styles --- */


/* --- New Form Wrapper Styles --- */
.form-wrapper {
    display: none; /* Hide wrappers by default */
    width: 450px; /* Define width here */
    max-width: 90%; /* Use percentage for responsiveness */
    margin: 20px auto; /* Center the wrapper */
    box-sizing: border-box;
}

.form-wrapper.visible {
    display: block; /* Show the active wrapper */
}
/* --- End New Form Wrapper Styles --- */


/* Original form element styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: left;
}

input[type="email"],
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color-light);
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input[type="password"],
.password-container input[type="text"] {
    padding-right: 40px; /* Space for the icon */
}

.reveal-password {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--icon-color);
    line-height: 1; /* Prevents button height affecting input */
}

.reveal-password:hover i {
     color: var(--icon-color-hover);
}

.warning {
    color: var(--warning-color);
    font-size: 0.8em;
    margin-top: 5px;
    text-align: left;
    min-height: 1.2em; /* Reserve space */
    display: none; /* Controlled by JS */
}

.form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    min-height: 1.5em; /* Reserve space */
    display: none; /* Controlled by JS */
}

.form-message.success {
    color: var(--success-text);
    background-color: var(--success-background);
    border: 1px solid var(--success-border);
    /* display: block; - Let JS control display */
}

.form-message.error {
    color: var(--error-text);
    background-color: var(--error-background);
    border: 1px solid var(--error-border);
     /* display: block; - Let JS control display */
}


.signup-form button[type="submit"],
.login-form button[type="submit"] {
    width: 100%;
    padding: 12px 20px;
    margin-top: 10px;
}

/* Media Queries (Adjusted for single centered form) */
@media (max-width: 900px) {
    /* .form-container { padding: 15px 5px; } - Keep padding on main */
     .form-wrapper {
        width: 450px; /* Maintain size slightly longer */
    }
}

@media (max-width: 480px) {
    .form-wrapper {
        width: 100%; /* Full width on small screens */
        max-width: 100%;
        margin: 15px 0;
    }
    .signup-form, .login-form {
         padding: 20px; /* Slightly less padding */
    }
    /* .form-container { padding: 10px 5px; } */
    .reveal-password {
       padding: 3px; /* Slightly smaller click area */
    }
    .tab-button {
        padding: 8px 15px; /* Adjust tab padding */
        font-size: 1em;
    }
}