#tree {
    display: flex;
    flex-direction: column-reverse; /* Inverte a direção: root embaixo */
    align-items: center;
    gap: 40px;
    min-height: 60vh;
    transition: 0.2s;
}

.generation {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.node {
    padding: 15px 25px;
    border: 2px solid #333;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}
.node:hover {
    transform: scale(1.05);
    background: #f0f0f0;
}
.hidden {
    display: none;
}
.selected {
    background-color: lightblue;
}