/* =============================================================
   SKILLCHALLENGE AUTH STYLES - Dark Theme
   
   Login, Signup, Password Reset, and Onboarding pages
   Uses indigo/purple gradient theme with dark backgrounds
   ============================================================= */

/* CSS Variables - SkillChallenge Theme Colors */
:root {
    /* Background Colors */
    --qh-bg: #020617;
    --qh-bg2: #0f172a;
    --qh-bg3: #1e293b;
    
    /* Border Colors */
    --qh-brd: rgba(99, 102, 241, 0.15);
    --qh-brd2: rgba(148, 163, 184, 0.2);
    
    /* Text Colors */
    --qh-t1: #f8fafc;
    --qh-t2: #94a3b8;
    --qh-t3: #64748b;
    
    /* Accent Colors */
    --qh-primary: #6366f1;
    --qh-primary-hover: #4f46e5;
    --qh-secondary: #8b5cf6;
    --qh-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    
    /* Status Colors */
    --qh-success: #22c55e;
    --qh-error: #ef4444;
    --qh-warning: #f59e0b;
    --qh-info: #06b6d4;
    
    /* Shadows */
    --qh-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --qh-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --qh-glow: 0 0 40px rgba(99, 102, 241, 0.2);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.skillchallenge-auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--qh-bg);
    color: var(--qh-t1);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Auth Wrapper - Split Layout */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ================================================================
   LEFT SIDE - ILLUSTRATION
   ================================================================ */
.auth-illustration {
    flex: 1;
    display: none;
    background: var(--qh-bg2);
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .auth-illustration {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Gradient Overlay */
.auth-illustration::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(6, 182, 212, 0.08) 0%, transparent 30%);
    z-index: 0;
}

/* Grid Pattern */
.auth-illustration::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

.auth-illustration-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
    max-width: 520px;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--qh-bg3);
    border: 1px solid var(--qh-brd);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--qh-shadow);
    animation: float 4s ease-in-out infinite;
}

.floating-card.float-1 {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.floating-card.float-2 {
    top: 15%;
    right: 20%;
    animation-delay: 0.5s;
}

.floating-card.float-3 {
    bottom: 25%;
    left: 10%;
    animation-delay: 1s;
}

.floating-card.float-4 {
    bottom: 15%;
    right: 15%;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

/* Illustration Circle */
.illustration-circle {
    width: 220px;
    height: 220px;
    margin: 0 auto 40px;
    background: var(--qh-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--qh-glow), var(--qh-shadow-lg);
    position: relative;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: var(--qh-glow), var(--qh-shadow-lg); }
    50% { box-shadow: 0 0 60px rgba(99, 102, 241, 0.35), var(--qh-shadow-lg); }
}

.illustration-circle::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--qh-gradient);
    z-index: -1;
    opacity: 0.5;
    filter: blur(20px);
}

.illustration-icon {
    font-size: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Illustration Text */
.illustration-text {
    margin-bottom: 40px;
}

.illustration-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--qh-t1);
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.illustration-subtitle {
    font-size: 1rem;
    color: var(--qh-t2);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Stats */
.illustration-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--qh-brd);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--qh-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--qh-t3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--qh-brd2);
}


/* ================================================================
   RIGHT SIDE - FORM
   ================================================================ */
.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--qh-bg);
    min-height: 100vh;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--qh-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--qh-t1);
}

.logo-accent {
    background: var(--qh-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Title & Subtitle */
.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--qh-t1);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: var(--qh-t2);
    margin-bottom: 32px;
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.auth-alert i {
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.auth-alert-danger i {
    color: var(--qh-error);
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.auth-alert-success i {
    color: var(--qh-success);
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Field Group */
.auth-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--qh-t1);
}

/* Input Wrapper */
.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    color: var(--qh-t3);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--qh-bg2);
    border: 1px solid var(--qh-brd2);
    border-radius: 12px;
    color: var(--qh-t1);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.auth-input::placeholder {
    color: var(--qh-t3);
}

.auth-input:focus {
    outline: none;
    border-color: var(--qh-primary);
    background: var(--qh-bg3);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-input:focus + .auth-input-icon,
.auth-input:focus ~ .auth-input-icon {
    color: var(--qh-primary);
}

.auth-input.is-invalid {
    border-color: var(--qh-error);
}

.auth-input.is-valid {
    border-color: var(--qh-success);
}

.auth-input-password {
    padding-right: 48px;
}

/* Password Toggle */
.auth-toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--qh-t3);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.auth-toggle-password:hover {
    color: var(--qh-t1);
}

/* Input Action (for DB selector) */
.auth-input-action {
    position: absolute;
    right: 16px;
    color: var(--qh-primary);
    text-decoration: none;
}

/* Field Error/Success */
.auth-field-error,
.auth-field-success {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    margin-top: 4px;
}

.auth-field-error {
    color: var(--qh-error);
}

.auth-field-error::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.auth-field-success {
    color: var(--qh-success);
}

/* Password Strength */
.password-strength {
    height: 4px;
    background: var(--qh-bg3);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    background: var(--qh-error);
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.password-strength-text {
    font-size: 0.75rem;
    margin-top: 6px;
    font-weight: 500;
}

/* Checkbox */
.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox input {
    display: none;
}

.auth-checkbox-mark {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: var(--qh-bg2);
    border: 1px solid var(--qh-brd2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.auth-checkbox-mark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.auth-checkbox input:checked + .auth-checkbox-mark {
    background: var(--qh-gradient);
    border-color: transparent;
}

.auth-checkbox input:checked + .auth-checkbox-mark::after {
    opacity: 1;
    transform: scale(1);
}

.auth-checkbox-label {
    font-size: 0.875rem;
    color: var(--qh-t2);
    line-height: 1.5;
}

.auth-checkbox-label a {
    color: var(--qh-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-checkbox-label a:hover {
    color: var(--qh-secondary);
    text-decoration: underline;
}

/* Options Row (Remember Me + Forgot Password) */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.auth-link {
    font-size: 0.875rem;
    color: var(--qh-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--qh-secondary);
}

/* Buttons */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.auth-btn-primary {
    background: var(--qh-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}

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

.auth-btn-secondary {
    background: var(--qh-bg2);
    color: var(--qh-t1);
    border: 1px solid var(--qh-brd2);
}

.auth-btn-secondary:hover {
    background: var(--qh-bg3);
    border-color: var(--qh-brd);
}

/* OAuth Section */
.auth-oauth {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

/* Style OAuth provider buttons */
.auth-oauth .btn,
.auth-oauth .o_oauth_button,
.auth-oauth a.btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px !important;
    background: var(--qh-bg2) !important;
    border: 1px solid var(--qh-brd2) !important;
    border-radius: 12px !important;
    color: var(--qh-t1) !important;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.auth-oauth .btn:hover,
.auth-oauth .o_oauth_button:hover,
.auth-oauth a.btn:hover {
    background: var(--qh-bg3) !important;
    border-color: var(--qh-primary) !important;
}

.auth-oauth .btn img,
.auth-oauth .o_oauth_button img {
    width: 20px;
    height: 20px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--qh-brd2);
}

.auth-divider span {
    font-size: 0.8125rem;
    color: var(--qh-t3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer Links */
.auth-footer-link {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--qh-t2);
}

.auth-footer-link a {
    color: var(--qh-primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.auth-footer-link a:hover {
    color: var(--qh-secondary);
}

/* Back to Home Link */
.auth-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    color: var(--qh-t3);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.auth-back-link:hover {
    color: var(--qh-t1);
}


/* ================================================================
   ONBOARDING SPECIFIC STYLES
   ================================================================ */

/* Progress Bar */
.onboarding-progress-container {
    margin-bottom: 24px;
}

.onboarding-progress-bar {
    height: 4px;
    background: var(--qh-bg3);
    border-radius: 2px;
    overflow: hidden;
}

.onboarding-progress-fill {
    height: 100%;
    background: var(--qh-gradient);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.onboarding-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--qh-t3);
}

.onboarding-progress-step {
    font-weight: 500;
    color: var(--qh-t2);
}

/* Interest/Option Cards */
.option-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--qh-bg2);
    border: 1px solid var(--qh-brd2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option-card:hover {
    background: var(--qh-bg3);
    border-color: var(--qh-brd);
}

.option-card.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--qh-primary);
}

.option-card input {
    display: none;
}

.option-card-icon {
    width: 48px;
    height: 48px;
    background: var(--qh-bg3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.option-card.selected .option-card-icon {
    background: var(--qh-gradient);
}

.option-card-content {
    flex: 1;
}

.option-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--qh-t1);
    margin-bottom: 4px;
}

.option-card-desc {
    font-size: 0.8125rem;
    color: var(--qh-t2);
}

.option-card-check {
    width: 24px;
    height: 24px;
    border: 2px solid var(--qh-brd2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.option-card.selected .option-card-check {
    background: var(--qh-gradient);
    border-color: transparent;
}

.option-card.selected .option-card-check::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
}

/* Gender Selection */
.gender-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gender-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--qh-bg2);
    border: 1px solid var(--qh-brd2);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gender-option:hover {
    background: var(--qh-bg3);
    border-color: var(--qh-brd);
}

.gender-option.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--qh-primary);
}

.gender-option input {
    display: none;
}

.gender-icon {
    width: 56px;
    height: 56px;
    background: var(--qh-bg3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.2s ease;
}

.gender-option.selected .gender-icon {
    background: var(--qh-gradient);
    transform: scale(1.05);
}

.gender-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--qh-t1);
}

/* Skip Button */
.skip-btn {
    background: none;
    border: none;
    color: var(--qh-t3);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.2s ease;
}

.skip-btn:hover {
    color: var(--qh-t1);
}

/* Button Group */
.auth-btn-group {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.auth-btn-group .auth-btn {
    flex: 1;
}


/* ================================================================
   RESPONSIVE STYLES
   ================================================================ */
@media (max-width: 1023px) {
    .auth-form-side {
        padding: 32px 20px;
    }
    
    .auth-form-container {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        margin-bottom: 24px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .auth-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gender-options {
        grid-template-columns: 1fr;
    }
    
    .illustration-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .stat-divider {
        display: none;
    }
}


/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--qh-t3); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
