:root {
    --bg: #ffffff;
    --text: #111111;
    --text-light: #666666;
    --border: #e5e5e5;
    --primary: #000000;
    --accent: #2563eb;
    --radius: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

.highlight {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav button {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    margin-left: 20px;
    padding: 5px 0;
}

nav button.active,
nav button:hover {
    color: var(--text);
    border-bottom: 2px solid var(--primary);
}

.badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto 25px;
    flex-wrap: wrap;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 12px;
    min-width: 200px;
    background: white;
}

.input-wrapper input {
    width: 100%;
    border: none;
    padding: 12px;
    font-size: 0.95rem;
    outline: none;
}

.input-wrapper i {
    color: var(--text-light);
}

#search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
}

#search-btn:hover {
    opacity: 0.9;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filters span {
    color: var(--text-light);
    font-size: 0.9rem;
}

.chip {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
}

.chip:hover {
    border-color: var(--text-light);
    color: var(--text);
}

.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.results-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

#sort-select {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    border-color: #ccc;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.company {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    text-decoration: none;
    display: block;
}

.job-title:hover {
    color: var(--accent);
}

.meta {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.tags {
    margin-top: auto;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.save-btn {
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 1.1rem;
}

.save-btn:hover,
.save-btn.saved {
    color: var(--primary);
}

#loading,
#no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.spinner {
    width: 30px;
    height: 30px;
    border: 2px solid #eee;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

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

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 25px;
    background: white;
    border-radius: var(--radius);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.saved-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.remove-btn {
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
}

.remove-btn:hover {
    color: #ef4444;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column;
    }

    .input-wrapper {
        width: 100%;
    }

    #search-btn {
        width: 100%;
        padding: 12px;
    }
}