/* Graph panel — unified dark theme */
.graph-panel {
    flex: 1;
    position: relative;
    background: var(--color-bg-graph);
    overflow: hidden;
}

.graph-panel svg {
    width: 100%;
    height: 100%;
    cursor: move;
}

/* Title */
.graph-title {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* Controls */
.graph-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.graph-controls button,
.graph-controls select {
    padding: 7px 12px;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
    color: var(--color-text);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition);
}

.graph-controls button:hover,
.graph-controls select:hover {
    background: var(--color-border-primary);
    border-color: var(--color-accent);
}

.graph-controls select option {
    background: var(--color-bg-secondary);
    color: var(--color-text);
}

/* D3 nodes */
.node {
    cursor: pointer;
    transition: filter 0.15s;
}

.node:hover {
    filter: brightness(1.2) drop-shadow(0 0 6px rgba(255,255,255,0.3));
}

.node-label {
    font-size: 11px;
    font-weight: 600;
    pointer-events: none;
    fill: #f0f0f0;
    text-shadow: 0 0 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.7);
}

/* D3 links */
.link {
    stroke-opacity: 0.4;
}

.link:hover {
    stroke-opacity: 1;
    stroke-width: 3px !important;
}

.link-label {
    font-size: 10px;
    fill: var(--color-text-secondary);
    pointer-events: none;
    text-shadow: 0 0 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.7);
}

/* Legend */
.legend {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    z-index: 10;
    background: rgba(22, 33, 62, 0.92);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-secondary);
    font-size: 13px;
    color: var(--color-text);
    backdrop-filter: blur(8px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: opacity var(--transition);
}

.legend-item:hover {
    opacity: 0.8;
}

.legend-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.3);
}
