#tree-container {
    overflow-x: auto;
    width: 100%;
}

.genealogy-tree {
    width: max-content;
    margin: auto;
}

.genealogy-tree ul {
    padding-top: 20px;
    position: relative;
    display: flex;
    justify-content: center;
}

.genealogy-tree li {
    list-style-type: none;
    text-align: center;
    position: relative;
    padding: 20px 10px 0 10px;
}

/* horizontal line */
.genealogy-tree li::before,
.genealogy-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #ccc;
    width: 50%;
    height: 20px;
}

.genealogy-tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #ccc;
}

/* remove connectors for single child */
.genealogy-tree li:only-child::before,
.genealogy-tree li:only-child::after {
    display: none;
}

/* vertical line */
.genealogy-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #ccc;
    width: 0;
    height: 20px;
}

/* user card */
.tree-node {
    display: inline-block;
    padding: 10px;
    border-radius: 10px;
    background: white;
    border: 1px solid #ddd;
    min-width: 140px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.tree-info {
    font-size: 11px;
    margin-top: 5px;
}