:root {
    --border-color: black;
    --font: Helvetica, sans-serif;
    --font-tall: Aulercica, Helvetica, sans-serif;
    --nameButton-bg: #EADE3C;
    --nameButton-tx: #671308;
    --button-size: max(8vw, 12vh);
    --button-gap: 1vw;
}

* {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    min-width: 100vw;
    max-width: 100vw;
    display: flex;
    flex-direction: row;
    font-size: min(5vh, 5vw);
    font-family: var(--font);
}

select, button {
    background-color: #e9e9ed;
    border-color: #e3e3e3;
    text-align: center;
}

a {
    color: #FF0080;
}

aside {
    min-width: 200px;
    border-right: 0.25rem solid var(--border-color);
    display: flex;
    flex-direction: column;
}

aside > div {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 20vh;
    border-bottom: 0.25rem solid var(--border-color);
}

aside > div img {
    max-height: 75%;
    max-width: 75%;
    image-rendering: pixelated;
}

aside nav {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    text-align: center;
    align-items: center;
}

aside nav > button {
    height: 100%;
    width: 100%;
    border: none;
    border-bottom: 0.0625rem solid var(--border-color);
    border-top: 0.0625rem solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: none;
}

aside nav > button:first-child {
    border-top: none;
}

aside nav > button:last-child {
    border-bottom: none;
}

aside nav button span {
    display: inline-block;
    font-family: var(--font-tall);
    font-size: 150%;
}

#wrapper {
    min-height: 100vh;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

header {
    min-height: 20vh;
    border-bottom: 0.25rem solid var(--border-color);
    display: flex;
    flex-direction: column;
}

header section {
    flex-grow: 1;
}

#newsMarquee {
    overflow: hidden;
    white-space: nowrap;
    border-top: 0.125rem solid var(--border-color);
    width: 100%;
    font-size: 75%;
}

#newsContent {
    display: inline-block;
}

main {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    word-break: break-word;
}

section {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    justify-items: center;
}

main section {
    flex-grow: 1;
}

#buttons {
    flex-wrap: nowrap;
    overflow: clip;
    gap: 2vh;
    width: 100%;
    font-size: min(4vh, 4vw);
}

#buttons > div {
    width: 100%;
    overflow: clip;
    height: calc(var(--button-size) + 1vh);
    display: flex;
    flex-wrap: nowrap;
    position: relative;
}

#buttons button, #stanleyButton {
    position: absolute;
    width: var(--button-size);
    height: var(--button-size);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border-bottom-left-radius: 0%;
    border: min(0.5vw, 0.5vh) var(--nameButton-tx) solid;
    cursor: pointer;
    background-color: var(--nameButton-bg);
    color: var(--nameButton-tx);
    padding: min(1vw,1vh);
    content: "NAME";
    font-size: 75%
}

#stanleyButton {
    font-size: calc(0.75 * min(4vh, 4vw));
}

#buttons button::after, #stanleyButton::after {
    content: "NAME";
}
.scroll button {
    animation: button-scroll-left 10s linear infinite;
}

.reverse button {
    animation: button-scroll-right 10s linear infinite;
}

#achievementsWall > figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#shop > div {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

#costs > span button:not(.activated), #shop button.unavailable {
    filter: brightness(0.8);
}

#shop button {
    width: 80%;
    border: none;
    border: 0.0625rem solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-size: 50%;
}

#stanleyDoor {
    background: none;
    border: none;
    border: 0.5rem solid black;
    border-bottom: none;
    max-height: 70vh;
    aspect-ratio: 1 / 1.5;
    display: inline-flex;
    justify-content: center;
    box-shadow: 0 5vh 0.5rem rgba(0,0,0,0.3);
    margin-top: 5vh;
    margin-bottom: 10vh;
}

#stanleyDoor span {
    font-size: 12vh;
    padding: 0.5rem 1rem;
}

#trophies, #costs {
    padding: 0 1em;
    justify-content: flex-start;
}

#achievementWall, #shop {
    width: 100%;
    text-align: left;
    justify-content: center;
}

#achievementWall figure, #shop figure {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 50%;
}

#achievementWall figure img, #shop figure img {
    height: 8vh;
    margin-right: 0.25em;
}

#achievementWall span:first-child, #shop span:first-child {
    font-weight: bold;
}

#achievementWall span:last-child, #shop span:last-child {
    opacity: 0.8;
    font-style: italic;
}

#stats {
    padding: 0 1em;
    justify-content: flex-start;
}

#statsWall {
    width: 100%;
    text-align: center;
    font-size: 50%;
}

#settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(max(15vw, 25vh), 1fr));
}

@media only screen and (max-width: 500px) {
    body { flex-direction: column; }
    #newsMarquee { border-top: 0.125rem solid var(--border-color); }
    #wrapper { min-height: 0; }
    aside { order: 3; border-right: none; }
    aside > div { display: none; }
    aside nav > button:first-child { border-top: 0.125rem solid var(--border-color); }
    #buttons { font-size: min(6vh, 6vw); }
    #achievementWall figure, #statsWall, #shop figure { font-size: 100%; }
    #achievementWall, #statsWall, #shop {
        display: flex;
        flex-direction: column;
    }
}

@media only screen and (min-width: 500px) {
    aside nav { max-height: calc(80vh - 0.25rem); }
    main { overflow-y: scroll; max-height: calc(80vh - 0.25rem); }
    #achievementWall, #shop {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(333px, 1fr));
        gap: 0.25em;
    }
    #statsWall {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 0.25em;
    }
}

@keyframes scroll-left {
    0% { translate: -100% 0; }
    100% { translate: 110vw 0; }
}
@keyframes scroll-right {
    0% { translate: 110vw 0; }
    100% { translate: -100% 0; }
}

@keyframes button-scroll-left {
    0% { translate: calc(-2vw - var(--button-size)) 0; }
    100% { translate: calc(102vw + var(--button-size)) 0; }
}
@keyframes button-scroll-right {
    0% { translate: calc(102vw + var(--button-size)) 0; }
    100% { translate: calc(-2vw - var(--button-size)) 0; }
}