.sj-container { background: #f8fafc; padding: 20px; border-radius: 12px; font-family: 'Inter', sans-serif; }

/* Inputs */
.sj-input-card { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0; margin-bottom: 20px; }
.sj-input-row { display: flex; gap: 15px; flex-wrap: wrap; }
.sj-group { flex: 1; min-width: 150px; }
.sj-label { font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase; display: block; margin-bottom: 5px; }
.sj-input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-weight: 500; }
.sj-btn { background: #4f46e5; color: white; border: none; padding: 10px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; height: 40px; margin-top: 22px; }
.sj-btn:hover { opacity: 0.9; }
.sj-btn:disabled { background: #cbd5e1; }

/* Phase 1: Report */
.sj-report-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; margin-bottom: 30px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.sj-report-header { background: #eef2ff; padding: 15px 20px; border-bottom: 1px solid #e0e7ff; display: flex; justify-content: space-between; align-items: center; }
.sj-title { color: #312e81; font-weight: 700; font-size: 1.1rem; }
.sj-badge { background: #fff; color: #4f46e5; padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; border: 1px solid #c7d2fe; }

.sj-report-body { padding: 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 768px) { .sj-report-body { grid-template-columns: 1fr; } }

.sj-stat-box { background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 15px; }
.sj-stat-label { font-size: 0.75rem; color: #64748b; font-weight: 700; text-transform: uppercase; display: block; margin-bottom: 5px; }
.sj-stat-val { font-size: 1.8rem; font-weight: 800; color: #1e293b; display: block; line-height: 1; }
.sj-stat-sub { font-size: 0.8rem; color: #16a34a; font-weight: 600; margin-top: 5px; display: block; }

.sj-info-section { margin-bottom: 15px; }
.sj-tag { display: inline-block; background: #f1f5f9; color: #475569; padding: 4px 10px; border-radius: 6px; font-size: 0.85rem; margin: 0 5px 5px 0; border: 1px solid #e2e8f0; }

.sj-edu-tag { 
    display: inline-block; /* Changed from block to sit side-by-side if space permits */
    background: #fff; 
    border: 1px solid #e2e8f0; 
    padding: 8px 12px; /* Better padding */
    border-radius: 8px; 
    font-size: 0.85rem; 
    font-weight: 500;
    margin: 0 6px 6px 0; /* Spacing between tags */
    color: #334155; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.sj-cta-area { background: #f8fafc; padding: 20px; text-align: center; border-top: 1px solid #e2e8f0; }
.sj-cta-btn { background: #0e37f1; color: #fff !important; padding: 10px 30px; border-radius: 25px; border: none; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background-color 0.3s; text-decoration: none !important; }
.sj-cta-btn:hover { background: #0b2cb8; color: #fff !important; }
.sj-icon-scan::before { content: "\e522"; font-family: "Font Awesome 6 Free"; font-weight: 900; }
.sj-phase2-placeholder {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f8fafc 100%);
    background-size: 200% 200%;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    position: relative;
    overflow: hidden;
    animation: sj-scan-bg 3s ease infinite;
}

.sj-scan-icon {
    font-size: 3rem;
    color: #4f46e5;
    margin-bottom: 20px;
    display: inline-block;
    animation: sj-pulse-icon 1.5s infinite ease-in-out;
}

/* Background Sweep */
@keyframes sj-scan-bg {
    0% { background-position: 0% 50%; border-color: #cbd5e1; }
    50% { background-position: 100% 50%; border-color: #818cf8; }
    100% { background-position: 0% 50%; border-color: #cbd5e1; }
}

/* Icon Pulse */
@keyframes sj-pulse-icon {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 15px rgba(79, 70, 229, 0.3); }
    100% { transform: scale(1); opacity: 0.8; }
}
/* Phase 2: Hubs */
.sj-hubs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.sj-hub-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; transition: transform 0.2s; }
.sj-hub-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.sj-hub-header { margin-bottom: 15px; }
.sj-city-badge { background: #f3e8ff; color: #7e22ce; padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.sj-hub-header h5 { margin: 8px 0 0 0; font-size: 1.1rem; color: #1e293b; font-weight: 700; }
.sj-hub-stats { display: flex; justify-content: space-between; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #f1f5f9; }
.sj-hub-stats small { display: block; font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; font-weight: 700; }
.sj-reason { font-style: italic; font-size: 0.85rem; color: #64748b; margin-bottom: 15px; line-height: 1.5; }
.sj-costs { background: #f8fafc; padding: 12px; border-radius: 8px; font-size: 0.85rem; color: #475569; display: flex; flex-direction: column; gap: 5px; }
.sj-costs i { width: 20px; color: #94a3b8; }

/* Loaders */
.sj-loader { text-align: center; padding: 40px; display: none; }
.spinner{width:24px;height:24px;border:3px solid #e2e8f0;border-top:3px solid #4f46e5;border-radius:50%;animation:1s linear infinite spin;display:inline-block;vertical-align:middle;margin-right:10px}.fa-spin{animation:2s linear infinite fa-spin}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}

/* Rate Limit Modal */
.ai-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 9999; display: none;
    align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.ai-modal-card {
    background: #fff; width: 90%; max-width: 450px; border-radius: 16px;
    padding: 30px; text-align: center; position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.ai-modal-icon {
    width: 60px; height: 60px; background: #fee2e2; color: #ef4444;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin: 0 auto 20px;
}
.ai-modal-title { font-size: 1.25rem; font-weight: 800; color: #1e293b; margin-bottom: 10px; }
.ai-modal-body { color: #64748b; font-size: 0.95rem; line-height: 1.5; margin-bottom: 25px; }

.btn-modal-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white !important; width: 100%; padding: 12px; border-radius: 8px;
    font-weight: 700; display: block; text-decoration: none;
}
.btn-modal-primary:hover { opacity: 0.9; color: #fafafa!important; }

.ai-modal-close {
    position: absolute; top: 15px; right: 15px; background: transparent;
    border: none; color: #94a3b8; font-size: 20px; cursor: pointer;
}
.ai-modal-close:hover { color: #ef4444; }

/* --- NEW ENHANCEMENTS --- */

/* 1. Persistent Results Area */
.sj-results-area {
    background: #f6f8fb; /* Matches main container but provides a defined zone */
    border: 1px solid #e2e8f0; /* Subtle border */
    border-radius: 12px;
    padding: 30px;
    margin-top: 25px;
    min-height: 300px; /* Ensures it occupies space */
    position: relative;
    background-size: 20px 20px;
}
@media (max-width: 768px) {
    .sj-results-area {
        padding: 0!important;
    }
}
/* USP Section */
.sj-usp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
    padding: 4px 10px;
    animation: fadeIn 0.5s ease-in;
}
.sj-usp-header {
    grid-column: 1 / -1;
}
.sj-usp-header h4 {
    font-size: 1.5rem;
    color: #1e293b;
    line-height: 1.4;
}
.sj-usp-header p {
    font-size: 0.95rem;
    color: #64748b;
}
.sj-usp-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}
.sj-usp-item p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}
.sj-usp-icon-box {
    width: 60px;
    height: 60px;
    background: #fff;
    color: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* Authentic Loader (Jobscanner Style Replica) */
.sj-authentic-loader {
    display: none; /* Controlled by JS */
    text-align: center;
    padding: 60px 30px 80px 30px;
    min-height: 500px;
    background: transparent;
    border-radius: 0;
    /* Flex centering like JobScanner */
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sj-authentic-loader.show {
    display: flex !important;
}

.sj-loader-content {
    max-width: 500px;
    width: 100%;
    padding: 40px 30px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin: 0 auto;
    text-align: center;
}

/* Progress Bar - Exact JobScanner Replica */
.sj-progress-wrapper {
    margin-bottom: 30px;
    position: relative;
    width: 100%;
    text-align: right;
}

.sj-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-top: 20px;
}

.sj-progress-fill {
    height: 100%;
    /* Salary Jasus Blue Gradient */
    background: linear-gradient(90deg, #4f46e5 0%, #3b82f6 50%, #0ea5e9 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.15s linear;
    position: relative;
}

.sj-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: sj-shimmer 2s infinite;
}

@keyframes sj-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.sj-progress-percent {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 5px;
}

/* Stage Indicators */
.sj-stage-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.sj-stage-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cbd5e1;
    transition: all 0.3s ease;
}

.sj-stage-dot.active {
    background-color: #4f46e5;
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

/* Stage Message */
.sj-stage-message {
    margin-bottom: 20px;
}

.sj-stage-icon {
    font-size: 3.5rem;
    color: #4f46e5;
    margin-bottom: 20px;
    display: inline-block;
    animation: sj-pulse 2s infinite;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

@keyframes sj-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.sj-stage-message h4 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    min-height: 1.5em;
}

@media (max-width: 768px) {
    .sj-stage-message h4 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
}

.sj-stage-message p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .sj-stage-message p {
        font-size: 0.85rem;
    }
}

/* Counter Wrapper (The Big Box) */
.sj-counter-wrapper {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    color: white;
    display: none; /* Hidden by default */
    animation: sj-fadeIn 0.5s ease-in;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.sj-counter-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .sj-counter-value {
        font-size: 2rem;
    }
}

.sj-counter-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes sj-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .sj-container {
        padding: 15px;
        background: white;
    }
    
    .sj-input-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .sj-input-row {
        gap: 10px;
    }
    
    .sj-label {
        font-size: 0.65rem;
        margin-bottom: 3px;
    }
    
    .sj-input {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .sj-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        height: 36px;
        margin-top: 20px;
    }
    
    .sj-authentic-loader {
        padding: 40px 15px 60px 15px;
        min-height: 400px;
    }
    
    .sj-loader-content {
        padding: 25px 15px;
    }
    
    .sj-progress-wrapper {
        margin-bottom: 20px;
    }
    
    .sj-progress-percent {
        font-size: 0.75rem;
    }
    
    .sj-progress-bar {
        height: 6px;
    }
    
    .sj-stage-indicators {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .sj-stage-dot {
        width: 10px;
        height: 10px;
    }
    
    .sj-stage-icon {
        font-size: 2.5rem;
        width: 80px;
        height: 80px;
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .sj-counter-label {
        font-size: 0.8rem;
    }
    
    .sj-report-card {
        border-radius: 10px;
        margin-bottom: 20px;
    }
    
    .sj-report-header {
        padding: 12px 15px;
    }
    
    .sj-title {
        font-size: 1rem;
    }
    
    .sj-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .sj-report-body {
        padding: 15px;
        gap: 15px;
        grid-template-columns: 1fr;
    }
    
    .sj-stat-box {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .sj-stat-label {
        font-size: 0.7rem;
        margin-bottom: 3px;
    }
    
    .sj-stat-val {
        font-size: 1.4rem;
    }
    
    .sj-stat-sub {
        font-size: 0.75rem;
        margin-top: 3px;
    }
    
    .sj-cta-area {
        padding: 15px;
    }
    
    .sj-cta-area h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .sj-cta-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    .sj-hubs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 12px;
    }
    
    .sj-hub-card {
        padding: 15px;
        margin-bottom: 8px;
    }
    
    .sj-hub-header h5 {
        font-size: 1rem;
    }
    
    .sj-hub-stats {
        font-size: 0.8rem;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    .sj-reason {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .sj-costs {
        font-size: 0.8rem;
        padding: 10px;
    }
    
    .sj-usp-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 10px;
    }
    
    .sj-usp-icon-box {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin: 0 auto 15px;
    }
    
    .sj-usp-item h4 {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    
    .sj-usp-item p {
        font-size: 0.85rem;
    }
}

/* Fade-in Animation (Matching JobScanner) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}