<style>

/* Set global font */
body {
    font-family: Arial, sans-serif;
    margin: 0;
}

body {
    background-color: #222; /* deep blue */
    color: white; /* ensures text is readable */
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
}

header, #gallery, .photo, #alphabet, #count {
    font-family: inherit;
}

header {
    position: sticky;
    top: 0;
    background: #222;
    padding: 5px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#title {
    color: white;
    font-size: 20px;
    margin: 2px 0 4px 0;
    padding: 0;
}

#alphabet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 3px;
}

#alphabet button {
    margin: 3px;
    padding: 6px 10px;
    border: none;
    background: #444;
    color: white;
    cursor: pointer;
}

#alphabet button:hover {
    background: #ff6600;
}

#alphabet button.active {
    color: yellow !important;  /* force override of white */
    font-weight: bold;
    background: #444;           /* keep same as other buttons */
}

#count {
    color: #ccc;
    font-size: 14px;
    margin-top: 4px;
}

#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 15px;
}

.photo {
    border: 0px solid #ddd;
    padding: 5px 5px 2px 5px; /* tight spacing around image and title */
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
}

.photo img {
    max-width: 100%;
    cursor: pointer;
}

#no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #777;
    font-size: 18px;
    margin-top: 20px;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#lightbox img {
    max-width: 90%;
    max-height: 80%;
    margin: 10px 0;
}

#lightbox-caption {
    color: #ccc;
    font-size: 16px;
    text-align: center;
    margin-top: 5px;
}

#lightbox-caption strong {
    font-size: 18px;
    color: white;
}

#close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

#prev, #next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 40px;
    padding: 5px 12px;
    cursor: pointer;
    user-select: none;
}

#prev { left: 10px; }
#next { right: 10px; }

#prev:hover, #next:hover, #close:hover {
    background: rgba(255,102,0,0.7);
}
</style>
