body {
    --color-background-hover: #eee;
    --color-contrast-font: white;
    --color-info-background: #3b88c3;
    --color-list-separator: #ccc;
    --color-modal-background: white;
    --color-modal-border: #000;
    --color-page-background: white;
    --color-page-font: #111;
}

body.dark {
    --color-background-hover: #333;
    --color-contrast-font: white;
    --color-info-background: #3b88c3;
    --color-list-separator: #444;
    --color-modal-background: #242424;
    --color-modal-border: #444;
    --color-page-background: #222;
    --color-page-font: #ccc;
}

body {
    background: var(--color-page-background);
    color: var(--color-page-font);
    font-family: sans-serif;
}

a,
a:active,
a:visited {
    color: var(--color-page-font);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 0;
}

.gallery li {
    list-style: none;
}

.gallery li a {
    display: block;
}

.gallery img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    display: inline-block;
    white-space: nowrap;
    overflow-x: clip;
    text-overflow: ellipsis;
}

.info-icon {
    position: relative;
    display: inline-block;
    color: var(--color-contrast-font);
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    width: 18px;
    height: 18px;
    background-color: var(--color-info-background);
    border-radius: 3px;
}

.info-icon>.info-box {
    display: none;
    z-index: 1;
    border: 1px solid black;
    position: absolute;
    top: 0px;
    left: 16px;
    width: fit-content;
    background-color: aliceblue;

    color: black;
    font-family: sans-serif;
    text-align: start;
}

.info-icon:hover>.info-box,
.info-box:hover {
    display: block;
}

.file-list {
    list-style: none;
    padding-left: 0;
}

.file-list li {
    height: 1.5em;
    border-bottom: 1px var(--color-list-separator) solid;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.file-list li>.nametext {
    cursor: pointer;
    flex-grow: 1;
}

.file-list li:hover {
    background: var(--color-background-hover);
}

.modal {
    z-index: 2;
    max-width: 90%;
    max-height: 90%;
    top: 5%;
    left: 5%;
    position: fixed;
    border: var(--color-modal-border) 2px solid;
    background: var(--color-modal-background);
    border-radius: 16px;
    padding: 16px;
    overflow: auto;
    box-shadow: rgba(0,0,0,0.3) 2px 2px 32px 32px;
}

.modal-backdrop {
    z-index: 1;
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.modal>.title {
    line-height: 1em;
    margin: 0;
}

.modal>.close {
    display: inline-block;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 2.5em;
    height: 2.5em;
}

.modal>.content {
    max-height: 80%;
}

.info-modal {
    display: flex;
    flex-direction: row;
    overflow-x: hidden;
}

.info-modal>div {
    width: 50%;
    min-width: 400px;
}

.info-modal img,
.info-modal video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.one-line {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow-x: hidden;
}
