:root{
    --font-size-default: max(1rem,min(2vh,2vw));
    --font-size-message: max(1rem,min(4vh,4vw));
}

@font-face{
    font-family: "MPlus";
    src: url("/public/assets/mplus-1m-regular.ttf");
}

html{
    background: black;
    color: white;
    overflow: hidden;
}

html,body,main{
    height:100%;
    margin:0;
    padding:0;
    font-family: "MPlus", serif;
    font-size: var(--font-size-default);
}

main{
    display: flex;
    flex-direction: column;
}

*{
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
}

h1,h2,h3,h4,h5,h6{
    font-size: 0;
    display: none;
}

#game-info{
    position: absolute;
    top: 0;
    left: 0;
}

.world-wrapper{
    width: 100%;
    height: 100%;
    display:none;
    background: transparent;
    justify-content: center;
    align-items: center;

}

#world{
    z-index:0;
    display: grid;
    grid-template-columns: repeat(16,48px);
    gap: 0;
    border-left: solid 1px white;
    border-top: solid 1px white;
}

#world *{
    width: 60px;
    height:60px;
    border-right: solid 1px white;
    border-bottom: solid 1px white;
}

div.character{
    position: absolute;
    overflow:visible;
    /* border: solid 4px white; */
    width: 5%;
    height: 5%;
    background: url('/public/assets/char.gif') no-repeat center center / cover;
    z-index: 10;
    transition: left .5s, top .5s;
    -webkit-transition: left .5s, top .5s;
    -moz-transition: left .5s, top .5s;
}

.world-y .character{
    width:100%;
    height:100%;
}

div.character:hover{
    border:solid 1px white;
}

div.character .chat-message{
    font-family: "MPlus", serif;
    font-size: var(--font-size-message);
    font-weight: bold;
    position: absolute;
    background: white;
    overflow: visible;
    color: black;
    opacity: 1;
    box-sizing: border-box;
    transition: all .5s;
    -webkit-transition: all .5s;
    -moz-transition: all .5s;
    top: -100%;
    text-wrap: nowrap;
}

div.character .chat-message.active{
    opacity: 1;
}

#chat-box{
    left:0;
    bottom: 0;
    right:0;
    z-index:1;
    border: solid 1px white;
    display: flex;
    flex-direction: row;
    font-family: "MPlus", serif;
    margin: 8px;
    padding: 4px;
}

#chat-box input{
    font-family: "MPlus", serif;
    border: solid 1px white;
    background: black;
    color: white;
    border-radius: 0;
}

#user-info{
    position: absolute;
    background: white;
    color: black;
    font-size: var(--font-size-default);
    opacity: 0;
    z-index: 20;
    text-wrap: nowrap;
    pointer-events: none;
}

#user-info.active{
    opacity: 1;
}

#current-map-region{
    margin:8px;
    display: block;
}

.world-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background-color: black;
}

#world-container{
    position: relative;
    display: grid;
    grid-auto-columns: 5%;
    width: 100vh;
    aspect-ratio: 800 / 800;
    background: grey;
}

.world-tile[data-tile="0"]{
    background: url('/public/assets/bg_0.png') no-repeat center center / cover;
}

.world-tile[data-tile="1"]{
    background: url('/public/assets/bg_1.png') no-repeat center center / cover;
}

.world-x{
    position: relative;
    display: grid;
    flex-direction: column;
    grid-row: 1;
    height: 100%;
}

.world-y{
    box-sizing: border-box;
    position: relative;
    display: inline-block;
    grid-column: 1;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: solid 1px black;
}



