:root {
    --page-background: #080509;
    --page-accent: #9582bb;
    --page-accent-2: #d5bbff;
    --page-accent-3: #bf96ff;
    --page-warning: #ffc0c0;
    --container-background: #1b001f90;
    --container-background-hover: #282728ff;
    --page-text: #bfd0ce;
    --page-text-2: #7f8b89;
    --page-banner-subtitle: #98a5a3;
    --code-background: #34328080;
    --code-border: 0.1rem solid #a4a1ff80;
    --code-text: #adbdbb;

    --link-text: #bfb6cd;
    --link-shadow: #d73ace40;

    --selection-background: #8367b0;
    --selection-color: #e8e8e8;
    --selection-shadow: #000000;

    --emphasis-3-text: #ccb8ec;
    --emphasis-3-shadow: #7023ecc0;

    --h3-text: #eccdea;
    --h3-shadow: #d73ace40;

    --h4-text: #d8dcec;
    --h4-shadow: #3a80d780;
    
    --button-border: #bf96ff;
    --button-border-2: #7f64aa;
    --button-fade-top: #6c5590;
    --button-fade-bottom: #282036;
    --button-text: #d9c7d9;

    --table-cell-border: #674d90;

    --page-hpadding: 30%;
    --page-vpadding: 1rem;
    --page-hborder: 0.25em solid var(--page-accent);
    --grid-column-size: 25%;
    --grid-hmargin: 6rem;
    --table-of-contents-max-width: 50%;

    /* Set automatically by the background generator */
    --background-width: 0px;
    --background-height: 0px;
}

@font-face {
    font-family: 'Comic Sans MS';
    src: local('Comic Sans MS');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    size-adjust: 90%;
}

@font-face {
    font-family: 'Shantell Sans';
    src: url('/fonts/ShantellSans.woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    size-adjust: 90%;
}

@font-face {
    font-family: 'Inferno';
    src: url('/fonts/Inferno.ttf');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, textarea {
    font-size: 1em;
    font-family: "Comic Sans MS", "Shantell Sans", sans-serif;
    text-shadow: 0.05rem 0.05rem 0.05rem #000000;
}

body {
    background-color: var(--page-background);
    color: var(--page-text);
}

sup {
    font-weight: bold;
    font-size: 0.5rem;
    vertical-align: super;
}

h1 {
    font-size: 3rem;
    font-weight: bold;
}

h2, h3, h4, h5, h6 {
    clear: both;
    font-weight: bold;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

h2 { font-size: 2rem }
h3 { font-size: 1.65rem }
h4 { font-size: 1.4rem }
h5 { font-size: 1.25rem }
h6 { font-size: 1.1rem }

h2:first-of-type {
    margin-top: 0;
}

hr {
    clear: both;
    color: var(--h3-text);
    margin-top: 0rem;
    margin-bottom: 1.2rem;
}

p, label, input, textarea, ul, ol, dl {
    font-size: 1.1rem;
    line-height: 1.35rem;
    word-break: break-word;
}

p {
    margin-top: 1rem;
}

/*p:not(:last-of-type) {
    margin-bottom: 1rem;
}*/

a {
    color: var(--link-text);
    text-shadow: 0.0rem 0.05rem 0.2rem var(--link-shadow),
                 0.0rem -0.05rem 0.2rem var(--link-shadow),
                 -0.05rem 0.0rem 0.2rem var(--link-shadow),
                 0.05rem -0.0rem 0.2rem var(--link-shadow);
}

a.banner-link {
    font-size: 2rem;
    letter-spacing: -0.2rem;
    line-height: 2.4rem;
    text-decoration: none;
}
.flaming {
    font-family: "Inferno", "Comic Sans MS", "Shantell Sans", sans-serif;
    background: linear-gradient(#800000, #ff8000 25%, #ffff00 65%, #ffffff 85%);
    background-clip: text;
    color: transparent;
    text-decoration: none;
    text-shadow: 0 0 1.0rem #ffe000e0;
    letter-spacing: -0.1rem;
}

.flaming:hover, .flaming:focus {
    text-shadow: 0 0 2rem #ffe000d0;
}

a.banner-link {
    font-size: 2.2rem;
    margin: 0.25rem 0 0.5rem;
}

a:hover {
    filter: brightness(1.2);
}

a:active {
    filter: brightness(0.75);
}

select {
    appearance: none;
    background-color: transparent;
    border: none;
    color: inherit;
    padding: 0;
    margin: 0;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    cursor: inherit;
    line-height: inherit;
    outline: none;
}

.select {
    background: linear-gradient(180deg, var(--button-fade-top), var(--button-fade-bottom));
    border: 0.15rem solid var(--button-border);
    border-bottom-color: var(--button-border-2);
    border-right-color: var(--button-border-2);
    color: var(--button-text);
    cursor: pointer;
    display: grid;
    grid-template-areas: "select";
    align-items: center;
    /*min-width: 15rem;*/
    line-height: 1.5rem;
    padding: 0 1rem;
    margin: 0;
    height: 2rem;
    width: 100%;
}

select, .select::after {
    grid-area: select;
}

.select::after {
    content: "";
    justify-self: end;
    width: 1rem;
    height: 0.6rem;
    background-color: var(--button-text);
    clip-path: polygon(100% 0%, 0 0%, 50% 100%);
}

.select:hover {
    filter: brightness(1.2);
}

option {
    background-color: var(--button-fade-bottom);
}

textarea {
    margin-top: 1rem;
    width: 100%;
}

input[type=text], textarea {
    background-color: var(--button-fade-bottom);
    border: 0.15rem solid var(--button-border);
    color: var(--page-text);
    padding: 0.2rem;
}

input[type=text]:hover, textarea:hover {
    filter: brightness(1.3);
}

input[type=text]:focus, textarea:focus {
    filter: brightness(1.2);
}

input[type=text]:disabled, textarea:disabled {
    filter: brightness(0.6) grayscale(1);
}

.button {
    background: linear-gradient(var(--button-fade-top), var(--button-fade-bottom));
    border: 0.15rem solid var(--button-border);
    border-bottom-color: var(--button-border-2);
    border-right-color: var(--button-border-2);
    color: var(--button-text);
    font-weight: bold;
    font-size: 1.1rem;
}

.button:active {
    filter: brightness(0.75) !important;
    border-top-color: var(--button-border);
    border-left-color: var(--button-border);
    border-bottom-color: var(--button-border-2);
    border-right-color: var(--button-border-2);
}

.button:hover {
    filter: brightness(1.3);
}

ul {
    list-style-type: disc;
}

ol > li {
    counter-increment: btcdbcb;
}

ol > li::before {
    content: counter(btcdbcb) ") ";
    font-weight: bold;
}

ol {
    list-style: none;
    counter-reset: btcdbcb;
}

ol ol, ul ul, ol ul, ul ol {
    margin-left: 1rem;
}

li {
    margin-top: 0.75rem;
    margin-left: 2rem;
}

code {
    font-family: "Comic Mono", "Consolas", monospace;
    font-size: 1rem;
    color: var(--code-text);
    border: var(--code-border);
    background-color: var(--code-background);
    padding: 0 0.25rem;
}

code.code-block {
    display: block;
    white-space: pre-wrap;
    line-height: 1.15rem;
    padding: 0.75rem;
    margin-top: 1rem;
    overflow-x: auto;
}

code.code-block.limit-height {
    max-height: 60vh;
}

table {
    border: 0.15rem solid var(--page-accent);
    border-collapse: collapse;
    margin: 1rem auto 0;
    max-width: calc(100% - 1rem);
    text-align: left;
}

thead {
    background-color: #ffffff20;
    font-size: 1.1rem;
    font-weight: bold;
}

tbody {
    background-color: #00000040;
}

td, th {
    border: 0.1rem solid var(--table-cell-border);
    padding: 0.5rem;
    vertical-align: middle;
}

.wa-table th:nth-child(1), .wa-table td:nth-child(1) {
    width: 30%;
}

.wa-table th:nth-child(2), .wa-table td:nth-child(2) {
    width: 70%;
}

#background-solid {
    position: fixed;
    background-color: var(--page-background);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1000;
}

/*@keyframes bg-move {
    from {
        transform: translateX(-90px) translateY(-18px);
    }
    to {
        transform: translateX(0px) translateY(0px);
    }
}

#background-anim {
    position: fixed;
    background: url("images/background.png") 0% 0% repeat;
    animation: bg-move 4s steps(60) infinite;
    top: -234px;
    left: -234px;
    width: calc(100% + 468px);
    height: calc(100% + 468px);
    overflow: hidden;
    z-index: -500;
}*/

#background-anim {
    position: fixed;
    background: none 0% 0% repeat;
    animation: bg-move 30s steps(450) infinite;
    top: calc(var(--background-height) * -0.5);
    left: calc(var(--background-width) * -0.5);
    width: calc(100% + (var(--background-width) * 2));
    height: calc(100% + (var(--background-width) * 2));
    overflow: hidden;
    z-index: -500;
    filter: brightness(0.75) hue-rotate(20deg);
}

#background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#00000000 80%, #00000080);
    z-index: -250;
}

#banner-container {
    background-color: var(--container-background);
    border: var(--page-hborder);
    margin: var(--page-vpadding) auto;
    padding-top: 0.5rem;
    text-align: center;
    width: calc(100% - var(--page-hpadding));
    /*min-width: calc(30rem);*/
}

#banner {
    margin: 0 1.5rem;
}

#banner-subtitle {
    font-size: 1rem;
    margin-top: 0;
    color: var(--page-banner-subtitle);
}

#footer-container {
    background-color: var(--container-background);
    border: var(--page-hborder);
    margin: var(--page-vpadding) auto;
    padding: 1rem 1.5rem;
    text-align: center;
    width: calc(100% - var(--page-hpadding));
    /*min-width: calc(30rem);*/
}

#footer {
    color: var(--page-banner-subtitle);
}

#footer p:first-of-type {
    margin-top: 0;
}

#footer p {
    margin-top: 0.5rem;
}

#main {
    background-color: var(--container-background);
    border-top: 0.25em solid var(--page-accent);
    border-bottom: 0.25em solid var(--page-accent);
    border-left: var(--page-hborder);
    border-right: var(--page-hborder);
    padding: 1rem 1.5rem;
    margin: 0 auto;
    width: calc(100% - var(--page-hpadding));
    /*min-width: calc(30rem);*/
}

#main p {
    text-align: left;
}

#main .portrait p,
#main .iframe-frame p,
#main .frame p {
    text-align: center;
}

#navi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    grid-auto-flow: row;
    grid-row-gap: 0.5rem;
    align-items: center;
    justify-items: center;
    padding: 0.5rem 0;
}

.navi-item {
    display: grid;
    align-items: center;
    justify-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    min-width: 8rem;
}

.navi-item a {
    background-color: #3d009940;
    border: 0.2rem solid var(--page-accent);
    border-radius: 0.8rem;
    padding: 0.5rem;
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: center;
    justify-items: center;
    text-decoration: none;
    width: 7rem;
}

.navi-item a::before {
    font-size: 1.75rem;
}

.navi-item.index a::before    { content: "🏡"; }
.navi-item.glob a::before     { content: "🍝"; }
.navi-item.games a::before    { content: "🎮"; }
.navi-item.music a::before    { content: "🎧"; }
.navi-item.knitting a::before { content: "🧶"; }
.navi-item.profile a::before  { content: "😺"; }
.navi-item.misc a::before     { content: "💻"; }
.navi-item.about a::before    { content: "🏳️‍⚧️"; }

#form-backgen {
    background-color: var(--container-background);
    border: 0.1rem solid var(--page-accent);
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
    width: 60%;
}

#form-backgen .field {
    width: 100%;
}

#form-backgen .field:not(:last-of-type) {
    margin-bottom: 1rem;
}

#form-backgen .field:not(:first-of-type) {
    margin-top: 1rem;
}

#form-backgen label, .complaint-box label {
    display: block;
    margin-bottom: 0.5rem;
    width: 100%;
}

#form-backgen input {
    margin: 0 1rem;
    width: calc(100% - 3rem);
}

.latest-changes {
    background-color: var(--container-background);
    border: 0.2rem solid var(--page-accent);
    margin: 0 auto;
    padding: 0.5rem 1rem;
    max-height: calc(80vh - 3rem);
    width: calc(100% - 2rem);
    overflow: auto;
}

.change {
    --change-highlight: #ffffff;
    --change-highlight-2: #ffffff20;
    display: grid;
    grid-template-rows: auto auto 1fr;
    align-items: start;
    justify-items: start;
    border-left: 0.2rem solid var(--change-highlight);
    padding: 0.5rem 1rem;
    background-image: linear-gradient(90deg, var(--change-highlight-2), #00000000 5rem);
}

.change:nth-last-child(12n+12) { --change-highlight: #ff0080; --change-highlight-2: #ff008020; }
.change:nth-last-child(12n+11) { --change-highlight: #ff00ff; --change-highlight-2: #ff00ff20; }
.change:nth-last-child(12n+10) { --change-highlight: #8000ff; --change-highlight-2: #8000ff20; }
.change:nth-last-child(12n+9)  { --change-highlight: #0000ff; --change-highlight-2: #0000ff20; }
.change:nth-last-child(12n+8)  { --change-highlight: #0080ff; --change-highlight-2: #0080ff20; }
.change:nth-last-child(12n+7)  { --change-highlight: #00ffff; --change-highlight-2: #00ffff20; }
.change:nth-last-child(12n+6)  { --change-highlight: #00ff80; --change-highlight-2: #00ff8020; }
.change:nth-last-child(12n+5)  { --change-highlight: #00ff00; --change-highlight-2: #00ff0020; }
.change:nth-last-child(12n+4)  { --change-highlight: #80ff00; --change-highlight-2: #80ff0020; }
.change:nth-last-child(12n+3)  { --change-highlight: #ffff00; --change-highlight-2: #ffff0020; }
.change:nth-last-child(12n+2)  { --change-highlight: #ff8000; --change-highlight-2: #ff800020; }
.change:nth-last-child(12n+1)  { --change-highlight: #ff0000; --change-highlight-2: #ff000020; }

.change:not(:first-child) {
    margin-top: 1rem;
}

.change-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
}

.change-date {
    color: var(--page-accent-2);
    font-size: 1rem;
    font-weight: bold;
}

.change-date::before { content: "["; }
.change-date::after { content: "]"; }

.change-detail p {
    font-size: 1.1rem;
    margin-top: 0.75rem;
}

.complaint-box {
    background-color: var(--container-background);
    border: 0.2rem solid var(--page-text);
    border-top-color: var(--page-text-2);
    border-left-color: var(--page-text-2);
    margin: 1rem 1rem;
    padding: 0.5rem 1rem;
}

.portrait-container {
    display: grid;
    grid-template-columns: var(--grid-column-size) var(--grid-column-size);
    grid-template-rows: auto;
    grid-gap: 1rem;
    align-items: self-start;
    justify-content: center;
    margin: 1rem auto 0;
    width: calc(100% - var(--grid-hmargin));
}

.portrait-container.single {
    grid-template-columns: 1fr;
    width: 15rem;
    max-width: 100%;
}

.portrait {
    background-color: var(--container-background);
    border: 0.15rem solid var(--page-accent);
    text-align: center;
}

.portrait img {
    max-width: 80%;
}

.frame-container {
    margin: 1rem auto;
    width: 100%;
}

.frame {
    background-color: var(--container-background);
    border: 0.15rem solid var(--page-accent);
    margin: 0 auto;
    max-width: calc(50% + 2rem);
    text-align: center;
}

.frame-float {
    max-width: 15rem;
    margin-bottom: 1rem;
    text-align: center;
}

.frame-float .frame {
    margin: 1rem auto;
    max-width: 100%;
}

.frame-float.left {
    float: left;
    margin-right: 1rem;
}

.frame-float.right {
    float: right;
    margin-left: 1rem;
}

.frame-inner, .frame {
    display: grid;
    grid-template-rows: 1fr auto;
}

.frame-full {
    background-color: var(--container-background);
    border: 0.15rem solid var(--page-accent);
    position: relative;
    margin: 1rem auto 0;
    max-width: calc(100% - 1rem);
    text-align: center;
}

.frame-full img {
    margin: 1rem auto 0;
    max-height: calc(100vh - 3rem);
    max-width: calc(100% - 2rem);
}

.frame-full img:only-child {
    margin-bottom: 1rem;
}

.frame a, .frame-full a, .frame-float a {
    text-decoration: underline;
}

.iframe-frame {
    position: relative;
    overflow: hidden;
    background-color: var(--container-background);
    border: 0.15rem solid var(--page-accent);
    margin: 0 auto;
    padding-top: 56.25%;
    width: 100%;
    text-align: center;
}

.yt-embed {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
}

.frame img {
    margin: 1rem auto 0;
    max-width: calc(100% - 2rem);
}

.frame img:only-child {
    margin-bottom: 1rem;
}

.frame-label {
    display: inline-block;
    font-size: 1rem;
    margin: 0.5rem 0.5rem;
}

.caption {
    margin: 0 1rem 1rem;
}

.portrait:hover {
    background-color: var(--container-background-hover);
}

.portrait img {
    border-radius: 50%;
    margin: 1rem auto 0 auto;
    width: 10rem;
}

.portrait p {
    margin: 0.2rem 1rem 0.5rem 1rem;
}

.table-of-contents {
    background-color: var(--container-background);
    border: 0.1rem solid var(--page-accent);
    clear: both;
    padding: 0.8rem 1rem;
    margin-top: 1rem;
    max-width: var(--table-of-contents-max-width);
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents p {
    margin-top: 0;
}

.table-of-contents li {
    margin-top: 0.5rem;
}

.table-of-contents a, .table-of-contents a:visited {
    text-decoration: none;
}

.table-of-contents a:hover, .table-of-contents a:active {
    text-decoration: underline;
}

.table-of-contents-label {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 1rem;
}

.table-of-contents-index {
    color: var(--page-text);
    margin-right: 0.5rem;
}

.emphasis-1 {
    font-weight: bold;
}

.emphasis-2 {
    color: var(--page-accent);
    font-weight: bold;
}

.emphasis-3, h3 {
    font-weight: bold;
    color: var(--emphasis-3-text);
    text-shadow: 0.0rem 0.05rem 0.2rem var(--emphasis-3-shadow),
                 0.0rem -0.05rem 0.2rem var(--emphasis-3-shadow),
                 -0.05rem 0.0rem 0.2rem var(--emphasis-3-shadow),
                 0.05rem -0.0rem 0.2rem var(--emphasis-3-shadow);
}

.emphasis-4 {
    color: var(--page-warning);
    font-weight: bold;
}

h2 {
    font-weight: bold;
    color: var(--h3-text);
    text-shadow: 0.0rem 0.05rem 0.2rem var(--h3-shadow),
                 0.0rem -0.05rem 0.2rem var(--h3-shadow),
                 -0.05rem 0.0rem 0.2rem var(--h3-shadow),
                 0.05rem -0.0rem 0.2rem var(--h3-shadow);
}

h4 {
    font-weight: bold;
    color: var(--h4-text);
    text-shadow: 0.0rem 0.05rem 0.2rem var(--h4-shadow),
                 0.0rem -0.05rem 0.2rem var(--h4-shadow),
                 -0.05rem 0.0rem 0.2rem var(--h4-shadow),
                 0.05rem -0.0rem 0.2rem var(--h4-shadow);
}

@media screen and (max-width: 1024px) {
    html, textarea {
        font-size: 0.9em;
    }
    :root {
        --page-hpadding: 20%;
        --table-of-contents-max-width: 70%;
    }
}

@media screen and (max-width: 800px) {
    html, textarea {
        font-size: 0.9em;
    }
    :root {
        --page-hpadding: 10%;
        --grid-column-size: 40%;
        --grid-hmargin: 2rem;
        --table-of-contents-max-width: 80%;
    }
    #background-anim {
        animation: none;
    }
}

@media screen and (max-width: 640px) {
    html, textarea {
        font-size: 0.8em;
    }
    :root {
        --page-hpadding: 5%;
        --grid-column-size: 45%;
        --table-of-contents-max-width: 100%;
    }
    #background-anim {
        animation: none;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --page-vpadding: 0;
        --page-hpadding: 0;
        --page-hborder: 0;
        --table-of-contents-max-width: 100%;
        --container-background: #1b001f80;
    }
    p, label, input, textarea, ul, ol, dl {
        font-size: 1.15rem;
    }
    #main, #footer-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .latest-changes {
        width: calc(100% - 1rem);
    }
    .complaint-box {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    #background-anim {
        animation: none;
    }
    .frame-float, .frame-float.left, .frame-float.right {
        max-width: calc(100% - 1rem);
        float: none;
        margin-left: auto;
        margin-right: auto;
    }
}

.neocities-footer-container {
    display: grid;
    grid-template-rows: 1fr;
    align-items: center;
    justify-items: center;
    width: 100%;
    margin-top: 0.5rem;
    text-align: left;
}

.neocities-footer-container a {
    text-decoration: none;
    color: var(--page-text);
    text-shadow: none;
}

.neocities-footer {
    background-color: #ffffff10;
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: center;
    border: 0.15rem solid var(--page-accent);
    border-radius: 0.75rem;
    height: 4rem;
    width: 11rem;
}

.neocities-footer .neocities-small {
    /*letter-spacing: calc(var(--wasp-generic-font-size) * 0.01);*/
    font-size: 0.9rem;
    font-weight: bold;
}

.neocities-footer .neocities-big {
    /*letter-spacing: 0.02rem;*/
    font-size: 1.5rem;
    font-weight: bold;
}

.neocities-footer img {
    max-height: 3.5rem;
}

::selection {
    background-color: var(--selection-background);
    color: var(--selection-color);
    text-shadow: 0.1rem 0.1rem 0.025rem var(--selection-shadow);
}