/* ============ 基础样式 ============ */
:root {
    --primary: #00b42a;
    --primary-dark: #009f26;
    --primary-light: #e6f7eb;
    --accent: #165dff;
    --text-primary: #1a1a1a;
    --text-secondary: #717171;
    --text-light: #999;
    --border: #e6e6e6;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f6f7;
    --bg-hover: #f0f0f0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ============ Header ============ */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo i {
    font-size: 28px;
    color: var(--primary);
}

.logo-accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-link.active:hover {
    background: var(--primary-dark);
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu a {
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
}

.mobile-menu a:hover {
    background: var(--bg-secondary);
}

/* ============ Stats Banner ============ */
.stats-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #00a020 100%);
    color: white;
    padding: 24px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.stat-clickable {
    cursor: pointer;
    transition: background 0.2s;
}

.stat-clickable:hover {
    background: rgba(255,255,255,0.2);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

/* ============ 搜索区 ============ */
.search-section {
    background: var(--bg-primary);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 4px;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
    background: white;
}

.search-icon {
    padding-left: 16px;
    color: var(--text-light);
    font-size: 16px;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    font-size: 15px;
    outline: none;
}

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.popular-tags {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag-label {
    font-weight: 500;
}

.popular-tags .tag {
    background: var(--bg-secondary);
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.popular-tags .tag:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ============ 岗位列表区 ============ */
.jobs-section {
    padding: 24px 0;
}

.jobs-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

/* 筛选面板 */
.filter-panel {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 88px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.filter-reset {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: white;
    cursor: pointer;
    outline: none;
}

.filter-group select:focus {
    border-color: var(--primary);
}

/* 列表头部 */
.jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.results-count span {
    color: var(--primary);
    font-weight: 600;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius);
}

.view-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.view-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 岗位卡片 */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.job-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.job-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.job-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.job-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.job-company {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.tag-考公 { background: #fff7e6; color: #fa8c16; }
.tag-事业编 { background: #e6f7ff; color: #1890ff; }
.tag-央国企 { background: #f0f5ff; color: #597ef7; }
.tag-社会招聘 { background: #f6ffed; color: var(--primary); }

.job-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.job-info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-info-item i {
    color: var(--text-light);
}

.job-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.job-deadline {
    font-size: 13px;
    color: var(--text-secondary);
}

.job-deadline .urgent {
    color: #ff4d4f;
    font-weight: 500;
}

.job-salary {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.job-card.card-view {
    display: grid;
    grid-template-columns: 1fr auto;
}

/* ============ 分页 ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: white;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

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

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    color: var(--border);
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 14px !important;
    color: var(--text-light) !important;
}

/* ============ 详情页 ============ */
.detail-back {
    margin-bottom: 20px;
}

.detail-back button {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-back button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.detail-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.detail-header {
    background: linear-gradient(135deg, var(--primary) 0%, #00a020 100%);
    color: white;
    padding: 32px;
}

.detail-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 15px;
    opacity: 0.95;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-body {
    padding: 32px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-info-item {
    display: flex;
    gap: 12px;
}

.detail-info-label {
    color: var(--text-secondary);
    font-size: 14px;
    min-width: 80px;
}

.detail-info-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.detail-content-text {
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.detail-btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.detail-btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.detail-btn-primary:hover {
    background: var(--primary-dark);
}

.detail-btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.detail-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.detail-contact {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 16px;
}

.detail-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.detail-contact-item:last-child {
    margin-bottom: 0;
}

.detail-contact-item i {
    color: var(--primary);
    width: 20px;
}

/* ============ Footer ============ */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-brand i {
    color: var(--primary);
}

.footer-links {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 12px;
    color: var(--text-light);
}

/* ============ Toast ============ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 1000;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
    .jobs-layout {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .filter-header {
        grid-column: 1 / -1;
        margin-bottom: 12px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

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

    .stat-value {
        font-size: 22px;
    }

    .search-box {
        flex-wrap: wrap;
    }

    .search-box input {
        width: 100%;
    }

    .search-btn {
        width: 100%;
        margin-top: 8px;
    }

    .job-card-top {
        flex-direction: column;
    }

    .job-card-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .detail-header {
        padding: 20px;
    }

    .detail-body {
        padding: 20px;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============ 工具类 ============ */
.hidden { display: none !important; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* ========================
   用户收藏功能样式
   ======================== */

/* 导航栏收藏按钮 */
.nav-favorite-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    margin-left: 8px;
    transition: all 0.2s;
}
.nav-favorite-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}
.nav-favorite-btn .fa-heart {
    color: #ff6b6b;
}

/* 收藏弹出面板 */
.favorites-panel {
    display: none;
    position: fixed;
    top: 60px;
    right: 20px;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    z-index: 9999;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}
.favorites-panel.open {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #00b42a, #165d28);
    color: #fff;
}
.favorites-header strong { color: #ffd700; }

.favorites-actions {
    display: flex;
    gap: 8px;
}
.fav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}
.fav-btn:hover { background: rgba(255,255,255,0.35); }
.fav-btn-danger { background: rgba(255,0,0,0.3); }
.fav-btn-danger:hover { background: rgba(255,0,0,0.5); }

.favorites-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
}
.favorites-list::-webkit-scrollbar { width: 4px; }
.favorites-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.favorite-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}
.favorite-item:hover { background: #f5f9f6; }
.favorite-item-main { flex: 1; min-width: 0; }
.favorite-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.favorite-item-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.favorite-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.favorite-salary {
    font-size: 13px;
    font-weight: 600;
    color: #ff6b00;
}

.favorite-remove {
    background: transparent;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.favorite-remove:hover { color: #ff1744; }

.favorites-empty {
    padding: 40px 20px;
    text-align: center;
    color: #aaa;
}
.favorites-empty i { font-size: 40px; margin-bottom: 12px; display: block; }
.favorites-empty p { margin: 4px 0; font-size: 14px; }
.favorites-hint { font-size: 12px !important; color: #ccc !important; }

/* 卡片收藏按钮 */
.fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    z-index: 2;
    transition: color 0.2s, transform 0.2s;
}
.fav-btn:hover { color: #ff6b6b; transform: scale(1.2); }
.fav-btn.favorited { color: #ff6b6b; }
.fav-btn.favorited i { animation: heartBeat 0.3s ease; }
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* 详情页收藏按钮 */
.detail-btn-favorite {
    background: linear-gradient(135deg, #ff6b6b, #ff1744) !important;
    color: #fff !important;
    border-color: #ff1744 !important;
}

/* 收藏面板滚动条 */
.favorites-panel ::-webkit-scrollbar { width: 4px; }
.favorites-panel ::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

/* 移动端适配 */
@media (max-width: 480px) {
    .favorites-panel {
        width: calc(100vw - 20px);
        right: 10px;
        top: 55px;
    }
}

/* 新增类别颜色 */
.tag-政府见习 { background: #6c5ce7; color: #fff; }
.tag-人社帮扶就业 { background: #00b894; color: #fff; }
.tag-三支一扶 { background: #e17055; color: #fff; }
.tag-西部计划 { background: #0984e3; color: #fff; }
.tag-公益岗位 { background: #d63031; color: #fff; }
.tag-灵活就业 { background: #fdcb6e; color: #333; }
.tag-退役军人就业 { background: #2d3436; color: #fff; }

/* 导航栏滚动（横向） */
.header .nav-links {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}
.header .nav-links::-webkit-scrollbar { display: none; }
