.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-light);
    position: relative;
    overflow-y: auto !important;
    padding: 2rem 0;
    height: auto;
}

.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background-color: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: visible;
    margin: 1.5rem;
    max-height: none;
}

.auth-card {
    width: 50%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    max-height: none;
}

.auth-image {
    width: 50%;
    background-image: url('https://images.unsplash.com/photo-1513258496099-48168024aec0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center;
    padding: var(--space-6);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.7));
    z-index: 1;
}

.image-content {
    position: relative;
    z-index: 2;
}

.image-content h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
    font-weight: 700;
}

.image-content p {
    font-size: var(--text-lg);
    max-width: 80%;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.logo h1 {
    color: var(--primary-color);
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.auth-subtitle {
    color: var(--text-medium);
    margin-top: var(--space-2);
}

.auth-form {
    margin-bottom: var(--space-6);
    overflow-y: visible;
    max-height: none;
}

.form-group {
    margin-bottom: var(--space-5);
}

.label-with-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--text-dark);
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    width: 100%;
    padding: var(--space-4) var(--space-4) var(--space-4) var(--space-12);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-medium);
    font-size: var(--text-base);
    background-color: var(--bg-white);
    transition: all var(--transition);
}

.input-with-icon input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.input-with-icon > i:first-child {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-medium);
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-medium);
    cursor: pointer;
    transition: color var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
    font-size: var(--text-base);
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.25);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(16, 185, 129, 0.3);
}

.full-width {
    width: 100%;
}

.divider {
    position: relative;
    text-align: center;
    margin: var(--space-6) 0;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-light);
}

.divider span {
    position: relative;
    background-color: var(--bg-white);
    padding: 0 var(--space-4);
    color: var(--text-medium);
    font-size: var(--text-sm);
}

.social-auth {
    margin-bottom: var(--space-6);
}

.google-btn {
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-sm);
    gap: var(--space-3);
    font-weight: 500;
}

.google-btn:hover {
    background-color: #f8f9fa;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.auth-footer {
    text-align: center;
    color: var(--text-medium);
    font-size: var(--text-sm);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.auth-footer-nav {
    position: absolute;
    bottom: var(--space-4);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-6);
}

.auth-footer-nav a {
    color: var(--text-medium);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition);
}

.auth-footer-nav a:hover {
    color: var(--primary-color);
}

.language-selector {
    display: flex;
    gap: var(--space-4);
}

.language-selector a {
    color: var(--text-medium);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: all var(--transition);
}

.language-selector a.active {
    color: var(--primary-color);
    font-weight: 500;
}

.language-selector a:hover {
    color: var(--primary-dark);
}

/* Username availability checker */
.username-availability-indicator {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
}

.text-success {
    color: var(--success);
}

.text-error {
    color: var(--error);
}

.text-warning {
    color: var(--warning);
}

/* Adjust the position of the eye icon when username checker is present */
.input-with-icon .toggle-password {
    right: calc(var(--space-4) + 70px); /* Give space for the availability text */
}

/* Global scrolling fix */
html, body {
    overflow-y: auto !important;
    position: static !important;
    height: auto !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 0;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        position: static;
    }
    
    .auth-wrapper {
        flex-direction: column;
        margin: 0;
        border-radius: 0;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    
    .auth-card, .auth-image {
        width: 100%;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        overflow-y: auto;
    }
    
    .auth-image {
        min-height: 200px;
        order: -1;
    }
    
    .image-content h2 {
        font-size: var(--text-2xl);
    }
    
    .image-content p {
        font-size: var(--text-base);
    }
    
    html, body {
        overflow-y: auto !important;
        position: static !important;
        height: auto !important;
    }
}

@media (max-width: 576px) {
    .auth-wrapper {
        margin: var(--space-2);
    }
    
    .auth-card {
        padding: var(--space-4);
    }
    
    .auth-image {
        min-height: 150px;
    }
    
    .auth-footer-nav {
        flex-direction: column;
        align-items: center;
        gap: var(--space-2);
        position: static;
        margin-top: var(--space-4);
    }
}
