html, body {
    padding:0;
    margin:0;
    width: 100%;
    height: 100%;
    font-family: "Arial";
    overflow: hidden;
}

.bs {
    box-sizing: border-box;
}

.fs {
    width: 100%;
    height: 100%;
}

.bg {
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.scene-container {
    position: relative;
    display: inline-block;
    user-select: none;
    overflow: auto;
    text-align: center;
}

.scene-background {
    pointer-events: none;
}

.scene-preloader {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#HUD {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    pointer-events: none;
    overflow: hidden;
}

#timer {
    position: absolute;
    top: 5px;
    left: 5px;
    padding-top: 10px;
    font-size: 20px;
    background: #000;
    border-radius: 5px;
    width: 150px;
    height: 40px;
    color: #fff;
    padding-left: 40px;
    pointer-events: all;
    user-select: none;
}

#timer>img {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 30px;
    height: 30px;
}

#main {
    overflow: hidden;
    position: relative;
}

#preloader {
    background: #000;
    color: #fff;
    position: relative;
}

#preloader-content {
    position:absolute;
    top: calc(50% - 100px);
    left: calc(50% - 250px);
    width: 400px;
    font-size: 25px;
    font-weight: bold;
    padding-top: 50px;
    padding-bottom: 50px;
    text-align: center;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-around;
}

#preloader-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 20px;
}

#preloader-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 20px;
    margin-top: 20px;
}

.preloader-dot {
    transition: opacity 0.7s;
    opacity: 0;
    width: 50px;
    height: 50px;
    border-radius: 100%;
    background-color: white;
}

.popup-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: default;
    background: rgba(0,0,0,0.3);
    z-index: 10;
}

.popup {
    overflow: hidden;
}

#mask {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0,0,0,0.9);
    display: none;
}

.area {
    opacity: 0.6;
    border: solid 2px;
}

.marker {
    position: absolute;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    cursor: pointer;
}

.marker-text {
    position: absolute;
    color: #000;
    white-space: nowrap;
    width: auto;
    height: 26px;
    font-size: 16px;
    background: #AAA;
    border-radius: 10px;
    padding: 5px;
    border: solid 0.5px black;
    pointer-events: none;
}

.popup-close {
    position: absolute;
    top: 20px;
    left: calc(50% - 20px);
    width: 40px;
    height: 40px;
    cursor: pointer;
    pointer-events: all;
}

#inventory {
    position: absolute;
    left: calc(50% - 400px);
    bottom: -160px;
    width: 800px;
    height: 200px;
    background-color: #000;
    border-radius: 10px;
    pointer-events: all;
    transition: bottom 0.2s;
    padding: 40px 10px 10px 10px;
    user-select: none;
}

#inventory-display {
    border: solid 0.5px #fff;
    overflow-y: scroll;
    overflow-x: hidden;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.inventory-item {
    width: 69px;
    height: 69px;
    border: solid 2px #fff;
    cursor: pointer;
    padding: 5px;
    margin: 5px;
    position: relative;
    border-radius: 10px;
}

.inventory-item.selected {
    border: solid 4px red;
}

.inventory-item-closeup {
    position: absolute;
    top: 0;
    right: 0;
    width: 25px;
    height: 25px;
    border: solid 0.5px #fff;
    background-color: #000;
    padding: 2.5px;
}

.inventory-item-icon {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

#inventory-icon {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 5px;
    left: 385px;
    cursor: pointer;
}

#log {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
    background-color: #000;
    border-radius: 10px;
    pointer-events: all;
    transition: width 0.2s, height 0.2s;
}

#log-container {
    border: solid 0.5px #fff;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
}

#log-icon {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
}

.log-message {
    width: 100%;
    border: solid 0.5px #fff;
}

#notifications {
    position: absolute;
    top: 60px;
    right: 10px;
    width: 300px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
}

.notification {
    background: #000;
    padding: 5px;
    border-radius: 10px;
    transition: opacity 1s;
}

.flatArea {
    position: absolute;
    cursor: pointer;
}

.flatArea > canvas {
    position: absolute;
    top: 0;
    left: 0;
}

#entryForm-container {
    position: absolute;
    width: 500px;
    top: 300px;
    left: calc(50% - 250px);
    text-align: center;
}

#entry-title {
    margin-bottom: 10px;
}

#entry-name {
    border-radius: 5px;
    outline: none;
    margin-bottom: 10px;
}

#entry-enter {
    display:inline-block;
    border-radius: 10px;
    padding: 10px;
    background: #000;
    color: #fff;
}

#soundControls-wrapper {
    position: absolute;
    bottom: 5px;
    left: 5px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    pointer-events: all;
}

#soundControls-wrapper>div {
    width: 40px;
    height: 40px;
    padding: 5px;
    background: #000;
    border-radius: 10px;
    cursor: pointer;
    margin-right: 10px;
    cursor: pointer;
    user-select: none;
}

#soundControls-wrapper>div>img {
    width: 30px;
    height: 30px;
}

#globalOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 20px;
    z-index: 150;
}

#logExport {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 150px;
    height: 30px;
    font-size: 20px;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    border: solid 0.5px #ffffff;
    border-radius: 5px;
}

.message-wrapper {
    padding: 10px;
    font-size: 16px;
    color: #fff;
    background-color: #000;
    border-radius: 10px;
    min-width: 250px;
    position: relative;
    white-space: pre-wrap;
}

.message-wrapper>img{
    position: absolute;
}

.message-title {
    font-size: 20px;
    color: #fff;
    text-align: center;
}

.message-close {
    margin-top: 10px;
    border: solid 0.5px white;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
}

.popup-message {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.popup-message-content {
    background: #000;
    border-radius: 10px;
    max-height: 100%;
    max-width: 100%;
    min-width: 250px;
    text-align: center;
    padding: 5px;
    overflow: auto;
}

.popup-message-content > img {
    display: inline-block;
}

.popup-message-title {
    font-size: 20px;
    padding: 5px;
    color: #fff;
}

.popup-message-button-container {
    width: 100%;
    margin-top: 5px;
}
.popup-message-button-container>input{
    width: 200px;
    font-size: 20px;
    border-radius: 10px;
    padding: 5px;
    font-size: 20px;
}

.popup-message-button {
    border: solid 0.5px #fff;
    border-radius: 10px;
    padding: 5px;
    font-size: 20px;
    width: 150px;
    display: inline-block;
    cursor: pointer;
    color: #fff;
    margin-bottom: 5px;
    margin-right: 5px;
}

.item-closeup {
    text-align: center;
    overflow:auto;
}

.item-closeup-image {
    display: inline-block;
}

#helpControls-wrapper {
    position: absolute;
    top: 50px;
    left: 5px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    pointer-events: all;
}

#helpControls-wrapper>div {
    width: 40px;
    height: 40px;
    padding: 5px;
    background: #000;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
}

#helpControls-wrapper>div>img {
    width: 30px;
    height: 30px;
}

.cutscene {
    text-align: center;
}

.cutscene>video {
    display: inline-block;
}

#game-start-button {
    padding: 5px;
    border: solid 0.5px #fff;
    border-radius: 10px;
    color: #fff;
    margin-top: 10px;
    cursor: pointer;
    user-select: none;
}

.help-textarea {
    width: 400px;
    height: 150px;
    white-space: pre;
    resize: none;
}

#dragOverlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 100;
}

.book {
    background: #000000;
    padding-bottom: 40px;
    position: relative;
    box-sizing: border-box;
}

.book>.book-page {
    overflow: auto;
    box-sizing: border-box;
    text-align: center;
}

.book>.book-page>img {
    display: inline-block;
}

.book>.book-interface {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    padding: 5px;
    font-size: 30px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    color: #FFFFFF;
    box-sizing: border-box;
}

.book>.book-interface>div {
    cursor: pointer;
    user-select: none;
}

.book>.book-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
    display: none;
    background: #000000;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: auto;
    color: #FFFFFF;
    border: solid 0.5px #FFFFFF;
    padding: 5px;
}

.book>.book-content>div {
    cursor: pointer;
    user-select: none;
    font-size: 20px;
}

.code-warning {
    display: flex;
    flex-direction: column;
    border: solid 0.5px white;
    gap: 20px;
    width: 400px;
    padding: 20px;
    border-radius: 20px;
}