/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .brand-link {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Flash messages */
.flash-messages {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.flash-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid;
}

.flash-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.flash-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.flash-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Forms */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.form-button:hover {
    transform: translateY(-1px);
}

/* Search form */
.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Job cards */
.job-card {
    border-left: 4px solid transparent;
    transition: border-left-color 0.2s;
}

.job-card:hover {
    border-left-color: #667eea;
}

.job-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.job-title a {
    color: #333;
    text-decoration: none;
}

.job-title a:hover {
    color: #667eea;
}

.job-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.job-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.salary-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

.job-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.job-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* AI Summary */
.ai-summary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.ai-summary h2 {
    margin-bottom: 0.5rem;
}

.ai-summary p {
    opacity: 0.9;
    margin-bottom: 1rem;
}

.ai-content {
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 4px;
    line-height: 1.6;
}

/* Grid layouts */
.grid {
    display: grid;
    gap: 1rem;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Features */
.features {
    margin-bottom: 3rem;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    background: #f7fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #667eea;
}

/* Popular searches */
.popular-searches {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.popular-searches h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.search-link {
    display: block;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.search-link:hover {
    border-color: #667eea;
    background-color: #f7fafc;
}

/* CTA section */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 3rem;
}

.cta h2 {
    margin-bottom: 1rem;
}

.cta p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-decoration: none;
    color: #4a5568;
}

.pagination a:hover {
    background-color: #f7fafc;
}

.pagination .current {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .job-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

/* Save job button */
.save-job-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.save-job-btn:hover {
    background-color: #f7fafc;
}

/* Results page specific styles */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-save-tip {
    font-size: 0.9rem;
    color: #666;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.job-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.no-results {
    text-align: center;
    padding: 3rem 0;
}

.no-results-icon {
    width: 6rem;
    height: 6rem;
    background: #f7fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.no-results h3 {
    margin-bottom: 0.5rem;
}

.no-results p {
    margin-bottom: 1.5rem;
}

.job-save-tip {
    font-size: 0.8rem;
    color: #666;
}
