:root {
    --menu-width: 50px;
    --main-bg-color: rgb(47, 58, 68);
    --main-text-color: rgb(197, 197, 197);
    --icon-fill-color: rgb(57, 141, 219);
    --icon-border-color: rgb(82, 172, 255);
    --icon-selected-border-color: rgb(51, 149, 156);
    --key-node-fill-color: rgb(156, 65, 65);
    --key-path-color: rgb(204, 94, 94);
}

@media not all and (prefers-color-scheme: dark) {
    :root:not([theme='dark']) {
        --main-bg-color: rgb(255, 255, 255);
        --main-text-color: rgb(54, 54, 54);
        --icon-fill-color: rgb(82, 172, 255);
        --icon-border-color: rgb(51, 105, 156);
        --icon-selected-border-color: rgb(51, 149, 156);
        --key-node-fill-color: rgb(204, 94, 94);
        --key-path-color: rgb(204, 94, 94);
    }
}

#mark {
    position: absolute;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    font-family: "Times New Roman";
    font-size: 20px;
    margin: 15px;
    user-select: none;
}

body {
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
}

#menu-point {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--menu-width);
    height: var(--menu-width);
    transition: stroke-width 100ms;
    fill: var(--icon-fill-color);
    stroke: var(--icon-border-color);
    background-color: transparent;
    stroke-linecap: round;
    user-select: none;
}

#menu-point svg:hover {
    stroke-width: 2;
}

#menu-point svg:active {
    stroke-width: 3;
}

.selected {
    stroke-width: 2;
    stroke: var(--icon-selected-border-color);
}

#markerArrow {
    transform: scale(0.5);
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: calc(100% - var(--menu-width));
    transition: stroke-width 100ms;
    transition: fill 100ms;
    fill: var(--icon-fill-color);
    stroke: var(--icon-border-color);
    stroke-linecap: round;
}

.key-node {
    fill: var(--key-node-fill-color);
}

.node:hover {
    stroke-width: 2;
}

.node-desc {
    pointer-events: none;
    stroke: none;
    font-family: "Times New Roman";
    font-size: 20px;
    fill: var(--main-text-color);
    transition: opacity 100ms;
    opacity: 0.5;
    user-select: none;
}

.node:hover .node-desc {
    opacity: 1;
}

.path {
    stroke-width: 8;
    transition: stroke 100ms;
}

.key-path {
    stroke: var(--key-path-color);
}

.path:hover {
    stroke-width: 10;
}

.directed {
    marker-end: url(#markerArrow);
}

.path-desc {
    font-family: "Times New Roman";
    font-size: 20px;
    color: var(--main-text-color);
    margin: -20px 0 0;
    position: absolute;
    transform: translateX(-50%);
}

foreignObject {
    overflow: visible;
}