.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-light);
    position: relative;
}

.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin: var(--space-6);
}

.auth-card {
    width: 50%;
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
}

.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);
}

.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-10);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-medium);
    cursor: pointer;
    transition: color var(--transition);
}

.toggle-password {
    right: var(--space-4) !important; /* Forces placement in the right corner */
}

.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 */
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }
    
    .auth-card, .auth-image {
        width: 100%;
    }
    
    .auth-image {
        min-height: 200px;
        order: -1;
    }
    
    .image-content h2 {
        font-size: var(--text-2xl);
    }
    
    .image-content p {
        font-size: var(--text-base);
    }
    
    .auth-card {
        padding: var(--space-6);
    }
}

@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);
    }
}

/* ... (Existing auth.css content) ... */

/* --- New Premium Dropdown Styles for Language Selector FIX --- */

/* Target the select element specifically */
.input-with-icon.language-select-wrapper select#language {
    /* Reset default select appearance to take control */
    -webkit-appearance: none; /* CRITICAL FIX for Chrome/Safari */
    -moz-appearance: none;    /* CRITICAL FIX for Firefox */
    appearance: none;
    
    /* Apply premium styling and sizing */
    border: 2px solid var(--border-medium);
    font-weight: 500; 
    color: var(--text-dark);
    
    /* CRITICAL FIX: Ensure padding is correct for icon (left) and custom arrow (right) */
    padding: var(--space-4) var(--space-10) var(--space-4) var(--space-12); 
    
    background-color: var(--bg-white);
    transition: all var(--transition);
    
    /* Hide the native arrow/icon background some browsers use */
    background-image: none;
}

/* Add custom focus effect */
.input-with-icon.language-select-wrapper select#language:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
    outline: none;
}

/* Ensure the icon for the language select is positioned correctly */
.language-select-wrapper .fa-language {
    left: var(--space-4); 
    color: var(--primary-dark);
    z-index: 3;
}

/* --- Toast Notification System --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    background-color: var(--bg-white, #fff);
    color: var(--text-dark, #333);
    padding: 16px 20px;
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    pointer-events: auto;
    border-left: 4px solid var(--primary-color);
}

.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.toast.info { border-left-color: #3b82f6; }

.toast i {
    font-size: 1.2rem;
}

.toast.success i { color: #10b981; }
.toast.error i { color: #ef4444; }
.toast.warning i { color: #f59e0b; }
.toast.info i { color: #3b82f6; }

.toast.fade-out {
    animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* Dark theme support for toasts */
body.dark-theme .toast {
    background-color: #2d2d2d;
    color: #eee;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}