/* Base Login Modal Styles */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal.hidden {
    display: none;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.login-content {
    position: relative;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.login-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.login-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.login-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

/* Enhanced Authentication Modal Styles */

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.auth-tab:hover {
    color: #3b82f6;
    background-color: #f8fafc;
}

.auth-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background-color: #f8fafc;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-error {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.auth-error.error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-error.success {
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.auth-submit:hover {
    background-color: #2563eb;
}

.auth-submit:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.auth-links {
    text-align: center;
    margin-top: 15px;
}

.auth-links a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Form improvements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:invalid {
    border-color: #dc2626;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-content {
        margin: 20px;
        padding: 20px;
    }
    
    .auth-tab {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .auth-submit {
        padding: 14px;
        font-size: 16px;
    }
}