html,
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #111;
    background-image: url('/img/noimage.png');
    background-size: 100px 100px;
    background-repeat: repeat;
    image-rendering: pixelated;
    animation: background-slide 5s linear infinite;
}

@keyframes background-slide {
    from {
        background-position: 0px 0px;
    }

    to {
        background-position: 100px 100px;
    }
}

main {
    display: block;
    width: 100vw;
    height: 100vh;
}

h1 {
    font-size: 5rem;
    margin: 1rem 0;
}

#text-container {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100vw - 4rem);
    height: calc(100vh - 4rem);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

#text-container * {
    pointer-events: all;
}

.impact {
    margin: 0;
    padding: 0 1rem;
    text-align: center;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    text-transform: uppercase;
    color: white;
    -webkit-text-stroke: 2px black;
    text-shadow: 0 0 1rem #0004;
    border-radius: 1rem;
    transition: background-color .2s;
}

.impact:hover {
    background-color: #fff4;
}

.impact:focus,
.impact:active {
    background-color: #0004;
    outline: none;
    border: none;
}

#meme-img {
    position: fixed;
    top: -1px;
    left: -1px;
    width: calc(100vw + 2px);
    height: calc(100vh + 2px);
    background-position: center;
    background-repeat: no-repeat;
}

#meme-img.cover {
    background-size: cover;
}

#meme-img.contain {
    background-size: contain;
}

#meme-img.stretch {
    background-size: 100% 100%;
}

#controls {
    position: fixed;
    bottom: 0;
    height: 4rem;
    margin: 1rem;
    padding: 0 .5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff8;
    box-shadow: 0 0 1rem #0008;
    transition: transform .5s cubic-bezier(0.32, 1.63, 0.41, 1.01);
}

#controls.hide {
    transform: translateY(calc(100% + 1rem));
}

#controls button,
#controls a,
#controls label {
    width: 4rem;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    font-weight: bold;
    color: #eee;
    border: none;
    background: none;
    cursor: pointer;
    transition: background .2s;
}

#controls button img,
#controls a img,
#controls label img {
    width: 2rem;
    height: 2rem;
    transition: transform .15s cubic-bezier(.5, .01, .5, 1);
}

#controls button:hover img,
#controls a:hover img,
#controls label:hover img {
    transform: scale(1.1);
}

#controls button:active img,
#controls a:active img,
#controls label:active img {
    transform: scale(0.9);
}

#controls #change-fit.active img {
    animation: fit-swap .5s cubic-bezier(0, .6, .4, 1) forwards;
}

@keyframes fit-swap {
    to {
        rotate: 360deg;
    }
}

#controls #github img {
    width: 2.2rem;
    height: 2.2rem;
    filter: brightness(0);
}

#controls #mellodotcom img {
    width: 2.5rem;
    height: 2.5rem;
}

#screenshot {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 25% !important;
    height: auto !important;
    object-fit: contain;
    box-shadow: .2rem .2rem .5rem #0008;
    border: 1px solid white;
    cursor: pointer;
    animation: slidein 1s ease-in-out forwards;
    -webkit-animation: slidein 1s ease-in-out forwards;
}

#screenshot.leaving {
    animation: slideout 1s ease-in-out forwards;
    -webkit-animation: slideout 1s ease-in-out forwards;
}

@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slidein {
    from {
        transform: translateX(calc(100% + 1rem));
    }

    to {
        transform: initial;
    }
}

@keyframes fadeout {
    to {
        opacity: 0;
    }
}

@keyframes slideout {
    to {
        transform: translateX(calc(100% + 1rem));
    }
}

#flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    animation: flash .2s linear forwards;
    pointer-events: none;
}

@keyframes flash {
    from {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

footer {
    position: fixed;
    right: 0;
    bottom: 0;
    padding: 1rem;
    text-align: right;
    transition: transform .5s cubic-bezier(0.32, 1.63, 0.41, 1.01);
}

footer.hide {
    transform: translateY(100%);
}

footer p {
    margin: 0;
    font-family: 'Impact', Arial, Helvetica, sans-serif;
    color: #eee;
    -webkit-text-stroke: 1px black;
    text-shadow: 0 0 8px #000;
}

#pride-flag.hide svg {
    transform: scale(0);
}