* {
    box-sizing: border-box;
    color: black;
}
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

#treeStructure {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: white;
}
#treeStructure input, button {
    outline: none;
}
#tree__root {
    width: 100%;
    height: 100%;
    overflow: auto;
    position: relative;
}
#tree__node {
    width: 100%;
    height: 100%;
}
#tree__scale {
    transform-origin: 0 0;
}
.tree__node {
    display: flex;
}
.tree__node__outer {
    text-align: center;
    position: relative;
}
.tree__node__flex {
    width: 300px;
    margin: 20px;
    display: inline-block;
    position: relative;
    background-color: white;
    padding-top: 10px;
    border: 2px solid transparent;
    cursor: pointer;
}
.tree__node__current {
    background-color: green;
    box-shadow: 3px 3px 10px green, -3px 3px 10px green, 3px -3px 10px green, -3px -3px 10px green;
}
.tree__node__parent {
    background-color: red;
    box-shadow: 3px 3px 10px red, -3px 3px 10px red, 3px -3px 10px red, -3px -3px 10px red;
}
.tree__node__img {
    width: 100%;
    height: 200px;
    margin: 0 auto;
    overflow: hidden;
    background-color: black;
}
.tree__node__img img {
    width: 100%;
    height: 100%;
}
.tree__node__name {
    text-align: center;
    margin: 10px 0;
    font-size: 18px;
    font-weight: bold;
    overflow: hidden;
}
.tree__node__text {
    text-align: center;
    margin: 10px 0;
    overflow: hidden;
}
.tree__container {
    position: absolute;
    left: 15px;
    top: 15px;
    justify-content: space-between;
}
.tree__btn {
    display: flex;
    flex-direction: column;
}
.tree__btn button, .tree__btn label {
    margin-bottom: 5px;
    width: 100%;
    border: none;
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
}
.tree__node__bottom {
    width: 4px;
    background-color: black;
    height: 50%;
    position: absolute;
    z-index: -1;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
}
.tree__node__top {
    width: 4px;
    background-color: black;
    height: 50%;
    position: absolute;
    z-index: -1;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
}
.tree__node__left {
    height: 4px;
    background-color: black;
    width: 50%;
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
}
.tree__node__right {
    height: 4px;
    background-color: black;
    width: 50%;
    position: absolute;
    z-index: -1;
    top: 0;
    right: 0;
}
#tree__addNode {
    width: 500px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 1;
}
#tree__updateNode {
    width: 500px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 1;
}
.tree__addNode {
    border: 1px solid black;
    border-radius: 15px;
    padding: 20px 30px;
    background-color: white;
}
.tree__addNode-text {
    font-size: 16px;
    margin: 5px 0;
}
.tree__addNode-input input {
    width: 100%;
    padding: 10px 15px;
    background-color: rgb(224, 224, 224);
    border: none;
    border-radius: 10px;
}
.tree__addNode-btns {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
}
.tree__addNode-add, .tree__addNode-close {
    width: 210px;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;
}
.tree__addNode-add {
    background-color: green;
}
.tree__addNode-close {
    background-color: red;
}
.tree__btn-menu {
    width: 100%;
    height: 25px;
    border-radius: 5px;
    border: transparent;
    cursor: pointer;
    margin-bottom: 10px;
}
.tree__btn-menu img {
    width: 100%;
    height: 100%;
}
.tree__menu {
    text-align: center;
    width: 95px;
}
.tree__menu button {
    height: 25px;
}
#tree__menu-close {
    display: none;
}
#tree__btn {
    display: none;
}
.tree__scale {
    position: absolute;
    left: 100px;
    display: flex;
    top: 0;
}
.tree__scale-btn {
    width: 25px;
    height: 25px;
    cursor: pointer;
    border: transparent;
    border-radius: 5px;
    margin: 0 3px;
}
#tree__file {
    display: none;
}
.tree__scrollToId {
    width: 55px;
    margin: 0 3px;
    outline: none;
}
.tree__moveToId {
    width: 40px;
    cursor: pointer;
    margin: 0 3px;
}

@media screen and (max-width: 510px) {
    #tree__addNode, #tree__updateNode {
        width: 97%;
        padding: 20px 15px;
    }
    .tree__addNode-btns {
        display: block;
        margin: 0 auto;
        text-align: center;
    }
    #tree__scale {
        padding-top: 250px;
    }
}
@media screen and (max-height: 450px) {
    .tree__container {
        max-height: calc(100% - 45px);
        overflow: auto;
        padding-right: 10px;
        padding-bottom: 5px;
    }
}