#tech-tree {
    max-width: 100%;
    padding: 20px;
    overflow-x: scroll;
    position: relative;
}

#tech-tree-area {
    display: flex;
    align-items: center;
    position: relative;
}

.tech-node:not(.allied-node), .allied-over-wrap {
    display: flex;
    flex-direction: column;
    border: 3px solid #339ab4;
    border-radius: 10px;
    background-color: #c3ae7b;
    position: relative;
    z-index: 10;
}

.tech-node.allied-node {
    display: flex;
    position: relative;
}

.tech-node.allied-node .allied {
    height: calc(100% - 6px);
    width: 40px;
    border-radius: 5px;
    position: absolute;
    left: calc(100% - 15px);
    top: 3px;
    z-index: 5;
}

.tech-node.allied-node .allied img {
    width: 40px;
    position: absolute;
    right: -15px;
    top: 7px;
}

.tech-node.allied-node .allied-egypt {
    background-color: #5dc298;
}

.tech-node.allied-node .allied-china {
    background-color: #6c67b0;
}

.tech-node.allied-node .allied-maya_empire {
    background-color: #e8952e;
}

.tech-node.allied-node .allied-viking_kingdom {
    background-color: #5a98bd;
}

.tech-node.allied-node .allied-arabia {
    background-color: #bf6060;
}

.tech-node.allied-node .allied-ottoman_empire {
    background-color: #30a441;
}

.tech-node-wrap {
    display: flex;
    height: 60px;
    min-width: 200px;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.tech-node-wrap .icon {
    width: 50px;
    height: 50px;
}

.tech-node-wrap .title {
    flex-grow: 1;
    font-family: "Roboto", sans-serif;
    font-size: 18px;
    text-align: center;
}

.tech-node-researched {
    border-radius: 0 0 5px 5px;
    border: 0;
    border-top: 1px solid #339ab4;
}

.tech-node.selected:not(.allied-node), .tech-node.selected .allied-over-wrap,
.tech-node.researched .tech-node-researched {
    border-color: #3ea525;
    background-color: #91e252;
}

.tech-group {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* SVG arrows */
.tech-connector {
    flex: 1 0 100px;
    align-self: stretch;
    position: relative;
}

svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#arrowhead {
    fill: #47d9ff;
}

.tech-connector .base .arrow {
    stroke-width: 10;
    fill: none;
    stroke: #47d9ff;
}

.tech-connector .highlight .arrow {
    stroke-width: 10;
    fill: none;
    stroke: #91e252;
}