.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

.close {
    color: #ccc;
    float: right;
    font-size: 30px;
    font-weight: bold;
    padding: 15px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
}

.thumbnail {
    width: 200px;
    margin: 10px;
    cursor: pointer;
}