:root {
    --hover-trans-timing: cubic-bezier(0.42,0,1,1);
    --hover-trans: 0.35s;
    --border-radius: 8px;
}

#main-container {
    background-color: black;
    border-image: url("/res/bg/border-blur.avif") 50 / 100px / 100px;
    width: 1100px;
    height: 620px;
    display: flex;
    position: relative;
    anchor-name: --main;
}

#main-container::after {
    position: absolute;
    width: calc(100% + 100px - 60px);
    height: calc(100% + 100px - 60px);
    content: "";
    left: -20px;
    top: -20px;
    pointer-events: none;
    user-select: none;
    background-image: url("/res/bg/noise.avif");
    border-radius: var(--border-radius);
    mix-blend-mode: soft-light;
    opacity: 0.25;
    filter: contrast(0.5) brightness(1.3);
    animation: noise steps(8) infinite 3s;
    z-index: 2;
    overflow: hidden;
}

#main-container.arrival {
    animation: arrival 1 0.4s linear;
}

@keyframes arrival {
    from {transform: scaleY(0.2) scaleX(1.5); opacity: 0}
    85% {transform: scaleY(1.1) scaleX(0.9)}
}

.background {
    position: fixed;
    height: 100%;
    z-index: 0;
    bottom: 0;
    image-rendering: pixelated;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    pointer-events: none;
    user-select: none;
}

.overlay {
    width: 50%;
    right: 0;
    background-image: url("/res/bg/power.avif");
    mix-blend-mode: hard-light;
    filter: blur(1px) hue-rotate(7deg) saturate(0.6);
    opacity: 0.6;
}

.overlay-2 {
    width: 50%;
    left: 0;
    background-image: url("/res/bg/power_2.avif");
    mix-blend-mode: hard-light;
    filter: blur(1px) brightness(1) saturate(0.4);
    opacity: 0.42;
    background-size: 130%;
    background-position: bottom left;
}

.overlay-3 {
    width: 100%;
    left: 0;
    opacity: 0.45;
    background: repeating-linear-gradient(
        -45deg,
        #0e040047,
        #0e040047 3px,
        #ff490110 3px,
        #ff490110 6px
    );
    mix-blend-mode: overlay;
}

.background.fade-in {
    animation: background-fade-in 4s linear 1;
}

@keyframes background-fade-in {
    from {opacity: 0}
}

#content {
    height: calc(95% - 50px);
    overflow-y: auto;
    overflow-x: hidden;
    width: 60%;
    border-width: 1px;
    border-color: var(--glow);
    border-style: solid;
    border-radius: var(--border-radius);
    padding: 50px;
    font-size: 1.11em;
    position: relative;
    anchor-name: --content;
    background-image: url("/res/bg/abstract.avif");
    background-size: 70%;
}

#content-border {
    position: absolute;
    /*width: calc(60% + 100px + 6px);
    height: calc(95% + 50px + 6px);
    border: solid var(--glow) 1px;
    border-radius: var(--border-radius);
    position-anchor: --content;
    top: anchor(top);
    left: anchor(left);
    transform: translate(-3px, -3px);*/
    pointer-events: none;
    user-select: none;
    width: 100%;
    height: 100%;
    display: flex;
}

#content-border > div:nth-of-type(1) {
    width: 60%;
    height: calc(95% + 50px + 6px);
    border: solid var(--glow) 1px;
    border-radius: var(--border-radius);
    padding-left: 53px;
    padding-right: 53px;
    margin-left: -3px;
    margin-top: -3px;
}

#content-border > div:nth-of-type(2) {
    margin-left: 27px;
    width: 300px;
}

#fade {
    position: absolute;
    top: 1px;
    border-radius: var(--border-radius);
    width: calc(60% + 100px - 1px);
    left: 1px;
    height: 70px;
    z-index: 2;
    pointer-events: none;
    user-select: none;
    background-image: linear-gradient(to bottom, black 8%, transparent);
}

#fade2 {
    position: absolute;
    width: calc(60% + 100px - 1px);
    left: 1px;
    bottom: -20px;
    border-radius: var(--border-radius);
    height: 70px;
    z-index: 2;
    pointer-events: none;
    user-select: none;
    background-image: linear-gradient(to top, black 8%, transparent);
}

#content > img {
    width: 90%;
    margin: auto;
    display: block;
    object-fit: contain;
    max-height: 430px;
    transition: var(--hover-trans);
    transition-timing-function: ease;
    cursor: pointer;
    margin-bottom: 1.5em;
    user-select: none;
}

img.over {
    position: absolute;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    opacity: 0;
    filter: blur(5px) brightness(1.3) saturate(1.4);
    transition: 0.7s !important;
    anchor-name: none !important;
    top: calc(anchor(top) - 5px);
    justify-self: anchor-center;
    width: 80% !important;
}

:has(#content > img:hover) :is(img.over) {
    opacity: 0.45;
    transition: 2s !important;
}

#content > img:hover {
    scale: 1.015;
    filter: drop-shadow(0px 0px 5px rgb(0, 0, 0)) drop-shadow(-5px 5px 1px rgb(0, 0, 0)) drop-shadow(0px 0px 35px #ff561322);
    transition: var(--hover-trans);
    transition-timing-function: ease;
}

h1 {
    margin: 0;
    font-size: 2.6em;
    transform: scaleY(1.5) skewX(-3deg);
    letter-spacing: -3px;
    filter: var(--hover-shadow);
    margin-bottom: 20px;
    transition: var(--hover-trans);
    transition-timing-function: var(--hover-trans-timing);
    transform-origin: center center;
    line-height: 0.9em;
    width: fit-content;
}

h1:hover {
    transform-origin: center center;
    transform: scaleY(1.5) skewX(-15deg);
    filter: var(--hover-shadow) drop-shadow(0px 0px 15px #ff56135e) brightness(1.1);
    transition: 1.5s;
}

#content > small {
    display: block;
    font-size: 1em;
    margin-left: 20px;
    margin-top: 2px;
    color: var(--glow);
    z-index: 2;
    position: relative;
}

#content > p {
    margin: 0;
    transition: 0.4s;
    user-select: text;
}

#content > p::after {
    content: "";
    height: 1em;
    width: 100%;
    display: block;
}

:has(#tooltip.active:not(#tooltip.is-title)) :is(#content > img) {
    opacity: 0.3;
    transition: 0.4s;
}

.tooltip-hoverable {
    color: var(--text);
}

:has(#tooltip.active:not(#tooltip.is-title)) :is(#content > p, #content span:not(.tooltip-hoverable:hover), #content a, #content li) {
    color: var(--glow);
    transition: 0.4s;
}

#content span, #content a {
    transition: 0.4s;
}

.tags-list {
    transition: var(--hover-trans);
    transition-timing-function: var(--hover-trans-timing);
}

.tags-list > a {
    color: var(--glow-tertiary);
    transition: var(--hover-trans);
    transition-timing-function: var(--hover-trans-timing);
}

.tags-list > a:hover {
    color: var(--text-hover);
    transition: var(--hover-trans);
    transition-timing-function: var(--hover-trans-timing);
    letter-spacing: 0px;
    text-decoration: underline;
    text-decoration-style: dotted;
}

:has(.tags-list > a:hover) :is(.tags-list) {
    transform: scaleY(1.1);
    transition: var(--hover-trans);
    transition-timing-function: var(--hover-trans-timing);
    transform-origin: bottom right;
}

li {
    transition: 0.4s;
}

li:not(li:first-child) {
    margin-top: 8px;
}

ul > ul > li:first-child {
    margin-top: 4px;
}

#content > small {
    width: fit-content;
}

small.date {
    font-style: italic;
    transition: var(--hover-trans);
    transition-timing-function: var(--hover-trans-timing);
    cursor: help;
}

small.date:hover {
    letter-spacing: 0px;
    transition: var(--hover-trans);
    transition-timing-function: var(--hover-trans-timing);
}

.divider {
    border-bottom: dotted 2px var(--glow);
    width: 80%;
    display: block;
    margin: auto;
    margin-top: 20px;
    margin-bottom: 25px;
}

#sidebar {
    margin-left: 30px;
    width: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
}

#main-container.archive {
    width: 600px;
}

#sidebar.archive {
    width: 75%;
    margin: auto;
    height: 100%;
}

#sidebar.archive h1 {
    width: 600px;
    position: relative;
    left: -20%;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.13em;
}

#sidebar.archive .related {
    height: 85%;
}

#sidebar.archive #related-list {
    height: calc(100% - 16px);
}

#sidebar.archive .button {
    width: 94%;
}

#sidebar > div:nth-child(1) {
    z-index: 2;
    position: relative;
    margin-bottom: 8px;
}

#sidebar h1 {
    text-align: center;
    letter-spacing: 0.3em;
    user-select: none;
    cursor: help;
    width: fit-content;
    margin: auto;
    left: -8px;
    position: relative;
}

.related {
    border: solid var(--glow) 1px;
    border-radius: var(--border-radius);
    width: 90%;
    height: 70%;
    anchor-name: --related;
    z-index: 1;
    position: relative;
    background-image: linear-gradient(to bottom, transparent 80%, #bf360010);
}

.related-background {
    background-image: url("/res/bg/moon.avif");
    background-size: 150%;
    background-position: center bottom;
    height: 100%;
    width: 100%;
    position: absolute !important;
    z-index: -1 !important;
    opacity: 0.4;
    filter: hue-rotate(-50deg) contrast(1.2);
}

.related-background::after {
    height: 100%;
    width: 100%;
    position: absolute;
    content: "";
    background-image: linear-gradient(to top, transparent 70%, black);
    pointer-events: none;
    user-select: none;
}

.related-background::before {
    height: 100%;
    width: 100%;
    position: absolute;
    content: "";
    background: repeating-linear-gradient(
        -45deg,
        #00000047,
        #00000047 3px,
        #ff490110 3px,
        #ff490110 6px
    );
    z-index: 2;
    pointer-events: none;
    user-select: none;
}

.related::before {
    position: absolute;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    border: solid var(--glow) 1px;
    border-radius: var(--border-radius);
    content: "";
    position-anchor: --related;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
}

.related::after {
    position: absolute;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    border: solid black 2px;
    border-radius: var(--border-radius);
    content: "";
    position-anchor: --related;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
}

.related > * {
    position: relative;
    z-index: 2;
}

.tabs {
    width: 100%;
    height: 35px;
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    border-bottom: 1px var(--glow) solid;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.tab-button {
    height: calc(100% - 2px);
    width: 50%;
    background: none;
    border: none;
    font-size: 1.15em;
    letter-spacing: -1px;
    padding-top: 0;
    padding-bottom: 0;
    border: 5px black solid;
    border-radius: var(--border-radius);
    background: repeating-linear-gradient(
        -45deg,
        #000000,
        #000000 0.2em,
        #ff49012a 0.2em,
        #ff49012a 0.4em
    );
    position: relative;
    background-size: 200% 200%;
    transition: 0.2s;
    animation: slide 15s infinite linear paused;
    user-select: none;
}

.tab-button.inactive {
    opacity: 0.6;
}

.tab-button::after {
    width: 100%;
    height: 100%;
    position: absolute;
    content: "";
    left: 0;
    top: 0;
    background-image: linear-gradient(to bottom, transparent 30%, rgba(255, 72, 0, 0.235));
    mix-blend-mode: multiply;
}

.tab-button:first-of-type {
    border-left-width: 7px;
}

.tab-button:last-of-type {
    border-right-width: 7px;
}

.tab-button:hover {
    filter: none;
    background: repeating-linear-gradient(
        -45deg,
        #000000,
        #000000 0.2em,
        #ff49012a 0.2em,
        #ff49012a 0.4em
    );
    text-decoration: none;
    background-size: 200% 200%;
    border-color: black;
    animation: slide 15s infinite linear;
    transition: 0.5s;
    letter-spacing: 0em;
    border-top-width: 3px;
    border-bottom-width: 3px;
    opacity: 1;
}

.tab-button:hover::after {
    mix-blend-mode: normal;
    filter: brightness(1.5) saturate(2) contrast(2);
}

@keyframes slide {
    0% {background-position: 0% 0%}
    100% {background-position: 100% 100%}
}

#related-list {
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100% - 36px - 16px);
    position: relative;
}

#related-list > * {
    display: none;
    flex-direction: column;
    height: 100%;
}

#related-list > .active {
    display: flex;
}

#related-list > .active.now {animation: become-active ease-out 0.7s 1}

#related-list > .inactive {
    display: flex;
    animation: become-inactive ease-in 0.35s 1;
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px;
    width: calc(100% - 16px - 16px - 8px);
}

#related-list > * > div:last-of-type {
    width: 100%;
    padding-top: 8px;
}

@keyframes become-inactive {
    20% {transform: translateX(-5%)}
    to {transform: translateX(calc(100% + 8px))}
}

@keyframes become-active {
    0%, 50% {transform: translateX(calc(-100% - 8px))}
    80% {transform: translateX(5%)}
    100% {transform: none}
}

#no-posts {
    width: 80%;
    text-align: center;
    align-self: center;
    margin: auto;
    transform: translateY(-16px);
    pointer-events: none;
    user-select: none;
    font-style: italic;
    font-size: 1.15em;
    line-height: 1em;
}

.inactive > #no-posts {
    transform: translateY(-24px);
}

.inactive > .button {
    width: calc(100% + 3px);
    transition: none;
}
.button {
    margin: 2px;
    padding: 8px;
    border: solid 1px var(--glow);
    border-radius: var(--border-radius);
    width: 90%;
    transition: var(--hover-trans);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    user-select: none;
}

.button > small:first-of-type {
    font-size: 1.15em;
    font-family: var(--sarasaL);
    font-weight: bold;
    transition: var(--hover-trans);
    margin-bottom: 3px;
    filter: var(--text-shadow);
}

.button > small:nth-of-type(2) {
    margin-left: 12px;
    font-size: 0.88em;
    transform: scaleY(1.25) skewX(-8deg);
    transform-origin: center left;
    letter-spacing: -0.1em;
    transition: var(--hover-trans);
    opacity: 0.65;
    filter: var(--text-shadow);
}

.button:hover {
    transition: var(--hover-trans);
    transform: translateX(3px) scaleX(0.985);
    filter: none;
}

.button:hover > small:first-of-type {
    transition: var(--hover-trans);
    transition-timing-function: var(--hover-trans-timing);
}

.button:hover > small:nth-of-type(2) {
    transform: scaleY(1.25) skewX(-8deg) scaleX(1.02);
    margin-left: 10px;
    transform-origin: center left;
    transition: var(--hover-trans);
    transition-timing-function: var(--hover-trans-timing);
    opacity: 0.75;
    color: var(--text);
}

.button::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 10%, rgba(0, 0, 0, 0.521));
    opacity: 0.5;
    user-select: none;
}

.button:hover::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background-image: linear-gradient(to bottom, black 10%, var(--glow));
    transform: translateX(2px) skewX(-1deg);
    animation: fade-in 0.3s linear 1;
    opacity: 0.4;
    user-select: none;
}

.button:hover::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    border: 1px solid var(--text);
    border-radius: var(--border-radius);
    filter: var(--text-shadow);
    animation: fade-in 0.3s linear 1;
    opacity: 0.7;
    user-select: none;
}

.cool {
    display: flex;
    justify-content: right;
    position: absolute;
    width: 110%;
    bottom: -60px;
    height: 300px;
}

.cool > div {
    width: 100%;
}

#cool-gradient {
    position: absolute;
    height: 220px;
    position-anchor: --me;
    left: calc(anchor(left) - 72px);
    bottom: calc(anchor(bottom) - 18px);
    width: 350px;
    pointer-events: none;
    user-select: none;
    transform: rotate(4deg);
    transition: 0.4s;
    background-image: radial-gradient(rgba(207, 150, 88, 0.603), rgba(133, 100, 64, 0.107) 40%, transparent 60%);
}

:has(#me:hover) :is(#cool-gradient) {
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(207, 150, 88, 0.603));
    transition: 0.4s;
}

:has(#me.AAAHHH) :is(#cool-gradient) {
    transition: 0.4s;
    filter: brightness(0.2) !important;
}

#me {
    height: 230px;
    position: relative;
    bottom: -40px;
    right: -110px;
    transform-origin: bottom center;
    animation: fuck 1.8s infinite linear;
    user-select: none;
    filter: contrast(1.15) brightness(0.87);
    opacity: 0.9;
    transition: 0.4s;
    z-index: 3;
    cursor: pointer;
    anchor-name: --me;
}

#me:hover {
    opacity: 1;
    filter: contrast(1.15) brightness(1.1) saturate(0.6);
    transition: 0.4s;
}

#me.AAAHHH {
    animation: AH 1.8s 1 ease-out;
    cursor: default;
}

#me.bye {
    cursor: grab;
}

@keyframes AH {
    10% {transform: scaleY(0.3) scaleX(1.3); rotate: 0deg}
    60% {transform: scaleY(0.6) scaleX(1.05)}
    85% {transform: scaleY(1) scaleX(0.6)}
    90% {transform: scaleX(3) scaleY(0.1); rotate: 45deg}
}

#neso {
    position: absolute;
    bottom: 25px;
    width: 100px;
    filter: contrast(0.85) brightness(0.8) saturate(1.1);
    visibility: hidden;
    user-select: none;
    z-index: 2;
}

#neso.hi {
    visibility: visible;
    left: 0;
    animation: hi 1.6s 1 ease-out;
}

#neso.wow {
    visibility: visible;
    left: 0;
    animation: spin 0.3s 1 linear;
    cursor: grab;
    filter: contrast(0.85) brightness(0.8) saturate(1.1) var(--hover-shadow);
}

#neso.yay:hover {
    filter: contrast(0.85) brightness(0.8) saturate(1.1) var(--hover-shadow);
    transition-property: filter;
    transition-duration: var(--hover-trans);
}

#neso.yay {
    visibility: visible;
    left: 0;
    animation: spin-2 0.8s ease-in infinite;
    cursor: pointer;
    transform: scaleY(0.9);
    transition-property: filter;
    transition-duration: var(--hover-trans);
}

@keyframes hi {
    from {transform: translateX(130px) translateY(-250px) rotate(180deg); opacity: 0}
    80% {opacity: 1}
    85% {transform: rotate(-5deg)}
    to {transform: rotate(0deg)}
}

@keyframes fuck {
    0%, 100% {transform: scaleY(1)}
    50% {transform: scaleY(0.95)}
}

@keyframes spin {
    0% {rotate: 0}
    50% {rotate: -180deg; scale: 1 0.6}
    80%, 100% {rotate: -360deg}
}

@keyframes spin-2 {
    50% {transform: rotate3d(0, 1, 0, 180deg) translateY(-20px)}
}

@keyframes fade-in {
    from {opacity: 0}
}

@media screen and (max-width: 1315px) {
    main {
        transform: none;
        left: auto;
        top: auto;
        position: relative;
        justify-items: center;
    }

    #main-container {
        width: 95%;
        margin-top: 80px;
    }

    #back-button {
        left: -25px;
        top: -75px;
    }

    #lightbox-image {
        height: auto;
        width: 80%;
    }

    .cool {
        overflow: hidden;
    }
}

@media screen and (max-width: 900px) {
    #main-container {
        flex-direction: column;
        align-items: center;
        height: auto;
        margin-top: 30px;
    }

    .archive #main-container {
        width: 100%;
    }

    #sidebar.archive .related {
        height: 450px;
        width: 100%;
    }

    #sidebar.archive {
        display: flex;
        align-items: center;
        margin-top: 50px;
    }

    #sidebar.archive h1 {
        width: 100%;
        left: auto;
    }

    #content {
        width: 85%;
        height: 500px;
    }

    #content-border {
        flex-direction: column;
        align-items: center;
        margin-left: 3px;
    }

    #content-border > div:nth-of-type(1) {
        width: 85%;
        height: 500px;
        padding: 53px;
    }

    #sidebar {
        margin-left: 0;
        margin-top: 30px;
        height: 500px;
        display: grid;
        width: 100%;
        justify-content: center;
        align-content: start;
    }

    #fade {
        width: calc(85% + 100px - 1px);
        left: auto;
    }

    #fade2 {
        width: calc(85% + 100px - 1px);
        position-anchor: --content;
        bottom: calc(anchor(bottom) + 1px);
        left: auto;
    }

    #sidebar-header {
        padding-left: 25px;
    }

    .related {
        height: 450px;
        width: 270px;
        grid-column: 1;
    }

    .cool {
        position: relative;
        grid-column: 2;
        margin-left: 20px;
        width: 130%;
        bottom: -200px;
    }

    #me {
        top: 0;
        bottom: auto;
        right: -80px;
    }

    #neso {
        bottom: auto;
        top: 150px;
    }

    #back-button {
        left: -15px;
        top: -32px;
    }

    #lightbox-image {
        width: 90%;
    }
}

@media screen and (max-width: 703px) {
    #sidebar {
        height: calc(550px + 250px);
        width: calc(100% + 40px);
        display: flex;
    }

    .cool {
        width: 95%;
        bottom: -50px;
        margin: auto;
        margin-bottom: 0px;
        margin-top: -20px;
    }

    .cool > div {
        display: flex;
        justify-content: center;
    }

    #me {
        bottom: auto;
        top: 0;
        right: auto;
        margin-left: 50px;
    }

    #neso {
        bottom: auto;
        top: 160px;
        left: auto;
        margin-right: 250px;
    }

    #neso.yay, #neso.wow {
        left: auto;
        margin-right: 250px;
    }

    #neso.hi {
        left: auto;
    }

    .cool > div {
        overflow: hidden;
    }

    .related {
        margin: auto;
        height: 445px;
    }

    #content {
        height: 700px;
        padding-left: 10%;
        padding-right: 10%;
        width: 85%;
    }

    #content-border > div:nth-of-type(1) {
        height: 700px;
        width: 85%;
        padding-left: calc(10% + 3px);
        padding-right: calc(10% + 3px);
    }

    #fade, #fade2 {
        width: calc(85% + 20% - 1px);
    }

    img.over {
        display: none !important;
    }

    #lightbox-image {
        width: 95%;
    }
}

@media screen and (max-width: 460px) {
    #sidebar.archive h1 {
        transform: scaleX(0.7) scaleY(1.8);
    }

    #main-container.archive {
        width: 90%
    }
}