/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 筛选器区域 */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 25px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="date"] {
    padding: 10px 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-group {
    grid-column: span 1;
}

.reset-btn {
    grid-column: 1 / -1;
    padding: 12px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.reset-btn:active {
    transform: translateY(0);
}

/* 结果信息 */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: white;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #6c757d;
    flex-wrap: wrap;
    gap: 10px;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-selector label {
    font-size: 0.9rem;
    color: #6c757d;
}

.page-size-selector select {
    padding: 6px 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.page-size-selector select:focus {
    outline: none;
    border-color: #667eea;
}

/* 职位列表 */
.job-list {
    display: grid;
    gap: 15px;
    padding: 25px 30px;
}

/* 职位卡片 */
.job-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.job-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.job-company {
    font-size: 0.95rem;
    color: #667eea;
    font-weight: 500;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.job-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #495057;
}

.job-tag.city {
    background: #e7f3ff;
    color: #0066cc;
}

.job-tag.type {
    background: #e6f4ea;
    color: #137333;
}

.job-tag.mode {
    background: #fff3e0;
    color: #e65100;
}

.job-salary {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    font-weight: 600;
}

.job-summary {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #f8f9fa;
    font-size: 0.85rem;
    color: #adb5bd;
}

.job-source {
    display: flex;
    align-items: center;
    gap: 6px;
}

.source-badge {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #495057;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #6c757d;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-info {
    display: flex;
    align-items: center;
    margin-right: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    user-select: none;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

.pagination-btn:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination-btn.ellipsis {
    background: transparent;
    border: none;
    cursor: default;
}

.pagination-btn.ellipsis:hover {
    background: transparent;
    color: #495057;
    transform: none;
}

/* 快速跳转 */
.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.pagination-jump input {
    width: 60px;
    padding: 6px 8px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

.pagination-jump input:focus {
    outline: none;
    border-color: #667eea;
}

.pagination-jump button {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-jump button:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .filters {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .job-list {
        padding: 20px;
    }

    .job-header {
        flex-direction: column;
    }

    .job-meta {
        flex-direction: column;
    }

    .results-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination {
        padding: 20px;
    }

    .pagination-controls {
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .pagination-info {
        order: 1;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .pagination-jump {
        order: 3;
        margin-left: 0;
        margin-top: 15px;
    }
}
