:root{
    --background: #110F13;
    --text: aliceblue;
    --dpurple: rgb(33, 25, 49);
    --mpurple: rgb(77, 32, 107);
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background-color: #110F13;
    color: aliceblue;
}
.container{
    position: relative;
}
.header {
    background-color: rgb(33, 25, 49);
    padding: 0px 25px;
    margin: 10px auto;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    border: solid black 3px;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.header-left button{
    margin-left: 8px;
}
.header-left img{
    position: relative;
    height: 40px;
    vertical-align: middle;
    margin-right: 5px;
}

.header.minimized {
    border: solid rgba(0, 0, 0, 0) 1px;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 25px;
    justify-content: center;
    align-items: center;
}
h2.minimized, .header-left.minimized{
    visibility: hidden;
}


.flowchart, .active-flowchart{
    background-color: #110F13;
    color: aliceblue;
    padding: 20px;
}
#credit{
    position: fixed;
    bottom: 0%;
    right: 1%;
    z-index: 100;
    opacity: 50%;
}
#credit a{
    text-decoration: none;
    color: #fff;
}

#input-button{
    background-color: rgb(77, 32, 107);
    border: solid black 2px;
    border-radius: 6px;
    color: white;
    padding: 4px;
    height: fit-content;
}
#save-png{
    height: fit-content;
    background-color: rgb(77, 32, 107);
    border: solid black 2px;
    border-radius: 6px;
    color: white;
    padding: 6px 24px;
    cursor: pointer;
}
#undo-button{
    height: fit-content;
    background-color: rgb(77, 32, 107);
    border: solid black 2px;
    border-radius: 6px;
    color: white;
    padding: 6px 20px;
    cursor: pointer;
}
#help-button {
    background-color: rgb(77, 32, 107);
    border: solid black 2px;
    border-radius: 50%;
    color: white;
    height: 30px;
    width: 30px;
    font-weight: bold;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
}

.mermaid .node {
    cursor:pointer;
} 
  
.mermaid{
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}
.popup-content {
    background-color: rgb(26, 23, 32);
    padding: 25px;
    border-radius: 10px;
    width: 400px;
    text-align: center;
    position: relative;
}
.close {
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 40px;
    cursor: pointer;
}

#toggle-header {
    background-color: rgb(77, 32, 107);
    border: solid black 2px;
    border-radius: 6px;
    color: white;
    padding: 10px;
    height: 30px;
    width: 30px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width:1010px){
    h2{
        visibility: hidden;
        width: 0;
        height: 20px;
    }
    .arrow{
        display: none;
    }
}

@media (max-width:700px){
    h2{
        visibility: hidden;
        width: 0;
        height: 20px;
    }
    .header-left{
        width: fit-content;
    }
    .header-left button{
        margin: 0;
    }
    .header {
        justify-content: center;
        margin: 0;
    }
    .header img{
        /* display: none; */
    }
    #input-button{
        width: 75px;
    }
    #save-png{
        padding: 7px;
    }
    #credit{
        visibility: hidden;
        width: 0px;
        height: 0px;
    }
    html, body {
        width: 100%;
        height: 100%;
        overflow-x: hidden;
    }
}

/* Context Menu */
.context-menu{
    position: fixed;
    z-index: 10000;
    width: 100px;
    background-color: var(--dpurple);
    border: solid var(--mpurple) 2px;
    border-radius: 5px;
    transform: scale(0);
    transform-origin: top left;
}
.context-menu.visible{
    transform: scale(1);
    transition: transform 200ms ease-in-out;
}

.context-menu .menu-item{
    padding: 8px 10px;
    font-size: 15px;
    color: white;
    cursor: pointer;
    border-radius: inherit;
    font-family: monospace;
}

.context-menu .menu-item:hover{
    background-color: var(--mpurple);
}

.arrow {
    width: 80px; 
    height: 80px; 
    position: absolute;
    left: 60px; 
    top: 90px; 
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ADD, EDIT MENU */
.node-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 10001;
    width: fit-content;
    padding: 15px;
    background-color: var(--dpurple);
    border: solid var(--mpurple) 2px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 200ms ease-in-out;
}
.node-menu.visible {
    transform: translate(-50%, -50%) scale(1);
}

.node-menu button {
    display: block;
    width: 100%;
    height: fit-content;
    background-color: rgb(77, 32, 107);
    border: solid black 2px;
    border-radius: 6px;
    color: white;
    padding: 6px 24px;
    cursor: pointer;
    margin-top: 6px;
}
.node-menu .close-node-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    font-size: 20px;
    color: white;
    background-color: transparent;
    border: none;
}
