/* Authentication Pages Styling */

.auth-main {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #ebecec 100%);
}

.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-card {
    background: var(--background-color);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgb(255, 255, 255);
    padding: 40px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #007bff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--background-color);
    font-size: 32px;
}

.success-icon {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.auth-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.auth-header p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* Social Login Buttons */
.social-login {
    margin-bottom: 25px;
}

.social-btn {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
    border-color: #db4437;
    color: #db4437;
}

.github-btn:hover {
    border-color: #333;
    color: #333;
}

.linkedin-btn:hover {
    border-color: #0077b5;
    color: #0077b5;
}

.social-btn i {
    font-size: 20px;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.divider span {
    background: var(--background-color);
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

/* Form Styling */
.auth-form {
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    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: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Checkbox Styling */
.checkbox-group {
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--background-color);
    font-size: 12px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), #007bff);
    color: var(--background-color);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 82, 204, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.auth-footer p {
    margin-bottom: 10px;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

.link-btn:hover {
    color: var(--accent-color);
}

/* Success Card */
.success-card {
    border: 2px solid #28a745;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-main {
        padding: 20px 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .social-btn {
        font-size: 14px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        max-width: 100%;
    }
    
    .auth-card {
        padding: 25px 20px;
        margin: 0 10px 20px;
    }
    
    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Loading States */
.auth-btn.loading {
    position: relative;
    color: transparent;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--background-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error States */
.form-group.error input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Success States */
.form-group.success input {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}


/* Enhanced Authentication Styling */

/* Navigation Enhancement for Auth Pages */
.navbar .nav-links li:last-child a,
.navbar .nav-links li:nth-last-child(2) a {
    background: linear-gradient(135deg, var(--primary-color), #007bff);
    color: var(--background-color);
    padding: 8px 16px;
    border-radius: 20px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.navbar .nav-links li:last-child a:hover,
.navbar .nav-links li:nth-last-child(2) a:hover {
    background: linear-gradient(135deg, var(--accent-color), #ffc107);
    color: var(--text-color);
    transform: translateY(-2px);
}

/* Enhanced Form Animations */
.form-group {
    position: relative;
    overflow: hidden;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    transform: translateY(-25px) scale(0.8);
    color: var(--primary-color);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--background-color);
    padding: 0 5px;
}

.form-group input {
    padding-top: 20px;
}

/* Floating Label Effect */
.floating-label {
    position: relative;
}

.floating-label input {
    padding: 20px 15px 8px 15px;
}

.floating-label label {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 16px;
    color: #999;
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--background-color);
    padding: 0 5px;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 12px;
    color: var(--primary-color);
}

/* Enhanced Social Buttons */
.social-btn {
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.social-btn:hover::before {
    left: 100%;
}

/* Progress Indicator for Forms */
.form-progress {
    width: 100%;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Enhanced Success States */
.form-group.success input {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 2.94 2.94L8.5 6.4l.94.94L6.5 10.27z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Enhanced Error States */
.form-group.error input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.5 5.5 1 1m0-1-1 1'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Strength Indicator for Password */
.password-strength {
    margin-top: 8px;
    display: flex;
    gap: 4px;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: #e1e5e9;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.strength-bar.weak {
    background: #dc3545;
}

.strength-bar.medium {
    background: #ffc107;
}

.strength-bar.strong {
    background: #28a745;
}

.strength-text {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

.strength-text.weak {
    color: #dc3545;
}

.strength-text.medium {
    color: #ffc107;
}

.strength-text.strong {
    color: #28a745;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar .nav-links li:last-child a,
    .navbar .nav-links li:nth-last-child(2) a {
        background: none;
        color: var(--text-color);
        padding: 0;
        border-radius: 0;
        margin-left: 0;
    }
    
    .navbar .nav-links li:last-child a:hover,
    .navbar .nav-links li:nth-last-child(2) a:hover {
        background: none;
        color: var(--primary-color);
        transform: none;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .auth-main {
        background: linear-gradient(135deg, #ffc107 0%, #ffffff 100%);
    }
    
    .auth-card {
        background: #f8f9fa;
        color: #e2e8f0;
    }
    
    .form-group input {
        background: #4a5568;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .form-group input:focus {
        border-color: var(--primary-color);
        background: #4a5568;
    }
    
    .social-btn {
        background: #4a5568;
        border-color: #4a5568;
        color: #e2e8f0;
    }
}

/* Accessibility Enhancements */
.auth-card:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.social-btn:focus,
.auth-btn:focus,
.link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid var(--text-color);
    }
    
    .form-group input {
        border-width: 2px;
    }
    
    .social-btn {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .social-btn,
    .auth-btn,
    .form-group input {
        transition: none;
    }
    
    .auth-card:hover {
        transform: none;
    }
    
    .social-btn:hover,
    .auth-btn:hover {
        transform: none;
    }
}
