* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    background: #fff;
    font-family: sans-serif;
    transition: background 1s;
    user-select: none;
}

main {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

main > .main-area {
    height: 100vh;
    flex-grow: 1;
}

footer a { color: aquamarine; }
footer a:hover { color: #00ffa8; }

#credits {
    font-family: sans-serif;
    padding: 50px 150px;
}
#credits h1 { margin-top: 0; }

.sergals {
    position: relative;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background-size: cover;
}

.sergal {
    max-width: 200px;
    align-self: center;
    z-index: 2;
    display: flex;
    flex-shrink: 1;
    cursor: pointer;
    transition: opacity 1s;
}

.sergal > img {
    width: 100%;
    object-fit: contain;
}

@keyframes mote-up-and-fade {
    from {
        transform: translateY(0px);
        opacity: 1;
    }
    to {
        transform: translateY(-40px);
        opacity: 0;
    }
}

@keyframes mote-fall-from-top {
    from {
        transform: translateY(0px) rotate(0deg);
    }
    90% {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateY(calc(100vh - 65px)) rotate(100deg);
    }
}

.mote {
    z-index: 50;
}

.mote.merp-mote {
    font-family: 'comic sans ms', cursive;
    font-size: 24px;
    font-weight: bold;
    animation-name: mote-up-and-fade;
    animation-duration: 1s;
}

.mote.cheese-drop-mote {
    height: 64px;
    z-index: 3;
    animation-name: mote-fall-from-top;
    animation-timing-function: linear;
    animation-duration: 1s;
    cursor: grab;
}

.shop {
    display: flex;
    flex-direction: column;

    background: #1a1a1a;
    color: #fff;
    border-right: solid 1px gray;
    box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.5);
    width: 25vw;
    height: 100vh;
    padding: 10px 0;

    text-align: center;
    font-family: monospace;

    transition: margin-left 2s;
}

.shop.hidden {
    margin-left: -25vw;
}

.shop .items {
    margin: 10px 0;
    flex-grow: 1;
    padding: 10px;
    overflow-y: scroll;
    background: rgba(255,255,255,0.03);
}

.shop h1, .shop h2 {
    margin: 5px;
}

.shop .item {
    margin-bottom: 5px;
    font-size: 1.1em;
}

.shop .item .item-main {
    display: flex;
    align-items: center;
}

.shop .item .item-description {
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    margin-left: 50px;
}

.shop .item-icon {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.shop .item-count {
    color: #ff00f1;
}

.shop .item-name {
    padding: 0 10px;
    width: 100%;
    text-align: left;
    color: #7ebec2;
    font-weight: bold;
}

.shop .item-buy {
    width: 220px;
    padding: 4px 5px;
    background: #428502;
    text-shadow: 1px 1px rgba(0, 0, 0, 0.5);
    transition: 0.5s background;
    cursor: pointer;
}

.shop .item-buy svg {
    display: inline;
    vertical-align: middle;
    height: 1em;
}

.shop .item-buy.item-can-afford:hover {
    background: #5db601;
}

.shop .item-buy.item-cannot-afford {
    background: #424242;
    cursor: not-allowed;
}



