body {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(20, 20, 20);
    color: rgb(20,20,20);
    font-family: 'Segoe UI', Calibri, Tahoma, Geneva, Verdana, sans-serif;
}

::-webkit-scrollbar {
    width: 4px; 
    height: 4px;
}

::-webkit-scrollbar-thumb {
    background-color: #888; 
    border-radius: 10px; 
}

::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px; 
}

@keyframes routerIn {
    0% {
        opacity: 0;
        scale: 0.9;
    }
    50% {
        opacity: 1;
        scale: 1.2;
    }
    100% {
        opacity: 1;
        scale: 1;
    }
}

@keyframes lineIn {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}


#sectionsContainer {
    display: grid;
    grid-template-columns: 75% 25%;
    grid-template-rows: 75% 25%;
    grid-template-areas: 
        "simContainer settingsContainer"
        "simContainer logContainer";
    gap: 5px;
    width: 95vw;
    height: 95vh;
}

#simContainer,
#settingsContainer,
#logContainer  {
    border: solid 2px rgb(255, 255, 255);
    display: flex;
    background-color: rgb(220, 220, 220);
}

#simContainer {
    position: relative;
    grid-area: simContainer;
    border-radius: 20px 5px 5px 20px;
    padding: 10px;
}

.routerElement {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid gray;
    align-items: center;
    width: 100px;
    height: 100px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background-color: rgb(255, 255, 255);
    z-index: 2;
    cursor: grab;
    opacity: 0;
    animation: routerIn 0.4s ease forwards;
    transition: 0.2s ease all;
    ::selection {
        background-color: transparent;
    }
}

.routerElement:hover {
    scale: 1.05;
    box-shadow: 0 0 15px rgba(0,0,0,0.15);
}

.routerElement:active {
    scale: 0.98 !important;
    box-shadow: 0 0 0 transparent;
}

.highlightedRouter {
    background-color: rgb(149, 0, 0);
    color: rgb(240,240,240);
    scale: 1.3 !important;
}

.lightHighlightedRouter {
    background-color: rgb(255, 174, 0);
    scale: 1.1 !important;
}

#numberOfRouters {
    border-radius: 5px;
    border: solid 1px rgb(20, 20, 20);
    padding: 2px 6px;
}

.routerLabel {
    font-size: 30px;
    font-weight: 500;
}

.connectionLine {
    position: absolute;
    height: 3px;
    background-color: rgb(50, 50, 50);
    transform-origin: 0 50%;
    z-index: 1;
    padding: 0;
    margin: 0;
    opacity: 0;
    animation: lineIn 0.2s 0.1s ease forwards;
}

.highlightedConnection {
    background-color: rgb(187, 0, 0);
    height: 5px;
}

.distanceLabel {
    position: absolute;
    background-color: orange;
    font-size: 20px;
    padding: 3px 6px;
    z-index: 2;
    border-radius: 10px;
    margin: 0;
    opacity: 0;
    animation: routerIn 0.3s 0.2s ease forwards;
    ::selection {
        background-color: transparent;
    }
}

#settingsContainer {
    grid-area: settingsContainer;
    border-radius: 5px 20px 5px 0;
    display: flex;
    flex-direction: column;
    padding: 10px;
    overflow: hidden;
}

.generateButton {
    width: fit-content;
    height: fit-content;
    padding: 5px 10px;
    border-radius: 50px;
    border: solid 1px rgb(20,20,20);
    margin: 10px 4px;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    transition: 0.2s ease all;
}

.generateButton:active {
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    scale: 0.95;
}

#title {
    font-size: 30px;
    text-align: center;
    font-family: 'Segoe UI', Calibri, Tahoma, Geneva, Verdana, sans-serif;
    padding-bottom: 20px;
    border-bottom: 1px solid black;
}

#settingsForm {
    display: flex;
    flex-direction: column;
}

.generateSettings {
    display: flex;
    padding: 5px;
    justify-content: space-between;
    align-items: center;
}

.generateSettings div {
    display: flex;
    flex-direction: column;
    width: fit-content;
}

.generateSettings div label {
    margin-bottom: 5px;
}

#executionButtonsContainer {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
}

.executeBtn {
    border-radius: 10px;
    margin: 5px 4px;
    border: solid 1px rgb(20, 20, 20);
    padding: 20px 10px;
    font-size: 18px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: 0.2s ease all;
}

.executeBtn:active {
    scale: 0.97;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.tableContainer {
    overflow-y: scroll;
    overflow-x: scroll;
    padding-left: 4px;
}

table {
    background-color: rgb(230, 230, 230);
    border: solid 1px rgb(20, 20, 20);
    border-radius: 16px;
    padding: 5px;
    border-spacing: 0;
}

table td {
    padding: 5px;
    width: fit-content;
    width: 100px;
    margin: 0;
    transition: 0.2s ease background-color;
}

tr {
    transition: 0.2s ease background-color;
}

tr:first-child,
tr td:first-child {
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px 0 0 12px;
}

tr td:last-child {
    border-radius: 0 12px 12px 0;
}

.highlightedRow {
    background-color: rgb(187, 0, 0);
    color: rgb(240,240,240);
}

#logContainer {
    grid-area: logContainer;
    display: flex;
    flex-direction: column;
    overflow:  scroll;
    border-radius: 0px 5px 5px 5px;
}

.clearBtn {
    position: sticky;
    width: fit-content;
    height: fit-content;
    padding: 2px 5px;
    margin: 2px;
    margin-left: auto;
    border-radius: 5px;
    border: solid 1px rgb(20, 20, 20);
    cursor: pointer;
}

#logs {
    font-size: 14px;
    font-family: monospace;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-wrap: wrap;
    overflow-y: scroll;
    overflow-x: hidden;
    height: 100%;
    padding: 5px;
}

#logs p {
    margin: 0;
}