@font-face {
    font-family: "Open Sans";
    src: url("OpenSans.ttf");
}

html, body {
    background-color: rgb(32, 32, 32);
}

body {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    display: flex;
    flex-direction: row;

    margin: 0;
}

::-webkit-scrollbar {
    display: none;
}

#node-library {
    width: 15%;

    display: flex;
    flex-direction: column;

    padding: 8px;
    box-sizing: border-box;

    overflow-y: auto;

    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);

    color: white;
    font-family: sans-serif;
    font-size: 20px;
}

.node-library-header {
    display: flex;
    flex-direction: row;

    margin: 0;
    padding: 12px 8px;
    text-align: center;

    border-radius: 8px 8px 0 0;

    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);

    cursor: pointer;
    user-select: none;
}

.node-library-header:hover {
    background-color: rgba(255, 255, 255, 0.025);
}

.node-library-header p {
    flex: 1;

    margin: 0 0 0 4px;

    text-align: left;
}

.node-library-header img {
    user-select: none;
}

.node-library-expand {
    display: none;
}

.node-library-inner {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 8px;

    margin-bottom: 16px;
    padding: 8px;
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;

    background-color: rgba(255, 255, 255, 0.1);
}

.node {
    width: 100%;
    height: auto;
    display: block;

    cursor: grab;
    user-select: none;
}

.node:hover {
    filter: brightness(90%);
}

.node:active {
    cursor: grabbing;
}

.node-parent {
    position: relative;
}

.node-edit {
    visibility: hidden;

    position: absolute;
    top: 4px;
    right: 4px;

    width: 20px;

    padding: 2px;

    border-radius: 50em;

    cursor: pointer;
    user-select: none;
}

.node-edit:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.node-parent:hover .node-edit {
    visibility: visible;
}

#rename-parent {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    display: none;
}

#rename {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 8px;
    border-radius: 8px;

    background-color: rgba(82, 82, 82, 0.9);
    backdrop-filter: blur(16px);

    color: white;
    font-family: sans-serif;
    font-size: 24px;
}

#rename p {
    margin: 0;
    text-align: center;
}

input {
    border: none;
    outline: none;

    padding: 6px;
    border-radius: 4px;

    background-color: rgba(0, 0, 0, 0.25);
    color: white;
    font-size: 16px;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

input:hover, input:focus {
    background-color: rgba(0, 0, 0, 0.4);
}

.rename-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.rename-buttons .button {
    flex: 1;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 4px;

    background-color: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    user-select: none;

    padding: 8px 4px;

    font-size: 16px;
}

.button:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

#main {
    flex: 1;

    position: absolute;
    width: 85%;
    height: 100%;
    right: 0;
    top: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;
}

#toolbar {
    display: flex;
    flex-direction: row;
    gap: 4px;

    padding: 4px 4px 0 4px;

    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

#toolbar .button {
    padding: 4px;
    margin-bottom: 4px;
}

#game {
    flex: 1;
}

#tabs {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 4px;

    margin-left: 8px;
}

.tab {
    display: flex;
    align-items: center;

    padding: 4px 8px;
    border-radius: 8px 8px 0 0;

    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);

    cursor: pointer;
    user-select: none;
}

.tab:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.tab-current {
    background-color: #5787ea;
}

.tab-current:hover {
    background-color: #486db4;
}

.tab img {
    width: 1.5rem;
}

.tab p {
    margin: 0 0 0 4px;
    color: white;
    font-family: sans-serif;
}

.node-new {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 8px;
    border-radius: 4px;

    cursor: pointer;
    user-select: none;
}

.node-new:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.node-new img {
    width: 48px;
}

.node-new p {
    background: none !important;
}