body {
    color: white;
    text-align: center;
    background-color: #005b5b; 
    background-repeat: repeat;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 30px;
    line-height: 1.6;
}

a,
a:visited {
    color: #ff0000;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    padding: 2px 5px;
    transition: 0.2s;
}

a:hover {
    background-color: #ff0000;
    color: black;
    text-decoration: none;
}

header {
    max-width: 800px;
    margin: 20px auto;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border: 4px solid white;
}

body > section, 
.page-links {
    max-width: 900px;
    margin: 20px auto;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    padding-left: 5%;
    padding-right: 5%;
    border: 4px solid white;
    box-sizing: border-box;
}

nav {
    margin: 15px 0;
}

footer {
    font-size: 0.8em;
    margin-top: 40px;
    color: #ccc;
}

#photos {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
}

#photos figure {
    margin: 0;
    width: calc(25% - 15px); 
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid white;
    padding: 10px;
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
}

#photos img {
    border: 2px solid white;
    image-rendering: pixelated; 
    width: 100%; 
    height: auto;
    display: block;
}

#photos img:hover {
    border-color: #ff0000;
}

.photo-filename {
    display: block;
    margin-top: 10px;
    font-size: 0.8em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: white;
}

.page-links ul {
    padding: 0;
    list-style: none;
}

.page-links li {
    display: inline;
    margin: 0 10px;
}


@media (max-width: 800px) {
    body {
        padding: 10px;
    }

    #photos figure {
        width: calc(50% - 10px); 
    }
}

@media (max-width: 480px) {
    #photos figure {
        width: 100%; 
    }
}

#js-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); 
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#js-viewer img {
    max-width: 90%;
    max-height: 70%;
    border: 4px solid white;
}

#js-viewer span button {
    margin-top: 20px;
    background: transparent;
    color: #ff0000;
    border: 2px solid #ff0000;
    padding: 10px 30px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
}

#js-viewer span button:hover {
    background-color: #ff0000;
    color: black;
}