:root {
    --background-color: lightgrey;
    --background-color-other: #fafafa;
    --text-color: #000;
    --text-color-other: #666;
    --border-color: #b0b0b0;
}

[data-theme="dark"] {
    --background-color: black;
    --background-color-other: #232323;
    --text-color: #f0f0f0;
    --text-color-other: lightgrey;
    --border-color: #797979;
}

html,
body {
    height: 100%;
    margin: 0;
}

.page-container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.content-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
}

footer {
    margin-top: 30px;
    padding-bottom: 30px;
}

footer div {
    display: flex;
    gap: 30px;
}

body {
    color: var(--text-color);
    background-color: var(--background-color);
    max-width: 1200px;
    margin: auto;
    padding-right: 2px;
    padding-left: 2px;
    box-sizing: border-box;
    font-family: "Arial", sans-serif;
}

nav {
    padding-top: 10px;
    padding-bottom: 10px;
    margin: 10px 0;
}

nav a:not(#logo) {
    float: right;
    margin-left: 30px;
}

.column-full {
    flex-basis: 100%;
    box-sizing: border-box;
}

#download-link {
    width: auto;
    height: 65px;
    margin-bottom: 10px;
    align-content: center;
}

.account-bar {
    font-style: italic;
    font-size: 0.9em;
    margin-top: -5px;
    margin-bottom: 10px;
}

nav select {
    float: right;
    text-align: center;
    appearance: none;
    background-color: var(--background-color-other);
    color: var(--text-color);
    padding: 3px;
    font-size: 1.1em;
    border-radius: 5px;
    border: none;
    width: 40px;
    margin-top: -3px;
    margin-left: 10px;
}

nav select:focus {
    width: 150px;
}

.current-page {
    text-decoration: underline;
}

hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 10px 0;
}

a {
    color: inherit;
    text-decoration: none;
}

a:not(.button):hover,
a svg:hover {
    color: var(--text-color-other);
    fill: var(--text-color-other);
}

table a:not(.button):hover,
#logo:hover {
    color: inherit;
}

p {
    text-align: justify;
}

h2 {
    margin-top: 0px;
    word-wrap: break-word;
}

h2[id="filename"] {
    margin-top: revert;
}

#file-information {
    margin-bottom: 10px;
    text-align: center;
}

#file-information #size {
    text-align: center;
}

h3,
h4,
p {
    margin-top: 10px;
    margin-bottom: 10px;
    word-wrap: break-word;
}

code,
pre {
    background-color: var(--background-color-other);
    color: var(--text-color-other);
    padding: 1px 4px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: monospace;
}

.button,
button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    color: white;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    font-family: inherit;
    background-image: linear-gradient(rgb(50, 54, 58), rgb(39, 43, 48) 20%, rgb(31, 34, 38));
}

.button:hover,
button:hover {
    background-image: linear-gradient(#191c1f, #1b1e22 40%, #1d2024);
}

.button:active,
button:active {
    transform: translateY(2px);
}

.hidden {
    display: none;
}

input[type="text"],
input[type="email"],
textarea {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
    font-family: inherit;
    background-color: var(--background-color-other);
    font-size: 1em;
    color: var(--text-color);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: var(--text-color-other);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--text-color);
    box-shadow: 0 0 0 1px var(--text-color);
    outline: none;
}

#captcha {
    height: 69px;
    margin-bottom: 10px;
}

.flash-success {
    background-color: #dff0d8;
    color: #3c763d;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.flash-error {
    background-color: #f2dede;
    color: #a94442;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

progress {
    width: 100%;
}

#results {
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.box p {
    text-align: center;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th {
    border-bottom: 1px solid var(--border-color);
    font-size: 1.2em;
    letter-spacing: 1px;
}

th,
td {
    text-align: left;
}

tr:hover:not(:has(th)) {
    background-color: var(--text-color);
    color: var(--background-color);
}

table .name {
    width: 100%;
}

table .size {
    text-align: right;
    white-space: nowrap;
}

table .downloads {
    text-align: center;
    white-space: nowrap;
    padding: 0px 10px;
}

table .date {
    text-align: left;
    white-space: nowrap;
}

td {
    max-width: 200px;
}

table a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

tr[data-hash] {
    cursor: default;
    user-select: none;
}

.row {
    justify-content: space-between;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
}

.box {
    background-color: var(--background-color-other);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-align: center;
}

.pagination {
    text-align: center;
}

.pagination a,
.pagination .current-page {
    display: inline-block;
    padding: 5px 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.pagination .current-page {
    background-color: var(--background-color-other);
    cursor: default;
    font-weight: bold;
}

.pagination a:hover {
    background-color: var(--background-color-other);
}

fieldset {
    border: 1px solid var(--border-color);
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

legend {
    font-size: 1.3em;
    font-weight: bold;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
}

#archive {
    text-align: left;
    font-size: 0.8em;
    white-space: nowrap;
    overflow: auto;
}

#archive a:hover {
    background-color: var(--text-color);
    color: var(--background-color);
}

mark {
    background-color: #ff6347;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

video {
    width: 100%;
    max-height: 90vh;
    border-radius: 5px;
    outline: none !important;
}

.video-js {
    margin-bottom: 10px;
}

input[type="button"],
select {
    background-color: var(--background-color-other);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    padding: 0px 5px;
    height: 1.9em;
}

input[type="button"]:hover,
select:hover {
    background-color: var(--text-color);
    color: var(--background-color);
}

input[type="button"]:active {
    transform: translateY(1px);
}

select:active {
    background-color: var(--background-color);
    color: var(--text-color);
}

#select-copy {
    width: 160px;
}

#select-move {
    width: 110px;
}

#all-folders {
    max-height: 200px;
    overflow-y: auto;
}

#search-input,
#switch-input {
    height: 1.9em;
    padding: 0px 5px;
    margin: 0px;
    display: inline;
    width: 160px;
}

form {
    display: inline;
}

input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--text-color);
}

svg {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    fill: var(--text-color);
}

select[name="path"] {
    width: 100%;
    height: 3em;
    padding: 10px;
}

@media screen and (max-width: 740px) {
    nav a:not(#logo):not(#toggle-theme) {
        display: none;
    }

    nav select {
        display: inline-block;
    }

    .hide-small-screen {
        display: none;
    }

    .column {
        flex-basis: 100%;
        margin-bottom: 10px;
        box-sizing: border-box;
    }

    footer div,
    footer[class="row"] {
        justify-content: space-around;
    }

    #captcha-download,
    #download-link {
        margin: 0 0px;
    }

    table {
        font-size: 0.9em;
    }

    #tools {
        font-size: 0.8em;
    }

    #select-copy {
        width: 140px;
    }

    #select-move {
        width: 90px;
    }

    #search-input {
        width: 100%;
    }
}

@media screen and (min-width: 740px) {
    .column {
        flex-basis: 49.5%;
        box-sizing: border-box;
    }

    #captcha-download,
    #download-link {
        margin: 0 25%;
    }

    nav select {
        display: none;
    }
}
