/* ========== 专业百科模块样式 ========== */

:root {
    --zyjs-primary: #192887;
    --zyjs-primary-dark: #1e3a8a;
    --zyjs-primary-light: rgba(25, 40, 135, 0.1);
    --zyjs-blue: #2563eb;
    --zyjs-accent: #4A90E2;
    --zyjs-bg: #F5F7FA;
    --zyjs-text: #333333;
    --zyjs-text-medium: #666666;
    --zyjs-text-light: #999999;
    --zyjs-border: #E0E6ED;
    --zyjs-green: #16a34a;
    --zyjs-orange: #ea580c;
}

.zyjs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================
   列表页样式
   ========================================== */

/* 模块头部 */
.module-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 30px 20px 24px;
    background: linear-gradient(135deg, rgba(25, 40, 135, 0.05) 0%, rgba(25, 40, 135, 0.08) 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
}

.module-header h2 {
    color: var(--zyjs-primary);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.module-header p {
    color: var(--zyjs-text-medium);
    max-width: 800px;
    margin: 0 auto;
    font-size: 0.95rem;
}

/* 学历层次Tab */
.zyjs-degree-tabs {
    display: flex;
    gap: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.degree-tab {
    flex: 1;
    text-align: center;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--zyjs-text-medium);
    border-bottom: 3px solid transparent;
    transition: all 0.25s ease;
    position: relative;
    user-select: none;
}

.degree-tab:hover {
    color: var(--zyjs-primary);
    background: var(--zyjs-primary-light);
}

.degree-tab.active {
    color: var(--zyjs-primary);
    border-bottom-color: var(--zyjs-primary);
    background: var(--zyjs-primary-light);
}

/* ===== 展开式三级联动（参考小程序 cascade-card） ===== */
.zyjs-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input-wrap {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--zyjs-text-light);
    font-size: 14px;
}

.search-input {
    width: 100%;
    height: 42px;
    padding: 0 40px 0 40px;
    font-size: 14px;
    border: 2px solid var(--zyjs-border);
    border-radius: 10px;
    background: white;
    color: var(--zyjs-text);
    transition: border-color 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: var(--zyjs-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--zyjs-text-light);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.search-clear:hover { color: var(--zyjs-text); }

.search-btn {
    height: 42px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    background: var(--zyjs-blue);
    color: white;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.search-btn:hover { background: #1d4ed8; }

/* ===== 展开式三级联动（参考小程序 cascade-card） ===== */
.cascade-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.cascade-card {
    border-bottom: 1px solid #f0f2f5;
}

.cascade-card:last-of-type {
    border-bottom: none;
}

.cascade-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.cascade-header:hover {
    background: rgba(25, 40, 135, 0.03);
}

.cascade-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--zyjs-primary);
    margin-right: 12px;
    white-space: nowrap;
    min-width: 70px;
}

.cascade-value {
    flex: 1;
    font-size: 14px;
    color: var(--zyjs-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cascade-value.has-value {
    color: var(--zyjs-text);
    font-weight: 500;
}

.cascade-arrow {
    margin-left: 8px;
    color: var(--zyjs-text-light);
    font-size: 12px;
    transition: transform 0.25s;
    flex-shrink: 0;
}

.cascade-arrow.open {
    transform: rotate(180deg);
}

/* 选项标签区域 */
.cascade-options {
    padding: 8px 16px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.cascade-option {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--zyjs-text);
    background: var(--zyjs-bg);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}

.cascade-option:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--zyjs-blue);
}

.cascade-option.active {
    background: var(--zyjs-blue);
    color: white;
}

.cascade-option small {
    color: inherit;
    opacity: 0.7;
    font-size: 12px;
}

.cascade-option.active small {
    opacity: 0.85;
}

/* 第3级搜索框 */
.cascade-search-bar {
    padding: 0 16px 12px;
}

.cascade-search-input {
    width: 100%;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    border: 1px solid var(--zyjs-border);
    border-radius: 8px;
    background: var(--zyjs-bg);
    color: var(--zyjs-text);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cascade-search-input:focus {
    border-color: var(--zyjs-blue);
    background: white;
}

/* 筛选状态栏 */
.cascade-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(37, 99, 235, 0.05);
    font-size: 13px;
    color: var(--zyjs-text-medium);
}

.cascade-highlight {
    color: var(--zyjs-blue);
    font-weight: 500;
}

.cascade-clear-btn {
    background: none;
    border: none;
    color: var(--zyjs-blue);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}

.cascade-clear-btn:hover {
    background: rgba(37, 99, 235, 0.1);
}

/* 列表卡片 */
.card { border: none; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05); border-radius: 12px; }
.zyjs-card-header {
    background-color: var(--zyjs-primary);
    color: white;
    font-weight: 500;
    padding: 12px 15px;
    border-radius: 12px 12px 0 0 !important;
}

/* 表格 */
.zyjs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.zyjs-table thead th {
    padding: 10px 12px; background: var(--zyjs-bg); font-weight: 600;
    color: var(--zyjs-primary); text-align: left; border-bottom: 2px solid var(--zyjs-border); white-space: nowrap;
}
.zyjs-table tbody tr { cursor: pointer; transition: background 0.15s; }
.zyjs-table tbody tr:hover { background-color: rgba(25, 40, 135, 0.04); }
.zyjs-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; color: var(--zyjs-text); }
.zyjs-table .col-index { color: var(--zyjs-text-light); font-size: 13px; text-align: center; }
.zyjs-table .col-name { font-weight: 600; color: var(--zyjs-primary); }
.zyjs-table .col-code { font-family: 'Consolas', monospace; font-size: 13px; color: var(--zyjs-text-medium); background: var(--zyjs-bg); padding: 2px 6px; border-radius: 4px; }
.zyjs-table .col-level { font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 500; white-space: nowrap; }
.level-benke { background: rgba(25, 40, 135, 0.1); color: var(--zyjs-primary); }
.level-zhuanke { background: rgba(245, 166, 35, 0.1); color: var(--zyjs-orange); }

/* 分页 */
.zyjs-pagination { display: flex; justify-content: center; align-items: center; padding: 16px 0; gap: 6px; }
.zyjs-pagination .page-btn {
    min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--zyjs-border); border-radius: 6px; background: white;
    color: var(--zyjs-text); font-size: 0.9rem; cursor: pointer; transition: all 0.2s;
}
.zyjs-pagination .page-btn:hover:not(.disabled):not(.active) { border-color: var(--zyjs-accent); color: var(--zyjs-accent); }
.zyjs-pagination .page-btn.active { background-color: var(--zyjs-primary); border-color: var(--zyjs-primary); color: white; }
.zyjs-pagination .page-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.zyjs-pagination .page-info { margin: 0 12px; font-size: 0.85rem; color: var(--zyjs-text-medium); }

/* ==========================================
   详情页样式（参考小程序卡片式布局）
   ========================================== */

/* 面包屑 */
.zyjs-breadcrumb {
    font-size: 14px;
    color: var(--zyjs-text-light);
    padding: 8px 0;
}
.zyjs-breadcrumb a {
    color: var(--zyjs-accent);
    text-decoration: none;
    transition: color 0.2s;
}
.zyjs-breadcrumb a:hover { color: var(--zyjs-primary); }
.zyjs-breadcrumb .sep { margin: 0 8px; font-size: 10px; color: #ccc; }
.zyjs-breadcrumb .current { color: var(--zyjs-text); font-weight: 500; }

/* 加载 / 空状态 */
.zyjs-loading-box,
.zyjs-empty-box {
    text-align: center;
    padding: 80px 20px;
    color: var(--zyjs-text-light);
}
.zyjs-loading-box i,
.zyjs-empty-box i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}
.zyjs-empty-box p {
    font-size: 16px;
    margin-bottom: 20px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: white;
    border: 1px solid var(--zyjs-border);
    border-radius: 8px;
    color: var(--zyjs-text);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-back:hover {
    border-color: var(--zyjs-primary);
    color: var(--zyjs-primary);
    background: var(--zyjs-primary-light);
}

/* ===== Hero 头部卡片（参考小程序蓝色渐变） ===== */
.zyjs-hero {
    background: linear-gradient(135deg, var(--zyjs-primary-dark) 0%, var(--zyjs-blue) 100%);
    padding: 32px 28px 24px;
    color: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(25, 40, 135, 0.25);
    margin-bottom: 0;
}

.hero-discipline {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.hero-name-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0 16px;
}

.hero-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.hero-btn {
    background: rgba(255, 255, 255, 0.95);
    color: var(--zyjs-primary-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 24px;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
    flex-shrink: 0;
}
.hero-btn:hover {
    background: white;
    color: var(--zyjs-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.hero-ratio {
    margin-top: 14px;
    font-size: 13px;
    opacity: 0.9;
}

/* ===== 自定义 Tab 切换（参考小程序吸顶Tab） ===== */
.zyjs-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-top: -1px;
    border-top: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.zyjs-tab {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    font-size: 15px;
    color: var(--zyjs-text-medium);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    user-select: none;
}

.zyjs-tab:hover { color: var(--zyjs-blue); }

.zyjs-tab.active {
    color: var(--zyjs-blue);
    font-weight: 600;
}

.zyjs-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    right: 30%;
    height: 3px;
    background: var(--zyjs-blue);
    border-radius: 2px;
}

/* Tab 内容区 */
.zyjs-tab-content {
    padding: 16px 0;
}

/* ===== Section 卡片（参考小程序 section 样式） ===== */
.detail-section {
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.detail-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    padding-left: 14px;
    border-left: 4px solid var(--zyjs-blue);
    line-height: 1.4;
}

.detail-section-title i {
    margin-right: 6px;
    color: var(--zyjs-blue);
    font-size: 14px;
}

.detail-section-body {
    font-size: 14px;
    color: #444;
    line-height: 1.8;
    white-space: pre-wrap;
}

.detail-section-body p {
    margin-bottom: 8px;
}
.detail-section-body p:last-child {
    margin-bottom: 0;
}

/* 学科要求高亮（参考小程序黄色高亮） */
.detail-highlight {
    background: #fffbeb;
    padding: 14px 16px;
    border-radius: 8px;
    color: #92400e;
}

.detail-highlight strong {
    color: #92400e;
    text-decoration: underline;
    text-decoration-color: rgba(146, 64, 14, 0.3);
}

/* 知识能力编号列表（参考小程序圆形序号） */
.knowledge-list {
    padding: 4px 0;
    list-style: none;
    margin: 0;
}

.knowledge-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
    line-height: 1.7;
}

.knowledge-item:last-child { margin-bottom: 0; }

.knowledge-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8f0fe;
    color: var(--zyjs-primary-dark);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
    margin-top: 3px;
}

.knowledge-text {
    font-size: 14px;
    color: #444;
    flex: 1;
}

/* 课程标签云（参考小程序浅蓝药丸标签） */
.course-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.course-tag {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    transition: all 0.2s;
}

.course-tag:hover {
    background: #dbeafe;
}

/* ===== 薪资柱形图（垂直柱形图） ===== */
.salary-chart { padding: 16px 8px 0; }

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
    height: 220px;
    border-bottom: 2px solid var(--zyjs-border);
    border-left: 2px solid var(--zyjs-border);
    padding: 0 12px;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100px;
    min-width: 40px;
}

.chart-bar-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--zyjs-primary-dark);
    margin-bottom: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s 0.6s;
}

.chart-bar-area {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.chart-bar-col {
    width: 70%;
    max-width: 48px;
    min-width: 20px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--zyjs-blue) 0%, var(--zyjs-primary-dark) 100%);
    transition: height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.chart-bar-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 60%);
    border-radius: 6px 6px 0 0;
}

.chart-bar-label {
    font-size: 12px;
    color: var(--zyjs-text-medium);
    margin-top: 10px;
    white-space: nowrap;
    text-align: center;
}

/* 动画完成后显示数值 */
.chart-bar-col.animated + .chart-bar-value,
.chart-bar-group:hover .chart-bar-value {
    opacity: 1;
}

/* ===== 排名列表（地区/行业/职业分布） ===== */
.rank-list { padding: 4px 0; }

.rank-card { margin-bottom: 10px; }
.rank-card:last-child { margin-bottom: 0; }

.rank-row {
    display: flex;
    align-items: center;
}

.rank-index {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
    color: white;
    background: #ccc;
}

.rank-index.top { background: var(--zyjs-blue); }

.rank-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-percent {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-left: 8px;
    flex-shrink: 0;
    min-width: 50px;
    text-align: right;
}

.rank-bar-wrap {
    height: 14px;
    background: #f0f0f0;
    border-radius: 7px;
    overflow: hidden;
    margin: 5px 0 4px 34px;
}

.rank-bar-fill {
    height: 100%;
    border-radius: 7px;
    min-width: 4px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rank-bar-fill.blue { background: var(--zyjs-blue); }
.rank-bar-fill.blue-light { background: #90caf9; }
.rank-bar-fill.green { background: var(--zyjs-green); }
.rank-bar-fill.green-light { background: #86efac; }
.rank-bar-fill.orange { background: var(--zyjs-orange); }
.rank-bar-fill.orange-light { background: #fdba74; }

.rank-jobs {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-left: 34px;
    word-break: break-all;
    margin-bottom: 4px;
}

/* 空数据 */
.detail-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--zyjs-text-light);
}
.detail-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}
.detail-empty p { font-size: 14px; }

/* 返回按钮栏 */
.zyjs-back-bar {
    text-align: center;
    padding: 24px 0 32px;
}

/* ==========================================
   响应式
   ========================================== */
@media (max-width: 768px) {
    .zyjs-container { padding: 12px; }

    .module-header { padding: 20px 15px 16px; }
    .module-header h2 { font-size: 1.5rem; }

    .degree-tab {
        padding: 10px 8px; font-size: 0.85rem;
        display: flex; align-items: center; gap: 4px;
    }
    .degree-tab i { display: block; }

    .zyjs-search-row { gap: 8px; }
    .search-input { height: 38px; font-size: 13px; }
    .search-btn { height: 38px; padding: 0 16px; font-size: 13px; }

    .cascade-header { padding: 10px 12px; }
    .cascade-label { min-width: 60px; font-size: 12px; }
    .cascade-value { font-size: 13px; }
    .cascade-options { padding: 6px 12px 10px; gap: 6px; max-height: 180px; }
    .cascade-option { padding: 5px 10px; font-size: 12px; }
    .cascade-search-bar { padding: 0 12px 10px; }
    .cascade-search-input { height: 32px; font-size: 12px; }
    .cascade-status { padding: 8px 12px; font-size: 12px; }

    .zyjs-table { font-size: 13px; }
    .zyjs-table thead th, .zyjs-table tbody td { padding: 8px 6px; }
    .zyjs-table .hide-mobile { display: none; }

    /* 详情页响应式 */
    .zyjs-hero { padding: 24px 20px 20px; }
    .hero-name { font-size: 22px; }
    .hero-name-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .hero-btn { align-self: flex-start; }
    .hero-tag { font-size: 12px; padding: 4px 10px; }

    .zyjs-tab { font-size: 14px; padding: 12px 0; }

    .detail-section { padding: 14px 16px; margin-bottom: 10px; }
    .detail-section-title { font-size: 14px; }
    .detail-section-body { font-size: 13px; }

    .salary-year { width: 48px; font-size: 12px; }
    .salary-value { width: 72px; font-size: 13px; }
    .chart-bars { height: 160px; padding: 0 4px; }
    .chart-bar-col { max-width: 36px; }
    .chart-bar-value { font-size: 11px; }
    .chart-bar-label { font-size: 11px; }
    .rank-bar-wrap { margin-left: 34px; }
    .rank-jobs { margin-left: 34px; font-size: 12px; }
}
