:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --text-primary: #1a1a2e;
    --text-secondary: #3d3d5c;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-white: #fff;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f8fafc;
    color: var(--text-primary);
    line-height: 1.6;
    padding-left: 260px;
    padding-bottom: 40px;
}

/* ==================== 左侧垂直目录 ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: #ffffff;
    border-right: 1px solid rgba(59, 130, 246, 0.12);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 16px 20px 0 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-logo .logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-bottom: 12px;
}

.sidebar-logo .logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: #f8fafc;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.search-box input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.sidebar-stats {
    padding: 8px 0 12px 0;
}

.stat-row {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.8;
}

.stat-row span {
    color: #3b82f6;
    font-weight: 600;
    font-size: 16px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.nav-category-item {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    gap: 6px;
}

.nav-dir-icon {
    font-size: 14px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.nav-dir-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-category-item:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.nav-category-item.active {
    background: #eff6ff;
    color: var(--primary-color);
    font-weight: 600;
}

.nav-category-badge {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
}

.nav-category-item.all-item {
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding: 10px;
    margin-bottom: 4px;
    justify-content: center;
    letter-spacing: 5px;
}

/* ==================== 主内容区域 ==================== */
.main-content {
    max-width: 95%;
    margin: 0 auto;
    padding: 32px 40px;
}

/* ==================== 卡片网格 ==================== */
.category-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==================== 就业方向卡片 ==================== */
.direction-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.25s ease;
}

.direction-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: #d1d5db;
}

.direction-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.direction-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.direction-intro-text {
    font-size: 13px;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.direction-count {
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.direction-count strong {
    color: var(--primary-color);
    font-size: 16px;
}

.direction-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.info-item .info-icon {
    flex-shrink: 0;
    font-size: 16px;
}

.info-item .info-text {
    color: #4a5568;
}

.info-item.salary { background: linear-gradient(135deg, #fef3c7, #fffbeb); }
.info-item.city { background: linear-gradient(135deg, #d1fae5, #ecfdf5); }
.info-item.prospect { background: linear-gradient(135deg, #ede9fe, #f5f3ff); }

/* 专业类标签容器 */
.profession-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profession-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    background: #f8fafc;
    color: var(--text-secondary);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.profession-tag:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59,130,246,0.15);
}

.profession-tag:active {
    transform: translateY(0);
}

.no-data {
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
    padding: 4px 0;
}

/* 就业方向颜色方案（用于卡片头部方向标签） */
.tag-进兵器 { background: #fef2f2; color: #dc2626; }
.tag-进船舶 { background: #eff6ff; color: #2563eb; }
.tag-进航空航天 { background: #f0f9ff; color: #0284c7; }
.tag-进中车 { background: #fefce8; color: #ca8a04; }
.tag-进电力 { background: #fffbeb; color: #d97706; }
.tag-进石油 { background: #f5f3ff; color: #7c3aed; }
.tag-进化工 { background: #ecfeff; color: #0f766e; }
.tag-进医药 { background: #f0fdf4; color: #16a34a; }
.tag-进医疗器械 { background: #fdf2f8; color: #be185d; }
.tag-进运营商 { background: #fef7ed; color: #ea580c; }
.tag-进半导体 { background: #eff6ff; color: #1d4ed8; }
.tag-进科技大厂 { background: #faf5ff; color: #9333ea; }
.tag-进金融 { background: #f0fdf4; color: #059669; }
.tag-进税务 { background: #fef2f2; color: #b91c1c; }
.tag-进中粮 { background: #f7fee7; color: #4d7c0f; }
.tag-进铁路 { background: #eff6ff; color: #1e40af; }
.tag-进航海 { background: #ecfeff; color: #0e7490; }
.tag-制造业 { background: #fff7ed; color: #c2410c; }
.tag-能源石化 { background: #f5f3ff; color: #6d28d9; }
.tag-基础建设 { background: #f1f5f9; color: #475569; }
.tag-大健康 { background: #f0fdf4; color: #15803d; }
.tag-考公考编 { background: #fefce8; color: #a16207; }
.tag-物流 { background: #f8fafc; color: #475569; }
.tag-电商旅游 { background: #eff6ff; color: #2563eb; }
.tag-轨道交通 { background: #f1f5f9; color: #334155; }
.tag-动物宠物 { background: #fdf2f8; color: #9d174d; }
.tag-进气象 { background: #f0f9ff; color: #0369a1; }
.tag-教育 { background: #fdf2f8; color: #be185d; }

/* ==================== 加载动画 ==================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.loading h4 {
    color: var(--text-muted);
    font-weight: 500;
}

/* ==================== 专业列表弹窗 ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.profession-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 1080px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.profession-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.profession-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.profession-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.profession-modal-body .major-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.profession-modal-body .major-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    text-align: left;
    outline: none;
}

.profession-modal-body .major-card:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: 0 2px 8px rgba(59,130,246,0.1);
    transform: translateY(-1px);
}

.profession-modal-body .major-card:active {
    transform: translateY(0);
}

.major-card-left {
    flex-shrink: 0;
}

.major-card-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 28px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.major-card-body {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.major-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.major-card-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.major-new-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #fce7f3;
    color: #db2777;
    flex-shrink: 0;
    white-space: nowrap;
}

.major-card-right {
    flex-shrink: 0;
}

.major-card-level {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.level-undergraduate {
    background: #eff6ff;
    color: #2563eb;
}

.level-specialist {
    background: #fef3c7;
    color: #d97706;
}

.profession-modal-body .major-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 14px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 767.98px) {
    body {
        padding-left: 0;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: none;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px;
        gap: 6px;
    }

    .nav-category-item {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .main-content {
        padding: 20px 16px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}
