:root {
    --svg-background-color: rgba(40, 44, 52, 0.925); /*#323139, #212126, #423940 */

    --add-color: #c6d8e3;
    --play-color: #c6d8e3; /* #004fff */
    --header-color: #c6d8e3; /* #004fff */
    --codetrace-code-color: #c6d8e3; /* #004fff */
    --codetrace-current-color: lightgreen;
    --add-hover-color: pink;
    --play-hover-color: red;
    --header-hover-color: lightgreen;
    --header-text-color: black;
    --play-hover-color: pink;
    --borderColor: transparent;
    --fillColor: orange;
    --startFillColor: orange;
    --startBorderColor: lightblue;
  
    --nodeTextColor: white;
    --currentNodeFillColor: green;
    --currentNodeBorderColor: transparent;
    --finishedNodeFillColor: red;
    --finishedNodeBorderColor: transparent;
    --discoveredNodeFillColor: rgb(215, 210, 20);
    --discoveredNodeBorderColor: transparent;
    --comingFromNodeFillColor: rgba(255, 255, 255, 0.3);
    --comingFromNodeBorderColor: orange;

    --currentEdgeStroke: green;
    --discoveredEdgeStroke: red;

    --highlightedEdgeStroke: blue;
    --highlightedNodeFillColor: blue;
    --highlightedNodeBorderColor: #c6d8e3;
}
  
body{
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: column;
}
header{
    width: 100%;
    background: var(--header-color);
}
header ul{
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}
header ul li{
    list-style: none;
    position: relative;
    padding: 10px 0;
    /* transition: 0.5s; */
    box-sizing: border-box;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}
header ul li:not(#logo):hover{ /* If hover problems arise, remove the :not(#logo) part */
    background: var(--header-hover-color);
}
header ul li:last-child{
    border-right: none;
}
header ul li a{
    text-decoration: none;
    padding: 0 20px;
    color: var(--header-text-color);
}
header ul li ul{
    position: absolute;
    top: 38px;
    left: 0;
    background: #000;
    display: block;
    width: 100%;
    /* transition: 0.5s; */
    opacity: 0;
    visibility: hidden;
}
header ul li:hover ul{
    opacity: 1;
    visibility: visible;
}
header ul li ul li{
    border-right: none;
    margin: 0;
    /* padding: 10px 10px 10px 10px; */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}
header ul li ul li a{
    padding: 0;
    margin: 0;
}
#logo{
    text-transform: uppercase;
}
  
.content{
    margin: auto;
    padding: auto;
    width: 100%;
    height: 100%;
    flex: 1;
}
svg{
    width: 100%;
    height: 100%;
    background-color: var(--svg-background-color);
}
  
.add {
    width:55px;
    height:55px;
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(var(--add-color),var(--add-color)) top left, linear-gradient(var(--add-color),var(--add-color)) top right, linear-gradient(var(--add-color),var(--add-color)) bottom left, linear-gradient(var(--add-color),var(--add-color)) bottom right;
    background-size: calc(50% - 1px) calc(50% - 1px); /*thickness = 2px (2*1px) */
    background-repeat:no-repeat;
    border:10px solid var(--add-color); /*length = 30px (50px - 2x10px) */
    box-sizing:border-box;
    border-radius:50%;
    z-index: 1;
}
.add::before{
    content: "";
    width:55px;
    height:55px;
    bottom: -10px;
    right: -10px;
    position: absolute;
    background: linear-gradient(var(--add-hover-color),var(--add-hover-color)) top left, linear-gradient(var(--add-hover-color),var(--add-hover-color)) top right, linear-gradient(var(--add-hover-color),var(--add-hover-color)) bottom left, linear-gradient(var(--add-hover-color),var(--add-hover-color)) bottom right;
    background-size: calc(50% - 1px) calc(50% - 1px); /*thickness = 2px (2*1px) */
    background-repeat:no-repeat;
    border:10px solid var(--add-hover-color); /*length = 30px (50px - 2x10px) */
    box-sizing:border-box;
    border-radius:50%;
    opacity:0;
    z-index: -1;
    transition: opacity 0.35s ease;
}
.add:hover::before{
    opacity:1;
}
  
.playPause {
    position: absolute;
    bottom: 70px;
    right: 10px;
    width: 49px;
    height: 49px;
    border: var(--play-color) 3px solid;
    border-radius: 50%;
    transition: border 0.2s ease-in-out;
}
.playPause:hover {
    border: var(--play-hover-color) 3px solid;
}
.playPause:hover .bar {
    background-color: var(--play-hover-color);
}
.playPause .bar {
    display: inline-block;
    position: absolute;
    top: 14px;
    left: 4px;
    width: 3px;
    height: 20px;
    border-radius: 3px;
    background-color: var(--play-color);
    transform-origin: center;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
.playPause .bar-1 {
    transform: translateX(13.5px) translateY(0px) rotate(0deg);
}
.playPause .bar-2 {
    transform: translateX(24px) translateY(0px) rotate(0deg);
}
.playPause.play .bar-1 {
    transform: translateX(20px) translateY(-5px) rotate(-55deg);
}
.playPause.play .bar-2 {
    transform: translateX(20px) translateY(5px) rotate(-125deg);
}
  
form{
    position: absolute;
    height: 20px;
    bottom: 130px;
    right: 10px;
}
input{
    width: 45px;
    text-align: center;
}
label{
    border-left: 0ch;
}

#codetrace{
    width: auto;
    height: auto;
    bottom: 10px;
    left: 10px;
    position: absolute;
    overflow: hidden;
    display: inline;
    opacity: 0.7;
}
#codetrace p{
    padding: 0px 10px 3px 5px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
#codetrace #current{
    background: var(--codetrace-current-color);
}
#codetrace #code p{
    background: var(--codetrace-code-color);
}
  
.node{
    fill: var(--fillColor);
    stroke: var(--borderColor);
}
.nodeText{
    fill: var(--nodeTextColor);
}
  
@keyframes blink{
    50% {
        opacity: 0;
    }
    /* 100%{ */
        /* opacity: 1; */
    /* } */
}

.startNode{
    fill: var(--startFillColor);
    stroke: var(--startBorderColor);
}
.discoveredNode{
    fill: var(--discoveredNodeFillColor);
    stroke: var(--discoveredNodeFillColor);
}
.currentNode{
    fill: var(--currentNodeFillColor);
    stroke: var(--currentNodeBorderColor);
}
.comingFrom{
    fill: var(--comingFromNodeFillColor);
    stroke: var(--comingFromNodeBorderColor);
}
.finishedNode{
    fill: var(--finishedNodeFillColor);
    stroke: var(--finishedNodeBorderColor);
}
.goingTo{
    animation: blink 0.35s linear infinite;
}

.discoveredEdge{
    stroke: var(--discoveredEdgeStroke);
}
.currentEdge{
    stroke: var(--currentEdgeStroke);
}

.highlightedEdge{
    stroke: var(--highlightedEdgeStroke);
}
.highlightedNode{
    fill: var(--highlightedNodeFillColor);
    stroke: var(--highlightedNodeBorderColor);
}

.sliderTextDiv{
    width: 50px;
    height: 15px;
    align-items: center;
    display: flex;
    justify-content: center;
    position: absolute;
}
.sliderTextDiv p{
    z-index: 10;
    opacity: 0.5;
}
.slider{
    -webkit-appearance: none;
    /* padding: 0;
    margin: 0; */
    width: 100%;
    height: 100%;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .25s;
    transition: opacity 0.25s;
    position: absolute;
    /* z-index: 3; */
}
#speedGroup{
    bottom: 154px;
    right: 10px;
}
#stepGroup{
    bottom: 175px;
    right: 10px;
}
.slider:hover {
    opacity: 0.85;
}   
.slider::-webkit-slider-thumb { /* Safari, Chrome, Edge */
    -webkit-appearance: none;
    appearance: none;
    width: 5px;
    height: 15px;
    background: #04AA6D;
    cursor: pointer;
}
.slider::-moz-range-thumb { /* Firefox */
    appearance: none;
    width: 5px;
    height: 15px;
    background: #04AA6D;
    cursor: pointer;
}

.disableSelect{
    user-select: none;
    /* -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -o-user-select: none;
    -moz-user-select: none; */
  
    pointer-events:none;
}
.disableElement{
    opacity: 0.2;
}
.invisible{
    display: none;
}
/* TODO: Media queries (https://www.youtube.com/watch?v=krZvPvpOHm4&ab_channel=OnlineTutorials) 5:44*/
