body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: grey;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(900px, 1fr));
    gap: 10px;
    padding: 20px;
}

.gallery img {
    width: 100%;
    height: auto;
    max-width: auto; 
    object-fit: cover; 
    cursor: pointer;
    border: 1px solid #ddd; /* Border color */
    border-radius: 8px; /* Rounded borders */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal {
    display: none;
    position: fixed;
    z-index: 0;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}

.modal-content {
    width: 100%;
}

.close {
    color: #000000;
    font-size: 50px;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}


#exitButton {
  position: absolute;
  top: 15px;
  right: 25px;
  color: rgb(0, 0, 0);
  font-size: 50px;
  cursor: pointer;
}
/* Added class for dynamically changing background color */
.dynamic-background {
    transition: background-color 0.5s ease;
}

/* Apply different styles for mobile devices */
@media (max-width: 767px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery img {
        max-width: 100%;
        margin-bottom: 20px;
    }
}
