* {
    --bg-black: #000000;
    --bg-gray-950: #030712;
    --bg-error-accent: repeating-linear-gradient(-45deg,#880000,#880000 5px,#700000 5px,#700000 10px);

    --bg1: #121212;
    --bg1-5: #151515;
    --bg2: #252525;
    --bg3: #333333;


    --a1: #363636;
    --a2: #444444;
    --a3: #505050;
}
watermark {
    display: block;
    color: #ffffff49;
    font-size: small;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.2rem;
    pointer-events: none;
    z-index: 100;
}
body {
    background: var(--bg-black);
    color: white;
    font-family: sans-serif;
    
}
.loading {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 0.2rem transparent solid;
    border-radius: 1000px;
    border-bottom-color: 0.2rem var(--a3) solid;
    border-top-color: 0.2rem var(--a3) solid;
    animation: loading 1s infinite linear;
}

@keyframes loading {
    to {
        rotate: 360deg;
    }
}



#loading.done {
    pointer-events: none;
    opacity: 0;
}




main {
    max-width: 70rem;
    margin-inline: auto;
}
.header {
    background-color: var(--bg3);
    padding: 0.5rem;
    display: flex;
    align-items: center;
}

.header img {
    width: 3rem;
}

.header span {
    font-size: large;
    font-weight: bold;
}

.subheader {
    background-color: var(--bg2);
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.selector {
    background-color: var(--bg2);
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


select,
input,
button {
    background-color: var(--a1);
    border: var(--a2) solid 1px;
    padding: 0.2rem 0.5rem;
    color: white;
    padding: 0.2rem;
    
}
button:hover {
    background-color: var(--a2);
    border: var(--a3) solid 1px;
}

button:disabled,
select:disabled {
    background-color: var(--bg1);
    border: var(--a1) solid 1px;
    color: rgb(114, 114, 114);
}


.content {
    padding: 1rem;
    background-color: var(--bg1);
}
.content.empty {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: space-between;
    align-items: center;
}



a.btn {
    background-color: var(--a1);
    padding: 0.2rem 0.5rem;
    text-decoration: none;
    border: 1px var(--a2) solid;
    color: white;
}
a.btn:hover {
    background-color: var(--a2);
    border: 1px var(--a3) solid;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.files-list .file-item {
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.files-list .file-item .file-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.file-size {
    font-family: monospace;
    margin-left: 1;
    cursor:help;
}
.file-item:hover {
    background-color: var(--bg2);
}

.error {
    display: block;
    width: 20rem;
    max-width: 100%;
    background-color: #000000;
    border: rgb(53, 53, 53) 1px solid;
}

.error .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-error-accent);
    border-bottom: rgb(53, 53, 53) 1px solid;
    padding: 0.5rem;
}


.error .header h1 {
    margin: 0;
    padding: 0;
    font-size: large;
}


.error .body {
    padding: 1rem;
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    padding-top: 5rem;
    box-sizing: border-box;
    justify-content: start;
    align-items: center;
    background-color: #0000007e;
}

.backdrop.error {
    z-index: 200;
    background-color: #4700007e;
}

.backdrop .selector .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
}
.backdrop .selector {
    box-sizing: border-box;
    display: flex;
    width: 30rem;
    max-width: 100%;
    flex-direction: column;
    height: 20rem;
    max-height: 100%;
    justify-content: start;
    align-items: stretch;
    gap: 0.4rem;
}


.backdrop .selector .search {
    display: flex;
    
    gap: 0.2rem;
}

.backdrop .selector .search input{
    flex-grow: 1;
}

.backdrop .selector .results {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
}

.backdrop .selector .results button {
    display: block;
    width: 100%;
    padding: 0.5rem 0.5rem;
    text-align: left;
}

@media screen and (max-width: 760px) {
    .backdrop {
        padding: 0.5rem;
    }
    .backdrop .selector {
        box-sizing: border-box;
        display: flex;
        width: 30rem;
        max-width: 100%;
        flex-direction: column;
        height: 100%;
        justify-content: start;
        align-items: stretch;
        gap: 0.4rem;
    }
}

@media screen and (max-width: 580px) {
    .files-list .file-item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .files-list .file-item {
        border: var(--bg2) 1px solid;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }
    .file-actions {
        justify-content: space-between;
    }
}