body {
    color: var(--darker);
    /* outline:1px solid red; */
    /* background-color: #020221; */
    /* background-image: url("/images/magic_bg.png"); */
    background-position: center calc(50% + 150px);
    background-repeat: repeat-y;
    background-attachment: fixed;
    background-size: cover;
    background-position-y: var(--parallax-offset);

    --accentFont: "Montserrat", Georgia, Times, serif;
    --primaryFont: "Lexend", sans-serif;
    --gameFont: "Patrick Hand SC", cursive;
    --backgroundAlpha: rgba(30, 40, 68, 0.527);

    font-family: var(--accentFont);
    color: white;

    background-image: url(/images/magic_bg.png);
    background-size: cover;
    background-position: center;
    /* height: 100svh; */
}

a {
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    text-decoration: none;
    color: inherit;
}

:root {
    --top-bar-height: 64px;
    --side-bar-width: 80px;
}

.topBar {
    height: var(--top-bar-height);
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.125);
    box-sizing: border-box;

    background-color: #050512cc;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.burgerMenu {
    flex-shrink: 0;
    cursor: pointer;
    display: none;
}

.main-content {
    padding-top: var(--top-bar-height);
    padding-left: var(--side-bar-width);
}

.viewport-fixed-content {
    height: calc(100vh - var(--top-bar-height));
    width: calc(100vw - var(--side-bar-width));
}

.viewport-overlay-content {
    height: calc(100% - var(--top-bar-height));
    width: calc(100% - var(--side-bar-width));
    position: fixed;
}

.sidebar {
    overflow: hidden;
    width: 0;
    min-width: var(--side-bar-width);
    text-decoration: none;
    /* outline: red solid 1px; */
    /* border-right: 1px solid rgba(255, 255, 255, 0.125); */

    background-color: #050512cc;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    .close-button {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .sidebar {
        transition: all 0.2s ease-out;
        /* min-width: 0; */
        width: 100%;
        position: fixed;
        top: 0px;
        left: 0px;
        z-index: 1000;
        user-select: none;
        height: 100%;

        box-shadow:
            0 0 20px rgba(0, 0, 0, 0.75),
            -120px 0 120px rgba(58, 80, 128, 0.308) inset;

        .close-button {
            display: flex;
        }
    }

    .main-content {
        padding-left: 0;
    }

    .burgerMenu {
        display: flex;
    }
}

a {
    text-decoration: none;
}

a:visited {
    color: inherit;
}

.sidebar a {
    margin: 5px;
    padding: 5px;
    transition: all 0.2s ease-in-out;
}

.sidebar a {
    color: var(--slate-10);
    background-color: transparent;
    border-radius: 45px;
}

.sidebar a:hover {
    color: var(--slate-12);
    background-color: rgba(255, 255, 255, 0.125);
    border-radius: 30px;
}

.sidebar a.active {
    color: var(--slate-12);
    background-color: rgba(255, 255, 255, 0.125);
    border-radius: 8px;
}

.sidebar a.active:hover {
    color: var(--slate-12);
    background-color: rgba(255, 255, 255, 0.125);
    border-radius: 15px;
}

.sidebar a.inactive:hover {
    color: var(--slate-12);
    background-color: rgba(255, 255, 255, 0.125);
    border-radius: 8px;
}

.game-container {
    position: relative;
}

.game-container * {
    outline: none;
}

.menu-open {
    cursor: auto;
    transition: all 0.2s ease-in-out;
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;

    button {
        cursor: pointer;
    }
}

.menu-closed {
    transition: all 0.2s ease-in-out;
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    pointer-events: none;
}

.menu-closed * {
    pointer-events: none;
    display: none;
    opacity: 0;
}

.title-screen-container {
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 1;
    pointer-events: none;
}

.title-screen {
    /* cursor: pointer; */
    transition: all 0.2s ease-in-out;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 1;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.title-screen * {
    text-shadow: 1px 2px 0 black;
    font-weight: bold;
    text-align: center;
    transition: opacity 2s ease-in-out;

    .level-name {
        font-size: 3em;
    }

    .level-author {
        font-size: 1.25em;
    }

    .level-description {
        margin-top: 32px;
    }
}

.visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.33);
}

.not-visible {
    opacity: 0;
    background: rgba(0, 0, 0, 0);
    transition: all 0.77s ease-in-out;

    button,
    a {
        display: none;
    }
}

.rooms {
    flex-wrap: wrap;
}

.room {
    flex-grow: 1;
    min-width: 20%;
    max-width: 20%;
}

.author-name > * {
    color: var(--slate-10);

    &:hover {
        color: var(--slate-12);
    }
}

.preview-login {
    button {
        /* a rectangle yellow button with white text that says "play game" */
        display: inline-block;
        background-color: rgb(255, 196, 0);
        color: var(--white);
        text-shadow:
            0 1px 4px rgba(0, 0, 0, 0.75),
            0 2px 20px rgba(0, 0, 0, 0.5);
        padding: 0.5rem 2rem;
        border-radius: 0.5rem;
        /* text-transform: uppercase; */

        /* increase font width */
        letter-spacing: 0.005rem;
        font-weight: bold;
        cursor: pointer;

        box-shadow:
            0 0 0 2px rgba(255, 246, 163, 0.5) inset,
            0 2px 8px rgba(0, 0, 0, 0.25);

        transition: all 0.2s ease-out;
        transform: scale(1) translateY(0px);
    }

    button:hover {
        box-shadow:
            0 0 16px rgba(255, 230, 0, 0.5),
            0 0 16px rgba(255, 230, 0, 0.904) inset;
        transform: scale(1.05) translateY(0px);
    }
}

.upload-field {
    position: relative;
    width: 100%;
    height: 100%;

    > .upload-icon-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        background: red;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    > .upload-icon {
        opacity: 0;
        transition: all 0.2s ease-in-out;
    }

    &:hover {
        opacity: 1;
        cursor: pointer;

        > .upload-icon-container {
            background-color: rgba(0, 0, 0, 0.5);
            opacity: 1;
        }

        > .upload-icon {
            opacity: 1;
        }
    }

    > .upload-input {
        width: 100%;
        height: 100%;
        position: absolute;

        input {
            position: absolute;
            width: 100%;
            height: 100%;
            opacity: 0;
        }

        input[type="file"]::file-selector-button {
            width: 100%;
            height: 100%;
        }

        input[type="file"]::-webkit-file-upload-button {
            opacity: 1;
            background: transparent;
            border: 0;
        }
    }

    img {
        opacity: 1;
    }
}

.learnMore {
    margin-top: auto;
    bottom: -0;
    width: 100%;
    text-align: center;
    z-index: 10;
    font-family: Lexend, sans-serif;
    font-size: min(3vw, 1rem);
    z-index: 100;

    /* remove link styling */
    a {
        text-decoration: none;

        color: rgba(255, 255, 255, 0.75);
    }
}

.learnMore .arrow {
    animation: bounce 1s infinite;
    /* animate the arrow up and down on loop */
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Fix for firebase dialog from shifting outside container https://github.com/firebase/firebaseui-web/issues/806*/
.mdl-dialog.firebaseui-dialog.firebaseui-id-dialog {
    bottom: auto !important;
}

#modal-root {
    position: absolute;
    z-index: 9999;
}
