/* css reset */
* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
    font-family: "Space Mono", monospace;
    text-transform: lowercase;
}

:root {
    --app-height: 100%;
}

body {
    background-color: #f3f3f3;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.nointeract {
    touch-action: none;
}

/* bottom nav */
nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 100;
    pointer-events: none;
}

/* nav links */
nav ul {
    list-style: none;
    text-align: center;
    pointer-events: none;
}

nav ul li {
    display: inline-block;
    margin: 0 10px;
    pointer-events: all;
}

nav ul li a {
    text-decoration: none;
    color: #000;
}

nav ul li a:hover {
    color: #333;
}

/* top header title */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 100;
    pointer-events: none;
}

header h1 {
    text-align: center;
    font-size: 1.5em;
    margin: 0;
    padding: 0;
    line-height: 50px;
    width: fit-content;
    margin: 0 auto;
    pointer-events: all;
}

/* full page main, icons like a desktop */
main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

main > button,
main > a {
    display: inline-flex;
    position: absolute;
    top: 0%;
    left: 0%;
    text-decoration: none;
    padding: 5px 5px 0;
    flex-direction: column;
    align-content: center;
    align-items: center;
    user-select: none;
    box-sizing: content-box;
}

/* focussed border */
main > button:focus,
main > a:focus {
    outline: 2px dotted #000;
}

main > button > img,
main > a > img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: pixelated;
}

main > button > span,
main > a > span {
    display: block;
    text-align: center;
    font-size: 0.8em;
    color: #000;
}

input#file-input {
    display: none;
}

#context-menu {
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(37, 40, 42, 0.22);
    color: #1f194c;
    width: 10em;
    position: fixed;
    visibility: hidden;
    z-index: 1000;
    width: 250px;
}

.item {
    padding: 0.3em 1.2em;
    display: inline-block;
    box-sizing: border-box;
    width: 100%;
}

.item:hover {
    background-color: rgba(44, 141, 247, 0.2);
    cursor: pointer;
}

body.dark {
    background-color: #212121;
    color: #ffffff;
}

h1 {
    margin: 0;
    padding: 0;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* library overwrites */
.lity-iframe-container {
    height: calc(var(--app-height) - 100px);
}

div {
    display: block;
}

.lity-43 video {
    height: unset;
    width: 100%;
    aspect-ratio: 4/3;
}

.lity-169 video {
    height: unset;
    width: 100%;
    aspect-ratio: 16/9;
}

.title-bar-controls button[aria-label="Close"] {
    background-position: top 3px left 4px;
    background-repeat: no-repeat;
    margin-left: 2px;
}

.title-bar-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    padding: 5px 10px;
    color: white;
}

@media screen and (max-width: 600px) {
    .lity-iframe-container {
        height: calc(var(--app-height) - 50px);
        width: 100%;
    }
}

.back-button {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    padding-left: 15px;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 100;
    background-color: #212121;
    color: #ffffff;
}

.back-button:hover,
.back-button:visited {
    cursor: pointer;
    color: #ffffff;
}
