html, body {
    height: 100%;
    margin: 0;    
    font-family: 'Open Sans';
}

body { 
    display: flex;
    flex-direction: column;
}

h1, 
h2, 
#wait-indicator p {
    font-family: 'Press Start 2P';
    text-align: center;
}

h2 {
    background: lightgray;
    width: 100%;
    padding: 1.5rem;
    margin: 0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px gray;
    /* https://stackoverflow.com/questions/21621584/padding-causes-horizontal-scroll-it-increases-the-width */
    box-sizing:border-box;  
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box;
    -ms-box-sizing:border-box; 
}

header {
    background: linear-gradient(black, rgb(27, 27, 27));    
}

footer a,
header h1 {
    color: white;
}

main {
    flex: 1 0 auto;
}

footer {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    height: 5vh;
    background: linear-gradient(rgb(27, 27, 27), black);
}

a {
    text-decoration: none;
}

canvas {
    display: none;
}

.invisible {
    visibility: hidden;
}

.fadein {
    animation-name: fadein;
    animation-duration: 250ms;
}

@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#about,
#upload-container,
.pixel-count-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    margin-left: 5vw;
}

.color-swatch-container {
    display: flex;
    align-items: center;
    width: 10vw;
}

.color-swatch {
    display: inline-block;
    border: solid;
    margin: 0.5rem 0.25rem 0.5rem 1rem;
    width: 2rem;
    height: 2rem;
}

#upload-container img {    
    width: auto;
    height: auto;
    max-width: 75vh;
    max-height: 45vh;
    background-size: contain;
    margin: 1rem;
}

#upload-container div,
#about p {
    margin: 30px;
}

#about p {
    text-align: center;
}

/* Wait Indicator */
#wait-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
}

#wait-indicator img {
    opacity: 100%;
}

#wait-indicator p {
    font-size: 2.5rem;
}

@media screen and (max-width: 600px) {
    .color-swatch-container {
        width: 30vw;
    }

    .color-swatches {
        margin-left: 0;
    }

    #wait-indicator img {        
        width: 50%;
    }

    #wait-indicator p {
        color: white;
        font-size: 1.5rem;
    }
}