/* 图谱可视化样式 */

.graph-view {
    padding: 20px;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

.graph-controls {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group .form-control {
    height: 36px;
}

.graph-stats {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-item i {
    font-size: 32px;
    color: #409EFF;
    margin-bottom: 10px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin: 10px 0;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #909399;
}

.graph-container {
    flex: 1;
    display: flex;
    gap: 20px;
    min-height: 0;
}

.graph-canvas {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.graph-node-details {
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-y: auto;
}

.graph-node-details h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #409EFF;
    padding-bottom: 10px;
}

.graph-node-details p {
    margin: 10px 0;
    line-height: 1.6;
    color: #606266;
}

.graph-node-details strong {
    color: #2c3e50;
    margin-right: 5px;
}

/* 图谱加载动画 */
.graph-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.graph-loading i {
    font-size: 48px;
    color: #409EFF;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 图谱节点样式（vis.js覆盖） */
.vis-network-tooltip {
    position: absolute;
    visibility: hidden;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000;
}

/* 响应式 */
@media (max-width: 1200px) {
    .graph-container {
        flex-direction: column;
    }
    
    .graph-node-details {
        width: 100%;
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .graph-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


