@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

body {
    background-color: black;
    padding: 0;
    margin: 0;
    overflow: hidden;

    user-select: none;
        -moz-user-select: none;
        -khtml-user-select: none;
        -webkit-user-select: none;
        -o-user-select: none;
}




#toolbox {
    z-index: 9999;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 1px;
    width: 10vw;
    min-width: 140px;
    margin: 25px;
    overflow: auto;
    
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

#toolbox section {
    margin: 5px;
    padding: 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.5);

    font-family: "Nunito", sans-serif;
    color: #222;

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
}

#toolbox section h2 {
    font-size: 1.75em;
    margin: 0;
    flex: 1 100%;
}
#toolbox section button {
    padding: 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-family: "Nunito", sans-serif;
    font-weight: 600;
    font-size: 1em;
    color: #222;
    cursor: pointer;
    transition: 0.05s;

    flex: 1;
    flex-shrink: 0;
}
#toolbox section button:hover {
    background: rgba(122, 143, 151, 0.1);
}
#toolbox section button.active {
    background: rgba(122, 143, 151, 0.5);
}
#toolbox section button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#toolbox section button:disabled:hover {
    background: rgba(255, 255, 255, 0.5);
}




#container {
    /*border: 1px solid white;
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 97dvw;
    max-height: 97dvh;
    transform: translate(-50%, -50%);*/

    user-select: none;
        -moz-user-select: none;
        -khtml-user-select: none;
        -webkit-user-select: none;
        -o-user-select: none;
}

.gate {
    position: absolute;
    padding: 5px;
    width: 60px;
    height: 100px;
    transition: background-color 0.2s;
    color: white;
}
.gateBody {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border: 1px solid white;
    border-radius: 5px;
    background-color: #333;
    z-index: 2;
    /*cursor: move;*/
}
.gateType {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(-3px, 5px);
    font-family: Arial, Helvetica, sans-serif;
    z-index: 3;
    pointer-events: none;
    text-align: right;
}

.input1, .input2 {
    border: 1px solid white;
    background-color: #333;
    border-radius: 5px;
    padding: 5px;
    top: 0;
    left: 50%;
    z-index: 1;
    width: 30%;
}
.input1 {
    transform: translate(-100%, 7px);
}
.input2 {
    transform: translate(-100%, 70px);
}
.input1:hover, .input2:hover, .output:hover {
    background-color: #c03131;
    cursor: pointer;
}
.output {
    position: relative;
    border: 1px solid white;
    background-color: #333;
    border-radius: 5px;
    padding: 5px;
    top: 0;
    left: 50%;
    transform: translate(90%, 20px);
    z-index: 1;
    width: 30%;
}

table {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    z-index: 3;
}

svg {
    position: absolute;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 999;
    pointer-events: none;
}
polyline {
    stroke: blue;
    stroke-width: 4;
    fill: none;
}