@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;700&display=swap');

body {
    font-family: 'Source Code Pro', monospace;
    margin: 0;
    background-color: rgba(0, 0, 0);
}

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

.grid-item {
    position: relative;
}

.grid-item img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 5px;
}

.grid-item img:hover {
    opacity: 0.5;
    transition: opacity 0.3s; /* Smooth transition effect */
}

.username {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 12px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 4px;
    text-decoration: none;
}

.devicename {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 12px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 4px;
    margin: 0;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overlay-content {
    position: relative;
    max-width: 80vw;  /* 80% of viewport width */
    max-height: 80vh; /* 80% of viewport height */
    display: flex;
    justify-content: center;
    align-items: center;
}
.overlay-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.overlay-username, .overlay-devicename {
    font-family: 'Source Code Pro', monospace;
    position: absolute;
    font-size: 16px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
}

.overlay-username {
    top: 10px;  /* Ensure it is above the image */
    left: 10px;
    text-decoration: none;
    pointer-events: auto;  /* Allow clicking on the username */
}

.overlay-devicename {
    bottom: 10px;
    right: 10px;
}