:root { --feg-blue: #094abd; } * { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem;
    color: white;
    background: var(--feg-blue);
    font-family: sans-serif;
}
body.slideshow-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(17rem, 35vw);
    height: 100vh;
    height: 100dvh;
    background: black;
    overflow: hidden;
}
#slideshow {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
}
.slideshow-panel {
    grid-column: 2;
    grid-row: 1;
    container-type: inline-size;
    padding: 1rem;
    color: white;
    font: 1.15rem sans-serif;
    text-align: center;
}
.slideshow-panel a {
    display: block;
    width: 100%;
    color: white;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: 1.55rem;
    text-decoration: none;
}
.slideshow-panel img { display: block; width: 100%; margin: 0.65rem 0; background: white; }
.slideshow-panel p { margin: 0; }
#average-rating { width: 100%; margin-top: 0.65rem; padding: 0.25rem; color: #f4c542; font-size: min(4.5rem, 16cqw); font-weight: bold; line-height: 1; white-space: nowrap; }
#rating-count { color: #f4c542; font-size: 1.45rem; }
body.gallery-page {
    display: grid;
    height: 100vh;
    height: 100dvh;
    grid-template-rows: minmax(0, 1fr) auto;
    background: black;
    overflow: hidden;
}
#gallery-image { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.gallery-controls { display: flex; justify-content: space-between; padding: 1rem; }
.gallery-controls button { min-width: 4rem; }
.gallery-controls > button {
    color: white;
    background: #1663c7;
    border: 1px solid #3480e1;
    border-radius: 0.35rem;
}
.rating { display: flex; gap: 0.15rem; }
.rating button {
    min-width: 2rem;
    padding: 0;
    color: #f4c542;
    background: transparent;
    border: 0;
    box-shadow: none;
    font-size: 1.5rem;
}
body.upload-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 5rem 1rem 1rem;
    color: #f5f7fb;
    background: #101218;
    font-family: sans-serif;
}
body.upload-page header { background: #162544; }
body.upload-page form {
    color: #f5f7fb;
    background: #1d222c;
    box-shadow: 0 0.2rem 1rem #0008;
}
body.upload-page input {
    color: inherit;
    background: #292f3a;
    border: 1px solid #697386;
}
body.upload-page input[type="file"] { padding: 0.25rem; border-radius: 0.35rem; }
body.upload-page input[type="file"]::file-selector-button {
    margin-right: 0.75rem; padding: 0.55rem 0.8rem; color: white; background: #1663c7; border: 0; border-radius: 0.25rem; font: inherit;
}
body.upload-page button { color: white; background: #1663c7; border: 1px solid #3480e1; }
body.upload-page #upload-form { position: relative; }
.current-username { margin: 0; color: #aeb9ca; font-size: 0.85rem; }
.six-seven {
    position: absolute;
    top: 0.25rem;
    right: 0.75rem;
    transform: rotate(30deg);
    font-family: "Comic Sans MS", "Comic Sans", cursive;
    font-size: clamp(1.75rem, 10vw, 2.5rem);
    font-weight: bold;
    animation: six-seven-blink 0.8s steps(1, end) infinite;
    pointer-events: none;
}
.six-seven span:first-child { color: #278cff; }
.six-seven span:last-child { color: #35c96d; }
@keyframes six-seven-blink { 50% { opacity: 0.15; } }
body.manage-page { padding: 1rem; font-family: sans-serif; }
form {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 24rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.2rem 1rem #0002;
}
h1 { margin: 0; } label { display: grid; gap: 0.35rem; }
#preview { max-width: 100%; max-height: 16rem; margin: auto; object-fit: contain; }
button, input { max-width: 100%; min-height: 2.75rem; font: inherit; }
.view-links { display: flex; gap: 0.5rem; }
.view-button {
    display: grid;
    min-height: 2.75rem;
    place-items: center;
    padding: 0 1rem;
    color: white;
    background: var(--feg-blue);
    text-decoration: none;
}
