/* 知识图谱相关样式（放在独立 CSS 中，避免 Razor 把 @keyframes 等当成 C#） */
#knowledge-graph {
    width: 100%;
    height: 100%;
}

.node {
    cursor: pointer;
    transition: all 0.3s ease;
}

.node:hover {
    stroke-width: 3px;
}

.link {
    stroke: #999;
    stroke-opacity: 0.6;
    stroke-width: 2px;
}

.node-label {
    font-size: 10px;
    font-weight: 500;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    fill: #2c3e50;
}

.legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 8px;
}

.controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.control-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 9px;
    transition: all 0.3s ease;
    margin: 2px;
}

.control-btn:hover {
    background: #2980b9;
}

.graph-info {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 10px;
    min-width: 150px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: 600;
    color: #2c3e50;
}

.info-value {
    color: #3498db;
    font-weight: 500;
}

.node-info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    z-index: 1000;
    border-left: 4px solid #3498db;
}

.node-info-panel h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.2em;
}

.node-info-panel p {
    margin: 8px 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.exam-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.exam-focus-legend {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
    font-size: 11px;
    color: #7f8c8d;
}

.exam-focus-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ff6b6b;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}
