@property --stripe-color {
    syntax: '<color>';
    inherits: false;
    initial-value: rgba(127, 127, 127, 0.25);
}

html, body {
    margin: 0;
    padding: 0;
    background-color: #FFF;
}

.container {
    display: block;
    width: 100%;
    max-width: 1360px;
    height: auto;
    margin: 0 auto;
}

.inline {
    display: inline;
}

.intro-text {
    max-width: 1000px;
    position: relative;
}

.mainpage-header {
    display: block;
    width: 100%;
    position: relative;
    top: 164px;
}

.mainpage-header .logo {
    display: block;
    max-width: 1024px;
    width: auto;
    height: auto;
    position: absolute;
    left: 19%;
    bottom: -16px;
    font-size: 28px;
    text-shadow: 0 0 8px #FFF;
    z-index: 2;
}

.mainpage-header .logo h1 {
    animation: logo-h1-anim 0.8s;
}

@keyframes logo-h1-anim {
    0%, 50% { opacity: 0; }
    100% { opacity: 1; }
}

.mainpage-header .logo span {
    margin-left: 10%;
    font-size: 75%;
    position: relative;
    top: 8px;
    white-space: nowrap;
    animation: logo-span-anim 1s;
    cursor: default;
}

@keyframes logo-span-anim {
    0%, 50% { opacity: 0; margin-left: 0; }
    50% { margin-left: 0; }
    100% { opacity: 1; margin-left: 10%; }
}

.mainpage-header .logo span:before,
.mainpage-header .logo span:after {
    content: "\/";
}

h1 {
    margin: 0;
    line-height: 0.8em;
}

a:link, a:visited, a:active {
    text-decoration: underline;
    color: #000;
}

.mainpage-header .logo a, .mainpage-header .logo a:hover {
    text-decoration: none;
    color: #000;
}

.content {
    display: block;
    height: auto;
    padding: 16px 0;
    box-sizing: border-box;
    position: relative;
    transition: opacity 0.8s;
    text-align: left;
}

.content.loading {
    transition: height 0.8s;
}

.scroll-top {
    display: block;
    width: 100%;
    height: 249px;
    background: transparent url('../img/background/scroll_top.png') no-repeat center bottom/1328px auto;
}
.scroll-middle {
    display: block;
    width: 100%;
    height: auto;
    background: url('../img/background/scroll_middle_top.png') no-repeat center top/1296px auto,
        url('../img/background/scroll_middle.png') repeat-y center top/1296px auto;
    padding: 32px 19% 2px 19%;
    box-sizing: border-box;
    line-height: 1.2em;
    color: #420;
}
.scroll-bottom {
    display: block;
    width: 100%;
    height: 334px;
    background: transparent url('../img/background/scroll_bottom.png') no-repeat center top/auto 100%;
}

.scroll-middle a:link,
.scroll-middle a:visited {
    color: #006;
}
.scroll-middle a:hover {
    color: #00A;
    text-decoration: none;
}

.form {
    display: block;
    text-align: center;
    margin-bottom: 24px;
}
.form-center {
    margin-left: auto;
    margin-right: auto;
}

.form .rows {
    display: inline-block;
    text-align: left;
}

.form .rows div input {
    margin-bottom: 12px;
}

input:not([type="checkbox"]):not([type="radio"]), textarea, select {
    min-width: 160px;
    padding: 8px;
    border-radius: 3px;
}

input[type="submit"],
input[type="button"] {
    background-color: #EEE;
    box-shadow: -2px -2px 1px rgba(0, 0, 0, 0.2) inset, 2px 2px 1px rgba(255, 255, 255, 0.2) inset;
}

input[type="submit"]:active,
input[type="button"]:active {
    box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.2) inset, -2px -2px 1px rgba(255, 255, 255, 0.2) inset;
}

.rating-container-outer {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}
.rating-container {
    display: block;
    width: calc(32px * 5);
    height: 32px;
    background: transparent url('../img/background/rating-empty.png') repeat-x 0 0/32px 32px;
}
.rating-container .rating {
    display: block;
    width: 0;
    height: 32px;
    background: transparent url('../img/background/rating-full.png') repeat-x 0 0/32px 32px;
}
.rating-container .rating-ghost {
    display: block;
    width: 0;
    height: 32px;
    background: transparent url('../img/background/rating-ghost.png') repeat-x 0 0/32px 32px;
}

.dimensions {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.dimensions input,
.dimensions select {
    min-width: auto !important;
    width: 80px;
}
.dimensions .times {
    margin: 0 8px;
    padding-bottom: 8px;
}
.dimensions .dimension {
    display: inline-flex;
    flex-direction: column;
}
.dimensions .dimension span {
    font-size: 10px;
    color: #777;
}

.unique-layers .layer input,
.unique-layers .layer select {
    min-width: auto;
    width: 54px;
}
.unique-layers .layer select {
    width: auto;
}

.list-item {
    padding: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
}
.list-item:nth-child(2n+1) {
    background-color: rgba(0, 0, 0, 0.1);
}

.world-buttons button img,
.visibility-buttons button img {
    user-select: none;
    pointer-events: none;
}

.share-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.bg-table:nth-child(2n+1) {
    background-color: rgba(0, 0, 0, 0.1);
}

.visibility-container {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    margin-left: 8px;
}

body.long .scroll-middle {
    line-height: 1.5em;
}
body.long .scroll-middle h1 {
    color: #000;
    font-size: 1.8em;
    line-height: 1.1em;
}
body.long .scroll-middle h2 {
    color: #000;
    font-size: 1.3em;
    margin-top: 2em;
    margin-bottom: 1em;
}
body.long .switch-read-mode-button {
    cursor: pointer;
    user-select: none;
    margin-top: 0.5em;
}
body.long .switch-read-mode-button:hover {
    text-decoration: underline;
}
body.long .switch-read-mode-button:active {
    text-decoration: none;
}

.active-animated-button {
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.active-animated-button::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: -100%;
    
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 240deg,
        rgba(0, 144, 237, 0) 240deg,
        rgba(0, 144, 237, 0.5) 320deg,
        rgba(0, 144, 237, 0.9) 360deg
    );

    animation: border-spin 2s linear infinite;
}

.active-animated-button::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 4px;
    border-radius: 3px;
    background: #EEE;
}

.active-animated-button > * {
    position: relative;
    z-index: 3;
}

button.active.active-animated-button {
    box-shadow: 0 0 0 2px rgba(0, 144, 237, 0.8);
}

@keyframes border-spin {
    to {
        transform: rotate(360deg);
    }
}

.detailed-search-input {
    min-width: auto;
    width: max(320px, 90%);
    max-width: min(320px, 90dvw);
    box-sizing: border-box;
    font-size: 12px;
}


.footer {
    padding: 0 32px;
    margin-bottom: 32px;
    filter: drop-shadow(2px 2px 0 #000);
    color: #FFF;
    line-height: 1.5em;
}

.footer a:link, .footer a:visited {
    color: #FFF;
    text-decoration: none;
    text-shadow: none;
    margin: 0 8px;
}
.footer a:hover {
    text-decoration: underline;
}

.footer .copyright {
    white-space: nowrap;
}

.fieldset {
    box-sizing: border-box;
    margin: 16px 8px;
    border: 2px solid #888;
    width: 100%;
    max-width: 800px;
    height: auto;
    position: relative;
}
.fieldset.closed {
    --stripe-color: rgba(127, 127, 127, 0.25);
    background: repeating-linear-gradient(
        -45deg,
        var(--stripe-color) 0,
        var(--stripe-color) 2px,
        transparent 2px,
        transparent 8px
    );
    transition: --stripe-color 0.2s ease-out;
}
.fieldset.closed:hover {
    border-color: #BBB;
    --stripe-color: rgba(127, 127, 127, 0);
}
.fieldset > .accordion {
    margin: 8px;
    padding: 4px;
}
.fieldset.closed > .accordion {
    overflow: hidden;
}
.fieldset.closed > .accordion {
    height: 0;
}

.fieldset > .legend {
    position: absolute;
    display: inline-block;
    left: 16px;
    top: -12px;
    background-color: rgb(252, 253, 237);
    color: #006;
    box-sizing: border-box;
    padding: 0 8px;
}

.fieldset.open > .legend:before,
.fieldset.closed > .legend:before {
    content: "";
    display: inline-block;
    position: absolute;
    left: -24px;
    top: 0;
    width: min(800px, 95vw);
    height: 24px;
    z-index: 2;
    cursor: pointer;
}
.fieldset.closed > .legend:before {
    height: 44px;
}
.fieldset.open > .legend:after {
    content: " ▲";
}
.fieldset.closed > .legend:after {
    content: " ▼";
}


.on-mobile {
    display: none;
}
.on-desktop {
    display: inline-block !important;
}

@media (max-width: 1280px) {
    html, body {
        background-color: #141414;
    }
    body.mainpage {
        background: none;
        color: #FFE0C0;
    }

    .header {
        position: fixed;
        background: none;
        /*background-color: rgba(35, 35, 35, 0.97);*/
        background: linear-gradient(0deg,rgba(35, 35, 35, 0.97) 0%, rgba(35, 35, 35, 0.97) 33%, rgba(42, 42, 42, 0.97) 33%, rgba(42, 42, 42, 0.97) 100%);
        border: 2px solid rgba(0, 0, 0, 0.97);
    }
    .header-inner {
        height: 40px;
    }
    .header-inner .logo {
        position: absolute;
        margin-left: 8px;
    }

    .header-inner .menu-mobile-button {
        display: inline-block;
        position: relative;
        z-index: 2;
    }
    .header-inner .menu-items {
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        width: 372px;
        max-width: calc(100dvw - 48px);
        height: 100dvh;
        gap: 8px;
        position: fixed;
        left: 0;
        top: 0;
        background-color: #202020;
        overflow-y: auto;
    }
    .header-inner .menu-items.show {
        display: flex;
        left: 0%;
        animation: anim-menu-in 0.4s ease-out;
    }
    .header-inner .menu-items.hide {
        left: -100%;
        animation: anim-menu-out 0.4s ease-in !important;
    }

    .header-inner .menu-items > *:last-child {
        margin-bottom: 24px;
    }

    .header-inner .menu-items .menu {
        display: flex;
        flex-shrink: 0;
        padding: 8px;
        width: 100%;
        height: 40px;
        margin: 0;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        background-color: #333;
        /*border-bottom: 2px solid #333;*/
        text-decoration: none;
        box-shadow: none;
        filter: none;
    }

    .header-inner .menu-items .list-container {
        width: 100%;
        border: none;
    }

    .header-inner .menu-items .list-container .list-element-selected {
        width: calc(100% - 16px);
        justify-content: center;
        flex-shrink: 0;
        padding: 8px;
        column-gap: 4px;
        background-color: #333;
        color: #FFF;
        border: none;
        text-decoration: none;
        box-shadow: none;
        filter: none;
    }

    .header-inner .menu-items .list-container .list {
        position: relative;
        width: 100%;
        right: auto;
        top: 0;
        left: 0;
        margin-bottom: 8px;
    }
    .header-inner .menu-items .list-container .list .list-element {
        width: calc(100% - 16px);
        justify-content: center;
        flex-shrink: 0;
        padding: 8px;
        column-gap: 4px;
        background-color: #2B2B2B;
        color: #FFF;
        border: none;
        text-decoration: none;
        box-shadow: none;
        filter: none;
    }

    .header-inner .menu-items .menu:active,
    .header-inner .menu-items .list-container:active .list-element-selected,
    .header-inner .menu-items .list-container.open .list-element-selected {
        background-color: #444;
    }

    .scroll-top,
    .scroll-bottom {
        display: none;
    }
    .scroll-middle {
        background: none;
        color: #CCC;
        padding: 24px 16px 2px 16px;
        box-sizing: border-box;
        /*color: #FFE0C0;*/
    }

    .mainpage-header {
        top: 0;
    }
    .mainpage-header .logo {
        font-size: 14px;
        position: relative;
        left: auto;
        bottom: auto;
    }
    .mainpage-header .logo a {
        line-height: 1.2em;
        color: #FFF;
        text-shadow: none;
    }
    .mainpage-header .logo span {
        display: block;
        width: 90%;
        white-space: normal;
        text-shadow: none;
        color: #999;
    }

    .scroll-middle a:link, .scroll-middle a:visited, .scroll-middle a:hover {
        color: #FFE0C0;
    }

    .scroll-middle h2:first-child {
        margin-top: 0;
    }

    .scroll-middle h2 {
        font-size: 18px;
    }
    .scroll-middle p {
        font-size: 12px;
        line-height: 1.4em;
    }

    body.long .scroll-middle {
        font-size: 12px;
        color: #888;
    }
    body.long .scroll-middle strong {
        color: #CCC;
    }
    body.long .scroll-middle h1 {
        color: #FFF;
        font-size: 22px;
        text-shadow: none;
    }
    body.long .scroll-middle h2 {
        color: #FFF;
        font-size: 18px;
        text-shadow: none;
    }

    .background-blur p {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .background-blur h2 {
        text-shadow: none;
        line-height: 1.2em;
    }

    .on-mobile {
        display: inline-block;
    }
    .on-desktop {
        display: none !important;
    }

    .c-normal { color: #CCC; }
    .t-label { color: #666; }

    .list-item {
        flex-direction: column;
        margin-top: 24px;
        margin-bottom: 24px;
        border-radius: 2px;
    }
    .list-item:nth-child(2n+1) {
        background-color: #222;
    }
    .world-buttons {
        flex-direction: row;
        width: auto;
        box-sizing: border-box;
        margin-top: 8px;
    }
    .world-buttons button img {
        filter: drop-shadow(-1px 0 0 #444) drop-shadow(1px 0 0 #444) drop-shadow(0 -1px 0 #444) drop-shadow(0 1px 0 #444);
    }

    .share-buttons-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding: 8px;
    }
    button img.grayscale:not(:hover) {
        filter: grayscale(0.5) opacity(0.75);
    }

    .rows {
        background-color: #222;
    }
    .rows .t-label {
        color: #888;
    }

    input[type="submit"], input[type="button"], button {
        background-color: #E1CE95;
        box-shadow: -2px -2px 1px rgba(0, 0, 0, 0.2) inset, 2px 2px 1px rgba(128, 128, 128, 0.1) inset;
    }

    input:not([type="checkbox"]):not([type="radio"]), textarea, select {
        max-width: 80dvw;
    }
    
    button img {
        filter: none;
    }
    .world-buttons button {
        background-color: rgb(61, 37, 29);
        background-color: #141414;
    }

    .visibility-container img {
        filter: drop-shadow(-2px 0 0 #666) drop-shadow(2px 0 0 #666) drop-shadow(0 -2px 0 #666) drop-shadow(0 2px 0 #666);
    }
    /*.rating-container {
        filter: drop-shadow(-2px 0 0 #000) drop-shadow(2px 0 0 #000) drop-shadow(0 -2px 0 #000) drop-shadow(0 2px 0 #000);
    }*/
    .free-world-info:not(.c-red) {
        color: #E1CE95;
    }
    .free-world-info.c-red {
        color: #CF2A2A;
    }

    .bg-table:nth-child(2n+1) {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .creator-flag {
        width: 16px;
        height: 16px;
        outline: none;
    }

    .mobile-t-small {
        font-size: 80%;
    }

    .active-animated-button::after {
        background-color: #141414;
    }

    .fieldset > .legend {
        background-color: #141414;
        color: #FFE0C0;
    }

    .fieldset .accordion label {
        width: 100%;
    }
}

.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.mb16 { margin-bottom: 16px; }
.w-100 { width: 100%; }

@keyframes anim-menu-in {
    0% { left: -100%; }
    100% { left: 0%; }
}
@keyframes anim-menu-out {
    0% { left: 0%; }
    100% { left: -100%; }
}
