/* ==========================================================
   墨睿智能 · 招聘知识图谱 Knowledge.css
   保持与 Searchcand/matchcand 一致的深色紫蓝科技风格
   ========================================================== */

main { max-width: 1200px; margin: 0 auto; padding: 0 36px 60px; }

/* ========== Hero ========== */
.kg-hero { text-align: center; padding: 140px 0 24px; position: relative; }
.kg-hero-icon {
    width: 84px; height: 84px; border-radius: 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #3b82f6 100%);
    display: flex; align-items: center; justify-content: center;
    color: white; margin: 0 auto 16px;
    box-shadow: 0 12px 40px rgba(59, 130, 246,0.35), 0 0 0 1px rgba(255,255,255,0.08);
}
.kg-hero-icon svg { width: 44px; height: 44px; }

/* ========== 统计卡片 ========== */
.kg-stats {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 12px;
    backdrop-filter: blur(10px); transition: all 0.25s;
}
.stat-card:hover {
    transform: translateY(-2px); border-color: rgba(59, 130, 246,0.35);
    box-shadow: 0 8px 28px rgba(59, 130, 246,0.15);
}
.stat-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-info { min-width: 0; }
.stat-value {
    font-size: 22px; font-weight: 700; color: #fff;
    font-family: 'DIN Alternate', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #fff, #bfdbfe);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 12px; color: #9ca3af; margin-top: 2px; }

/* ========== 主体三栏 ========== */
.kg-main {
    display: grid; grid-template-columns: 260px 1fr 300px; gap: 16px;
    margin-bottom: 40px; min-height: 640px;
}
.kg-panel {
    background: rgba(20,20,32,0.85); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px; padding: 18px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    max-height: 640px; overflow-y: auto;
}
.kg-panel::-webkit-scrollbar { width: 6px; }
.kg-panel::-webkit-scrollbar-thumb { background: rgba(59, 130, 246,0.3); border-radius: 3px; }
.kg-panel::-webkit-scrollbar-track { background: transparent; }

/* ========== 搜索框 ========== */
.kg-search-wrap { margin-bottom: 18px; position: relative; }
.kg-search-box {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 0 14px; height: 42px;
    transition: all 0.25s;
}
.kg-search-box:focus-within {
    border-color: rgba(59, 130, 246,0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246,0.15);
}
.kg-search-box .search-icon svg { width: 16px; height: 16px; color: #9ca3af; flex-shrink: 0; }
.kg-search-input {
    flex: 1; background: transparent; border: none; outline: none;
    color: #fff; font-size: 14px; height: 100%;
}
.kg-search-input::placeholder { color: #6b7280; }
.kg-search-suggest {
    position: absolute; top: 46px; left: 0; right: 0; z-index: 50;
    background: rgba(22,22,38,0.98); border: 1px solid rgba(59, 130, 246,0.3);
    border-radius: 12px; padding: 6px; max-height: 240px; overflow-y: auto;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.sg-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 8px; cursor: pointer;
    font-size: 13px; color: #d1d5db; transition: background 0.15s;
}
.sg-item:hover { background: rgba(59, 130, 246,0.18); color: #fff; }
.sg-item-tag {
    font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-left: auto;
    background: rgba(255,255,255,0.08); color: #9ca3af;
}

/* ========== 面板小节 ========== */
.kg-panel-sec { margin-bottom: 20px; }
.kg-panel-sec:last-child { margin-bottom: 0; }
.kg-panel-title {
    font-size: 13px; font-weight: 600; color: #93c5fd;
    margin: 0 0 10px; padding-left: 10px; position: relative;
    letter-spacing: 0.5px;
}
.kg-panel-title::before {
    content: ''; position: absolute; left: 0; top: 3px;
    width: 3px; height: 12px; border-radius: 2px;
    background: linear-gradient(180deg, #93c5fd, #3b82f6);
}

/* ========== 图例/分类 ========== */
.kg-legend-list { display: flex; flex-direction: column; gap: 7px; }
.legend-item {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 10px; border-radius: 8px; cursor: pointer;
    font-size: 13px; color: #d1d5db; transition: all 0.2s;
}
.legend-item:hover { background: rgba(255,255,255,0.05); }
.legend-item.disabled { opacity: 0.35; }
.legend-dot {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}
.legend-name { flex: 1; }
.legend-count {
    font-size: 11px; color: #9ca3af;
    background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 4px;
}

/* ========== 控制按钮 ========== */
.kg-ctrl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kg-ctrl-btn {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    color: #d1d5db; padding: 7px 8px; border-radius: 8px; font-size: 12px;
    cursor: pointer; transition: all 0.2s;
}
.kg-ctrl-btn:hover {
    background: rgba(59, 130, 246,0.18); color: #fff;
    border-color: rgba(59, 130, 246,0.4);
}

/* ========== 热门标签 ========== */
.kg-hot-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.kg-hot-tag {
    padding: 4px 10px; font-size: 12px; border-radius: 14px;
    background: rgba(255,255,255,0.05); color: #d1d5db;
    border: 1px solid rgba(255,255,255,0.08); cursor: pointer;
    transition: all 0.2s;
}
.kg-hot-tag:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246,0.25), rgba(59, 130, 246,0.25));
    color: #fff; border-color: rgba(59, 130, 246,0.4);
}

.kg-tips { font-size: 12px; color: #9ca3af; line-height: 1.9; }
.kg-tips p { margin: 0; }
.tip-hl { color: #bfdbfe; font-weight: 500; }

/* ========== 图谱画布 ========== */
.kg-canvas-wrap {
    background: rgba(10,10,20,0.6); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px; position: relative; overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 0 60px rgba(59, 130, 246,0.04);
    min-height: 640px; display: flex; flex-direction: column;
}
.kg-canvas-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}
.kg-canvas-title {
    font-size: 15px; font-weight: 600; color: #fff;
    display: flex; align-items: center; gap: 8px;
}
.kg-canvas-title::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: #3b82f6; box-shadow: 0 0 8px #3b82f6;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.kg-canvas-meta { font-size: 12px; color: #9ca3af; }
.kg-chart { flex: 1; min-height: 580px; }

.kg-loading {
    position: absolute; top: 70px; left: 0; right: 0; bottom: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(10,10,20,0.7); backdrop-filter: blur(2px); z-index: 10;
}
.loading-bar {
    width: 200px; height: 3px; background: rgba(255,255,255,0.1);
    border-radius: 2px; overflow: hidden; margin-bottom: 14px;
}
.loading-bar-inner {
    height: 100%; width: 30%;
    background: linear-gradient(90deg, #3b82f6, #3b82f6);
    border-radius: 2px;
    animation: loadingBar 1.4s ease-in-out infinite;
}
@keyframes loadingBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}
.loading-text { color: #9ca3af; font-size: 13px; margin: 0; }

/* ========== 右侧详情面板 ========== */
.kg-detail-empty {
    height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 40px 10px; color: #6b7280;
}
.kg-detail-empty-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255,255,255,0.04); display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px; color: #93c5fd; opacity: 0.5;
}
.kg-detail-empty-icon svg { width: 28px; height: 28px; }
.kg-detail-empty-text { font-size: 13px; line-height: 1.8; margin: 0; }

.kg-detail-head {
    display: flex; align-items: flex-start; gap: 12px;
    padding-bottom: 14px; margin-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.detail-avatar {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.detail-avatar.person { background: linear-gradient(135deg, #3b82f6, #3b82f6); }
.detail-avatar.company { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.detail-avatar.school { background: linear-gradient(135deg, #3b82f6, #34d399); }
.detail-avatar.skill { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.detail-avatar.industry { background: linear-gradient(135deg, #ef4444, #f87171); }
.detail-avatar.position { background: linear-gradient(135deg, #ec4899, #f472b6); }
.detail-avatar.city { background: linear-gradient(135deg, #3b82f6, #c084fc); }
.detail-head-main { flex: 1; min-width: 0; }
.detail-name {
    font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 4px;
    word-break: break-all;
}
.detail-type-badge {
    display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px;
    background: rgba(147, 197, 253,0.12); color: #93c5fd;
}
.detail-meta-list { margin: 0 0 16px; padding: 0; list-style: none; }
.detail-meta-list li {
    display: flex; gap: 8px; font-size: 12.5px; padding: 5px 0;
    color: #9ca3af;
}
.detail-meta-list li .meta-k { color: #6b7280; min-width: 60px; flex-shrink: 0; }
.detail-meta-list li .meta-v { color: #d1d5db; word-break: break-all; }

.kg-detail-sec { margin-bottom: 16px; }
.detail-sec-title {
    font-size: 12px; font-weight: 600; color: #bfdbfe; margin: 0 0 8px;
    padding-left: 8px; position: relative; letter-spacing: 0.5px;
}
.detail-sec-title::before {
    content: ''; position: absolute; left: 0; top: 3px;
    width: 2px; height: 10px; border-radius: 1px; background: #3b82f6;
}

.detail-rel-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.detail-rel-list::-webkit-scrollbar { width: 4px; }
.detail-rel-list::-webkit-scrollbar-thumb { background: rgba(59, 130, 246,0.3); border-radius: 2px; }
.rel-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; border-radius: 8px; font-size: 12.5px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer; transition: all 0.2s;
}
.rel-item:hover {
    background: rgba(59, 130, 246,0.1); border-color: rgba(59, 130, 246,0.3);
    transform: translateX(2px);
}
.rel-item-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rel-item-name { flex: 1; color: #d1d5db; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-item-edge { font-size: 11px; color: #9ca3af; flex-shrink: 0; }

.detail-skill-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-skill-tag {
    font-size: 11px; padding: 3px 8px; border-radius: 6px;
    background: rgba(59, 130, 246,0.12); color: #bfdbfe; border: 1px solid rgba(59, 130, 246,0.25);
}

.detail-action-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; }
.detail-action-btn {
    padding: 8px; font-size: 12px; border-radius: 8px; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
    color: #d1d5db; transition: all 0.2s;
}
.detail-action-btn:hover { background: rgba(59, 130, 246,0.18); color: #fff; border-color: rgba(59, 130, 246,0.4); }
.detail-action-btn.primary { background: linear-gradient(135deg, #3b82f6, #3b82f6); color: #fff; border: none; }
.detail-action-btn.primary:hover { filter: brightness(1.1); }

/* ========== 应用场景 ========== */
.kg-scenes { padding-top: 20px; }
.kg-scenes-title {
    text-align: center; font-size: 22px; font-weight: 700; color: #fff;
    margin: 0 0 20px;
}
.kg-scenes-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 14px;
}
.kg-scene-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px; padding: 20px; transition: all 0.3s;
}
.kg-scene-card:hover {
    transform: translateY(-3px); border-color: rgba(59, 130, 246,0.3);
    box-shadow: 0 10px 32px rgba(59, 130, 246,0.15);
}
.scene-icon { margin-bottom: 10px; }
.scene-name { font-size: 15px; font-weight: 600; color: #fff; margin: 0 0 6px; }
.scene-desc { font-size: 12.5px; color: #9ca3af; line-height: 1.7; margin: 0; }
.kg-scenes-note {
    text-align: center; font-size: 12px; color: #6b7280;
    padding: 8px 0 0;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .kg-stats { grid-template-columns: repeat(3, 1fr); }
    .kg-main { grid-template-columns: 240px 1fr 270px; }
    .kg-scenes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    main { padding: 0 16px 40px; }
    .kg-stats { grid-template-columns: repeat(2, 1fr); }
    .kg-main { grid-template-columns: 1fr; gap: 12px; }
    .kg-panel { max-height: none; }
    .kg-canvas-wrap { min-height: 480px; }
    .kg-chart { min-height: 420px; }
    .kg-scenes-grid { grid-template-columns: 1fr; }
}
.contact-qr-grid {
    display: flex;
    gap: 24px;
    justify-content: center;
}
.contact-qr-item {
    text-align: center;
}
.contact-qr-img {
    width: 128px;
    height: 128px;
    border-radius: 12px;
    background: white;
    padding: 8px;
    margin-bottom: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.contact-qr-img img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}
.contact-qr-item span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}