/* Ego Graph Modal */
.ego-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}
.ego-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ego-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}
.ego-modal-content {
    position: relative;
    background: var(--bg-primary, #0d1117);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 12px;
    width: 90vw;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.ego-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary, #8b949e);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2;
    padding: 0.25rem;
    line-height: 1;
}
.ego-modal-close:hover {
    color: var(--text-primary, #e6edf3);
}
.ego-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0.75rem;
}
.ego-modal-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color, #30363d);
    background: var(--bg-card, #161b22);
}
.ego-modal-name {
    font-size: 1.2rem;
    font-weight: 700;
}
.ego-modal-meta {
    font-size: 0.85rem;
    color: var(--text-secondary, #8b949e);
    margin-top: 2px;
}
.ego-modal-graph {
    width: 100%;
    height: 400px;
    border-top: 1px solid var(--border-color, #30363d);
    border-bottom: 1px solid var(--border-color, #30363d);
}
.ego-modal-legend {
    display: flex;
    gap: 1.5rem;
    padding: 0.6rem 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted, #484f58);
}
.ego-modal-legend .leg-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

/* Network button in ranked list */
.network-btn {
    background: none;
    border: 1px solid var(--border-color, #30363d);
    border-radius: 6px;
    color: var(--text-secondary, #8b949e);
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}
.network-btn:hover {
    border-color: #58a6ff;
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.08);
}
