body {
    height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#nav {
    width: 100%;
    flex-shrink: 0;
    /* Prevents the Nav from being squashed */
}

#main-content {
    width: 100%;
    flex-grow: 1;
    display: flex;
    /* Keeps the sidebar and room side-by-side on desktop */
    overflow: hidden;
}

#player-sidebar {
    width: 25%;
    background-color: #d3d3d3;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 166px;
}

#input-container {
    width: 85%;
    height: 20px;
    padding: 10px;
}

#search-bar {
    background-image: url("search-icon.svg");
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: 4px center;
    border-radius: 5px;
    width: 100%;
    height: 20px;
    padding: 12px 20px 12px 31px;
    border: 1px solid #f2f2f2;
    background-color: #f2f2f2;
    box-sizing: border-box;
}

#search-icon {
    height: 100%;
    width: auto;
}

.scroll-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow-y: auto;
    position: relative;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    z-index: 1;
}

#scroll-menu::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome, Safari and Opera */
}

.furn-container {
    background-color: #f2f2f2;
    width: 85%;
    aspect-ratio: 300/240;
    /*Height cannot be a percentage, perhaps needs another container */
    border-radius: 6px;
    position: relative;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#bed-container {
    margin-top: 0;
}

.furniture {
    width: 95%;
    height: auto;
    cursor: pointer;
    position: relative;
    z-index: 999;
    touch-action: none;
    /* research */
    user-select: none;
    /* research */
}

#iso-art.furniture.dropped {
    width: 40%;
}

#iso-desk.furniture.dropped {
    width: 80%;
}

#iso-chair.furniture.dropped {
    width: 35%;
}

#iso-lamp.furniture.dropped {
    width: 43%;
}

#iso-tv.furniture.dropped {
    width: 43%;
}

#iso-window {
    width: 30%;
    z-index: 998;
}

#central-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.room-container {
    height: 75%;
    aspect-ratio: 1 / 1;
    position: relative;
}

#room-right {
    height: 50%;
    width: 50%;
    background-color: #d3d3d3;
    position: absolute;
    bottom: 50%;
    transform: rotate(90deg) skewX(-30deg) scaleY(0.864);
    transform-origin: bottom right;
}

#room-left {
    height: 50%;
    width: 50%;
    background-color: #bebebe;
    position: absolute;
    bottom: 50%;
    transform: rotate(-30deg) skewX(-30deg) scaleY(0.864);
    transform-origin: bottom right;
}


#room-bottom {
    /* Copy and use this as the small one*/
    height: 50%;
    width: 50%;
    position: absolute;
    background-color: #54513f;
    bottom: 50%;
    transform: rotate(210deg) skew(-30deg) scaleY(0.864);
    transform-origin: bottom right;
}

@media(max-width: 800px) {
    #main-content {
        flex-direction: column-reverse;
        height: 100dvh;
        /* The "magic" unit for mobile */
        width: 100vw;
        overflow: hidden;
        /* Prevents the whole page from scrolling */
    }

    #player-sidebar {
        height: 30%;
        width: 100%;
        padding-bottom: calc(0 + env(safe-area-inset-bottom) - 5px);
        /* Adds 15px PLUS whatever space the iPhone needs for the bottom bar */
    }

    #input-container {
        width: 97%;
        align-self: center;
    }

    #bed-container {
        margin-top: 10px;
    }

    #search-bar {
        height: 20px;
        margin-top: 10px;
        margin-bottom: 10px;
        margin-left: 0;
    }

    .furn-container {
        height: 90%;
        margin-left: 1%;
        display: flex;
        justify-content: center;
    }

    .furniture {
        height: 100%;
        width: auto;
    }

    .furniture.dropped {
        height: 75%;
    }

    .scroll-menu {
        flex-direction: row;
        height: 100%;
        width: 100%;
        align-items: center;
        overflow-y: visible;
        overflow-x: scroll;
        padding-bottom: 10px;
    }

    .furn-container:first-child {
        margin-left: 1.7%;
    }
}

/* input styling creds: https://stackoverflow.com/questions/63179896/displaying-an-image-in-search-bar-html*/