/* ============================================
   NUVIDEO.AI AUTHENTICATION PAGES
   Login, Signup, Password Reset Styles
   Version: 1.0
   ============================================ */

/* ============================================
   AUTH CONTAINER
   ============================================ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    position: relative;
    overflow: hidden;
}

/* Animated Background Elements */
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(107, 33, 168, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ============================================
   AUTH CARD
   ============================================ */

.auth-card {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

/* Purple Gradient Top Border */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

/* ============================================
   AUTH HEADER
   ============================================ */

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

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 800;
}

.auth-logo i {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: 1.5rem;
    box-shadow: var(--shadow-purple);
}

.auth-logo .brand-ai {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================================
   AUTH FORM
   ============================================ */

.auth-form {
    margin-bottom: 24px;
}

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

.auth-form .form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.auth-form .form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-primary);
    transition: all var(--transition-base);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
    background: var(--bg-primary);
}

.auth-form .form-control:hover {
    border-color: var(--primary-light);
}

/* Password Input with Toggle */
.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
    transition: color var(--transition-fast);
}

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

/* Form Checkbox */
.auth-form .form-check {
    margin-bottom: 20px;
}

.auth-form .form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-default);
    border-radius: 6px;
    cursor: pointer;
    margin-right: 8px;
}

.auth-form .form-check-input:checked {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

.auth-form .form-check-label {
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

/* ============================================
   AUTH BUTTONS
   ============================================ */

.auth-submit-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary-gradient);
    color: var(--text-inverse);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-purple);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-purple-lg);
}

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

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

/* Loading State */
.auth-submit-btn.loading {
    pointer-events: none;
    color: transparent;
}

.auth-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-inverse);
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   SOCIAL LOGIN
   ============================================ */

.auth-divider {
    position: relative;
    text-align: center;
    margin: 32px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-light);
}

.auth-divider span {
    background: var(--bg-primary);
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 0.875rem;
    position: relative;
}

.social-login {
    margin-bottom: 24px;
}

.social-login-btn {
    width: 100%;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    margin-bottom: 12px;
}

.social-login-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

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

/* Google Button */
.google-signin-btn {
    border-color: #4285F4;
}

.google-signin-btn:hover {
    background: rgba(66, 133, 244, 0.05);
    border-color: #4285F4;
}

/* Facebook Button */
.facebook-signin-btn {
    border-color: #1877F2;
}

.facebook-signin-btn:hover {
    background: rgba(24, 119, 242, 0.05);
    border-color: #1877F2;
}

/* ============================================
   AUTH FOOTER
   ============================================ */

.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.auth-footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.auth-footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

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

/* ============================================
   FORGOT PASSWORD LINK
   ============================================ */

.forgot-password-link {
    display: block;
    text-align: right;
    margin-top: -12px;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

/* ============================================
   ERROR MESSAGES
   ============================================ */

.auth-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid var(--error);
    color: var(--error-dark);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-error i {
    font-size: 1.1rem;
}

.auth-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid var(--success);
    color: var(--success-dark);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-success i {
    font-size: 1.1rem;
}

/* ============================================
   FORM VALIDATION
   ============================================ */

.form-control.is-invalid {
    border-color: var(--error);
}

.form-control.is-invalid:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    display: block;
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 4px;
}

.form-control.is-valid {
    border-color: var(--success);
}

.form-control.is-valid:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.valid-feedback {
    display: block;
    color: var(--success);
    font-size: 0.875rem;
    margin-top: 4px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-logo {
        font-size: 1.75rem;
    }

    .auth-logo i {
        width: 50px;
        height: 50px;
    }
}

/* ============================================
   TERMS AND PRIVACY
   ============================================ */

.auth-terms {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

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

/* ============================================
   RTL SUPPORT
   ============================================ */

[dir="rtl"] .forgot-password-link {
    text-align: left;
}

[dir="rtl"] .auth-form .form-check-input {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .password-toggle {
    right: auto;
    left: 16px;
}