@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --deep-olive: #2d4a2d;
    --olive: #4a7c4a;
    --light-olive: #e8f0e8;
    --bg-primary: #fafafa;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border: #e5e5e5;
    --border-hover: #d0d0d0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

[data-theme="dark"] {
    --deep-olive: #4a7c4a;
    --olive: #6b9c6b;
    --light-olive: #2d3d2d;
    --bg-primary: #0d0d0d;
    --bg-card: #1a1a1a;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    --border: #2a2a2a;
    --border-hover: #3a3a3a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

[data-theme="dark"] .theme-btn,
[data-theme="dark"] .search-icon {
    color: var(--text-primary);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    position: relative;
    padding: 3rem 0 2rem;
    text-align: center;
}

.theme-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    border-color: var(--olive);
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 1rem;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding-left: 2.5rem;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

header h1 span {
    color: var(--olive);
}

header .subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

main {
    padding: 1.5rem 0 3rem;
}

.controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.controls input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.controls input::placeholder {
    color: var(--text-tertiary);
}

.controls input:focus,
.controls select:focus {
    outline: none;
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(74, 124, 74, 0.1);
}

.controls select {
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.controls #count {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-left: auto;
    font-weight: 500;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.625rem 1rem;
    background: var(--deep-olive);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.refresh-btn:hover {
    background: var(--olive);
    transform: translateY(-1px);
}

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

.refresh-btn ph-arrows-clockwise {
    font-size: 1rem;
}

.jobs-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.job-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.job-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.job-card .job-info {
    flex: 1;
    min-width: 0;
}

.job-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s;
}

.job-card h3 a:hover {
    color: var(--olive);
}

.job-card .company {
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-card .salary {
    color: var(--olive);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.job-card .meta {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.job-card .tag {
    padding: 0.25rem 0.625rem;
    background: var(--light-olive);
    color: var(--olive);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.job-card .tag.source {
    background: var(--deep-olive);
    color: #ffffff;
}

.loading {
    color: var(--text-secondary);
    text-align: center;
    padding: 3rem;
}

.no-jobs {
    color: var(--text-secondary);
    text-align: center;
    padding: 3rem;
    font-size: 0.9rem;
}

footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

footer .credit {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    color: var(--text-tertiary);
}

@media (max-width: 600px) {
    header {
        padding: 2rem 0 1.5rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls input,
    .controls select {
        width: 100%;
    }
    
    .controls #count {
        margin-left: 0;
        text-align: center;
    }
    
    .job-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .job-card .meta {
        width: 100%;
    }
}