/* Core VariablesY */
:root {
    --bg-dark: #0a0b0d;
    --card-bg: #161b22;
    --accent-blue: #00d2ff;
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --font-main: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

/* Container for the search and cards */
.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header & Filters Section */
header {
    text-align: center;
    margin-bottom: 40px;
}

.filter-bar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: flex-end;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

input, select {
    background: #0d1117;
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px;
    border-radius: 6px;
    outline: none;
    transition: border 0.3s;
}

input:focus {
    border-color: var(--accent-blue);
}

/* The Job Card Grid */
#jobs-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

/* Individual Job Card */
.job-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;

    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    color: inherit;
}

.job-card:hover {
    transform: translateY(-3px);
    
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
    border-color: var(--accent-blue);
}

.job-card h3 {
    margin: 0 0 8px 0;
    color: var(--accent-blue);
    font-size: 1.4rem;
}

.company-info {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 15px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-blue);
    margin-right: 10px;
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.salary {
    color: #2ea043;
    font-weight: bold;
}

.summary {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    background: var(--accent-blue);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.btn:hover:not(:disabled) {
    opacity: 0.8;
}

/* Spinner Container */
.loader-container {
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

/* The actual spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 210, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.ai-summary-box {
    background: #161b22;
    border-left: 4px solid #007bff;
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
}
.ai-label {
    color: #007bff;
    font-weight: bold;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

#scrapeBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Space between text and spinner */
    min-height: 45px; /* Keeps the height locked */
    vertical-align: middle;
}

#btnLoader.spinner {
    display: inline-block; /* Prevents it from acting like a block */
    width: 16px;
    height: 16px;
    border-width: 2px;
    margin: 0; /* Remove any default margins */
}