#image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 10px;
    align-items: start;
}

#image-grid > img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    transform-origin: center;
    transition: transform 0.1s ease-in-out;
}

#image-grid > img:hover {
    transform: scale(1.05);
}

#image-magnifier {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

#image-magnifier-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.image-magnifier-button {
    margin: 0;
    cursor: pointer;
    color: white;
    transform-origin: center;
    transition: transform 0.1s ease-in-out;
}

.image-magnifier-button:hover {
    transform: scale(1.1);
}

#image-magnifier-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border-radius: 16px;
    padding: 10px;
    max-width: 80%;
    max-height: 70%;
    box-sizing: border-box;
}

@media (max-width: 750px) {
    #image-magnifier-frame {
        max-width: 95%;
    }
}

#magnified-image {
    object-fit: contain;
    border-radius: 6px;
    width: 100%;
    height: 100%;
}