/* THEME
 *
 * Every colour in this file comes from a variable below, so a theme is a
 * palette rather than a fork of the stylesheet. The dark palette is the
 * original SkunkyArt look and stays the default.
 *
 * Light is offered through prefers-color-scheme, so a visitor who has asked
 * their system for light gets it with no cookie, no query string and no
 * JavaScript — nothing that identifies them. An instance can force one or the
 * other with "theme" in its config, which appends a block after this file.
 */
:root {
    --bg: black;
    --fg: rgb(234, 216, 216);
    --fg-strong: whitesmoke;
    --link: cadetblue;
    --link-hover: #d0ff00;
    --edge: #164e3e;
    --edge-strong: #258268;
    --accent: #4d27d6;
    --surface: #134134;
    --surface-sunken: #091f19;
    --surface-alt: #060820;
    --surface-deep: #011522;
    --status-bad: red;
    --status-good: green;
    --status-mild: seagreen;
    --status-note: rgb(160, 0, 147);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f4f1ee;
        --fg: #1f2421;
        --fg-strong: #0d100e;
        --link: #1c6b78;
        --link-hover: #5a6b00;
        --edge: #8fbcae;
        --edge-strong: #258268;
        --accent: #4d27d6;
        --surface: #d9e8e1;
        --surface-sunken: #e8f0ec;
        --surface-alt: #e2e4f2;
        --surface-deep: #dbe7ef;
        --status-bad: #a11;
        --status-good: #157a3a;
        --status-mild: #2e8b57;
        --status-note: #8a007f;
    }
}

/* TAGS */
html {
    font-family: ubuntu, system-ui;
    background-color: var(--bg);
    color: var(--fg);
}
a {
    text-decoration: none;
    color: var(--link);
}
a:hover {
    color: var(--link-hover);
    transition: 400ms;
}
header h1 {
    padding-right: 0.2%;
    padding-left: 0.2%;
}
header form {
    align-self: center;
}
header, form {
    display: flex;
}
form {
    border: solid var(--edge) 1px;
    max-width: fit-content;
}
form input, button, select {
    background-color: var(--surface);
    padding: 5px;
    color: var(--fg-strong);
    border: 0;
}
input:focus {
    outline: none;
}

/* BLOCKS */
.content {
    align-items: center;
    border-radius: 3px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.block {
    padding: 0px 0px 6px 0px;
    border: 3px solid var(--bg);
    word-break: break-all;
    background-color: var(--surface-sunken);
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
}
.block h1 {
    padding: 8.5vh;
}
.block:hover {
    border: 3px solid var(--accent);
    transition: 400ms;
}

.block p {
    word-break: break-all;
}

/* MESSAGES */
.msg {
    background-color: var(--surface-sunken);
    color: var(--fg-strong);
    width: fit-content;
    max-width: 90%;
    padding: 4px;
    border-radius: 2px;
    margin-top: 6px;
    text-wrap: pretty;
    transition: 350ms;
}
.msg:hover {
    background-color: var(--surface);
}
.reply {
    border-radius: 0px 2px 2px 0px;
    border-left: var(--edge-strong) solid;
    margin-left: 40px;
}

/* FOLDER & PLATES */
.folders, .plates {
    display: flex;
    flex-wrap: wrap;
}
.folder-item {
    background-color: var(--surface-alt);
    border: 3px solid var(--surface-alt);
    width: 10%
}
.admins .user-plate {
    width: 5%;
    background-color: var(--surface-deep);
}
.plates .user-plate {
    margin-left: 1%;
    margin-bottom: 1%;
    background-color: var(--surface-sunken);
    padding: 3px;
    word-break: break-all;
    text-align: center;
    max-width: 15%;
}

/* USER/GROUP BACKGROUNDS */
.ubg {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.ubg img {
    width: 20%;
}

/* COLORS */
.nsfw, .about-false {
    color: var(--status-bad);
}
.about-true {
    color: var(--status-good);
}
.author {
    color: var(--status-mild);
}
.dd {
    color: var(--status-note);
}

/* SCREEN OPTIMISATIONS */
@media (orientation: portrait) {
    header {
        margin-left: 3%;
        text-align: center;
        display: inline-block;
        clear: both;
    }

    form {
        border: solid var(--edge) 1px;
    }
    
    .content {
        margin: auto;
        display: inherit;
        scale: 100%;
    }
    .block {
        margin-top: 10%;
        max-width: 100%;
    }
    .folder-item {
        width: 25%
    }
    .folders {
        display: flexbox;
        justify-content: center
    }
    figure img {
        width: 10%
    }
    figure a img {
        width: 100%
    }
    .msg {
        max-width: 80%
    }
    .block img, .plates .user-plate img {
        width: 100%;
    }
}

@media (orientation: landscape) {
    .block {
        width: 20%;
    }
    .block img, .plates .user-plate img {
        width: 100%;
        height: 30vh;
        object-fit: cover;
    }
}

@media (max-width: 1462px) and (orientation: landscape) {
    .block {
        max-width: 30%;
    }
}

@media (min-width: 788px) and (max-width: 884px) {
    .block {
        max-width: 35%;
    }
}
/* POST */
figure h1 {
    font-size: 1.2em;
    margin: 0.3em 0;
}

/* INDEX */
.index {
    display: flex;
    max-width: fit-content;
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
}
.index div {
    transform: translate(0, 50%);
    margin-left: 4%;
    flex-basis: 100%;
    height: 30%;
    display: block;
    max-width: fit-content;
}
.index div h1, .index form {
    margin: 0;
}
.index div form {
    font-size: 100%;
    max-width: 100%;
}
.index div form input {
    width: 100%;
}
.index img {
    width: 30%;
    height: 30%;
}
.index .source {
    margin-top: 5%;
    font-size: 200%;
    text-align: center;
}
@media (orientation: portrait) {
    .index {
        display: block;
        position: static;
        transform: none;
        width: 100%;
        max-width: none;
        padding: 1em;
        box-sizing: border-box;
    }
    .index img {
        width: 60%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    .index form {
        width: 100%;
    }
    .index div {
        transform: none;
        margin: 0;
        width: 100%;
        max-width: none;
    }
    .index div h1 {
        text-align: center;
    }
}
@media (max-width: 1155px) and (orientation: landscape) {
    .index img {
        width: 50%;
    }
    .index div {
        transform: none;
    }
}
