/* Enhanced Authentication Modal Styles */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.auth-modal-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    animation: slideUp 0.3s ease forwards;
}

.auth-modal-header {
    position: relative;
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.auth-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.auth-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.auth-welcome h2 {
    margin: 0 0 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.auth-welcome p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.4;
}

.auth-modal-body {
    padding: 2rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-form-modern {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    position: relative;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.form-input-modern {
    width: 100%;
    padding: 16px 50px 16px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fafbfc;
}

.form-input-modern:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.field-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 12px;
    font-size: 1.2rem;
    opacity: 0.5;
}

.password-toggle-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.password-toggle-btn:hover {
    opacity: 1;
}

.password-strength {
    margin-top: 8px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.password-strength.weak {
    color: #ef4444;
}

.password-strength.medium {
    color: #f59e0b;
}

.password-strength.strong {
    color: #10b981;
}

.auth-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-error-message::before {
    content: "⚠️";
}

.auth-success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-success-message::before {
    content: "✅";
}

.auth-submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0 1.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
    z-index: 1;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.auth-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-1px);
}

.social-btn img {
    width: 20px;
    height: 20px;
}

.auth-terms {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.5;
}

.auth-terms a {
    color: var(--primary);
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        transform: scale(1) translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .auth-modal-header,
    .auth-modal-body {
        padding: 1.5rem;
    }
    
    .auth-welcome h2 {
        font-size: 1.5rem;
    }
    
    .form-input-modern {
        padding: 14px 45px 14px 14px;
    }
}
