@import url('https://fonts.googleapis.com/css2?family=Major+Mono+Display&display=swap');

body {
    background-color: #151515;
    color: #fff;
    font-family: 'Major Mono Display', monospace;
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling on small screens */
}

.info, .links {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ff3366;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.nosel {
    user-select: none;
}

a {
    text-decoration: none;
    color: #ff3366;
    transition: color 0.3s;
}

a:hover {
    color: #6633ff;
}

#gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
}

.thumbnail {
    margin: 2px;
    cursor: pointer;
    box-sizing: border-box;
    overflow: hidden;
    transition: filter 0.75s;
    flex: 1 1 calc(25% - 10px);
}

img.lazy {
    opacity: 0;
    transition: opacity 0.6s;
}

img.lazy.initial,
img.lazy.loaded,
img.lazy.error {
    opacity: 1;
    pointer-events: all;
}

#modal {
    position: fixed;
    inset: 0px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure modal is on top of everything */
}

#modalContent {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
    text-align: center;
}

#fullImage {
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    display: block;
}

#buttonContainer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

#downloadButton, #closeButton {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    padding: 10px 20px;
    border: 2px solid #fff;
    border-radius: 5px;
    transition: background-color 0.3s, border-color 0.3s;
    cursor: pointer;
    margin: 0 10px;
    flex: 1;
}

#downloadButton:hover, #closeButton:hover {
    background-color: #fff;
    color: #000;
}
