body {
    color: #fff;
    background-color: #000;
}

a {
    outline: 0;
    text-decoration: none;
}

a:hover {
    font-weight: bold;
}

.header {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
}

.subheader {
    text-align: center;
    font-size: 0.5em;
}

#shuffle-control {
    text-align: center;
    line-height: 0.75;
}

#shuffle-control a {
    color: #fff;
    font-size: 0.5em;
}

#gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#img-tmpl {
    display: none;
}

#img-viewer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #000;
    cursor: pointer;

    display: none;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

#img-viewer-img {
    box-sizing: border-box;
    max-height: 100%;
    max-width: 100%;
}

#img-viewer-control {
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 0;

    text-align: center;
    margin: 0 auto;
}

#img-viewer-control a {
    color: #fff;
    font-size: 2em;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
    text-decoration: none;
    cursor: pointer;
    margin: 0 5px;
}

#img-viewer-info {
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 3px;
    
    text-align: right;
    color: #fff;
    font-size: 1em;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
}

.img-box {
    box-sizing: border-box;
    min-width: 50px;
    min-height: 50px;
    width: 45%;
    width: calc(50% - 3px);
    max-width: 200px;
    margin: 0 3px 3px 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.img-box img {
    max-width: 100%;
    max-height: 100%;
    align-self: center;
    border-radius: 5px;
}
