body {
    background: #333;
    color: #bbb;
    display: block;
    height: 755px;
    margin: 0;
    user-select: none;
}

button {
    box-sizing: border-box;
    height: 40px;
    padding: 10px;
    border-radius: 10px;
    
    background: #444;
    color: #bbb;
}
button:focus {
    outline: none;
}

canvas {
    background:none;
    position: absolute;
    border: 1px solid #bbb;
    margin: 0;
    padding: 0;
}

.clickable {
    cursor: pointer;
}

.close {
    position: absolute;
    right: 2px;
    top: 2px;
    padding: 2px 7px;
    font-size: 20px;
}
#close:hover {
    color: white;
}

#fileOverlay, #settingsOverlay, #layerOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background: rgba(51, 51, 51, 0.8);
}
#fileBlock, #settingsBlock, #layerBlock {
    display: block;
    position: absolute;
    width: 400px;
    height: 300px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    padding: 5px;
}
#fileInputLabel {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    top: 5px;
}
#fileProperties {
    box-sizing: border-box;
    width: 395px;
    position: absolute;
    top: 50px;
    left: 5px;
    
    height: 200px;
}
#submitData, #updateSettings, #submitLayer {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    bottom: 5px;
}

#settingsList {
    margin-top: 50px;
}
#port {
    text-align: center;
    margin-top: 10px;
}

#sidebar {
    width: 256px;
    margin: 0;
    margin-top: 15px;
    padding: 0;
    position: absolute;
    left: 5px;
    top: calc(50% - 19px);
    transform: translate(0, -50%);
}
.side {
    display: block;
    position: relative;
    height: 337px;
}
#tileset, #layers {
    padding: 0;
}
#newTileset, #newLayer {
    position: absolute;
    bottom: 5px;
    left: 5px;
}
.layer {
    display: flex;
    align-items: center;
    background: #666;
    margin: 2px;
}
.layer.current {
    background: #9f9;
    color: #666;
}
.ltrash, .lvisible {
    margin: 0 5px;
}
.lname {
    flex-grow: 1;
    margin: 0;
    cursor: default;
}
#tilesetCanvas {
    margin: 0;
    padding: 0;
    left: 0;
    top: 0;
}
#tCanvasWrapper {
    display: block;
    position: relative;
    left: 50%;
    transform: translate(-50%, 0);
    height: 270px;
    width: 230px;
    overflow: auto;
    margin: 0;
    padding: 0;
}

#main {
    width: calc(100% - 271px);
    height: calc(100% - 10px);
    margin: 0;
    padding: 0;
    position: absolute;
    left: 266px;
    top: 5px;
    overflow: auto;
}
#toolbar {
    position: absolute;
    bottom: 5px;
    left: calc(50% + 128px);
    transform: translate(-50%, 0);
    
    display: block;
    box-sizing: border-box;
    height: 50px;
    width: 125px;
    background: #333;
    border: 2px solid #111;
    border-radius: 7px;
}
#toolbar img {
    position: absolute;
    float: left;
}
#settings {
    border-left: solid 1px white;
    padding-left: 5px;
    top: 8px;
}