html {
    min-height: 100%;
}

body {
    height: 100%;
    margin: 0;
    overflow-y: hidden;
}

#form {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    transition: height 1s;
}

#realos {
    position: absolute;
    left: -99999px;
}

#form:before {
    content: "Drag & drop, click, or paste";
    display: block;
    position: absolute;
    line-height: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#form.uploading:before {
    content: "Uploading...";
}

#form.dragover {
    box-shadow: inset 0 0 10px 0 rgba(0, 0, 0, 0.75);
}

#form.dragover:before {
    content: "Now drop";
}

ul#images {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid #ddd;
    height: 200px;
    transform: translateY(100%);
    margin: 0;
    padding: 10px;
    overflow-y: hidden;
    overflow-x: scroll;
    white-space: nowrap;
    transition: transform 1s;
}

ul#images li {
    height: 100%;
    display: inline-block;
    max-width: 150px;
    width: 100%;
    margin-left: 10px;
    list-style: none;
    position: relative;
    background: #f5f5f5;
}

ul#images li:first-child {
    margin-left: 0;
}

ul#images li a {
    display: block;
    transform: translateY(-100%);
    transition: transform 1s ease-in-out;
    position: relative;
    height: 100%;
    width: 100%;
}

ul#images li a img {
    max-height: 100%;
    max-width: 100%;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

ul#images li:after {
    position: absolute;
    content: "Uploading";
    font-size: 12px;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.5s;
}

ul#images li.loading:after {
    color: #aaa;
    opacity: 1;
    transition: all 0.5s;
}

ul#images li.loaded a {
    transform: translateY(0);
}

ul#images li.failed:after {
    content: "Failed to upload";
    color: red;
    opacity: 1;
}

ul#images li button {
    position: absolute;
    top: 0;
    right: 0;
    display: none;
    border: 1px solid #f5f5f5;
    font-family: inherit;
    background: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 5px;
    z-index: 2;
}

ul#images li button + button {
    top: 0;
    left: 0;
}

ul#images li button:hover {
    background: #ddd;
}

ul#images li button + button:hover {
    background: #d77;
}

ul#images li input {
    position: absolute;
    left: -99999px;
}

ul#images li.failed button {
    display: inline-block;
}

ul#images li.failed button:after {
    content: "!";
}

ul#images li.loaded:hover button {
    display: inline-block;
}

body.active-upload #form {
    height: calc(100% - 200px);
}

body.active-upload #images {
    transform: translateY(0);
}

#errors {
    position: fixed;
    top: 1em;
    left: 1em;
    border: 2px dashed red;
    background-color: red;
    font-family: sans-serif;
    font-weight: bold;
    padding: 0.2em;
    color: white;
}

input[type=text] {
    width: 100%;
    padding: 0.4em 0.6em;
    margin: 0.3em 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#menu {
    position: fixed;
    top: 1em;
    left: 1em;
    font-family: sans-serif;
    color: black;
    text-align: center;
    z-index: 3;
}

#menu img {
    border: 2px solid #a50f15;
    padding: 8px;
    border-radius: 20px;
    cursor: pointer;
}

#user-settings {
    display: none;
    border: 1px solid black;
    border-radius: 5px;
    padding: 1em;
    z-index: 3;
    background: white;
}

#user-settings .close {
    float: right;
    cursor: pointer;
}

#user-settings p, #user-settings form {
    margin: 12px;
}

#tcs {
    position: fixed;
    top: 1em;
    right: 1em;
    font-family: sans-serif;
    color: black;
    text-align: center;
    font-size: 50%;
}
