body {
    font-family: 'Arial', sans-serif;
    background: inherit;
    color: #495057;
}

h1 {
    color: #007bff;
}

h2 {
    text-align: center;
}

li {
    text-align: center; 
}

#searchContainer {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
font-size: 18px;

}

#searchInput {
    padding: 10px;
    width: 60%;
    margin-right: 10px;
}

#searchButton {
background-color: #3D79F2;
    padding: 10px;
    cursor: pointer;
  border: none;
  color: white;
 font-size: 18px;
border-radius: 4px;
}

#refreshButton {
background-color: #3D79F2;
    padding: 10px;
    margin-left: 10px;
    cursor: pointer;
  border: none;
  color: white;
font-size: 18px;
 border-radius: 4px;
}

#gifGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.gifImage {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 1; /* Maintain 1:1 aspect ratio for each grid item */
    display: block;
}

.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    overflow: auto; /* Add this line to allow scrolling within the modal */
}

.enlargedGif {
    max-width: 80%;
    max-height: 80%;
}

.closeButton {
    position: absolute;
    top: 560px;
    right: 200px;
    cursor: pointer;
    color: white;
    font-size: 50px;
}

.downloadButton {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    color: white;
    font-size: 18px;
    background-color: #4CAF50;
    padding: 10px;
    border: none;
    border-radius: 5px;
}

@media (min-width: 768px) {
    body {
        padding-top: 0;
    }
}

