body {
    background-color: #333; /* Dark gray background */
    color: #fff; /* White text */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    /* Removed display: flex and justify-content: center from body */
}

.container { /* Added container to wrap content */
    width: 100%; /* Full width */
    max-width: 1200px; /* Limit the maximum width */
    padding: 0 10px 10px; /* Adjusted padding */
    margin: 0 auto; /* Center container */
}

.banner {
    background-color: #222; /* Slightly darker background for banner */
    color: #fff;
    padding: 15px 20px;
    margin-bottom: 20px; /* Space below banner */
    display: flex;
    justify-content: space-between; /* Pushes title left, button right */
    align-items: center; /* Vertically center items */
    width: 100%; /* Make banner span full width */
    box-sizing: border-box; /* Include padding in width calculation */
}

.banner h1 {
    margin: 0; /* Remove default h1 margin */
    font-size: 1.8em;
}

.home-button {
    background-color: #555; /* Button background */
    color: #fff; /* Button text color */
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.home-button:hover {
    background-color: #777; /* Lighter background on hover */
    color: #fff;
}


.folders {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping to the next row */
    gap: 10px; /* Add spacing between items */
    justify-content: space-between; /* Distribute items evenly */
}

.folder {
    flex: 1 1 calc(33.33% - 10px); /* Three items per row */
    text-align: center;
    margin: 0; /* Remove margin */
    padding: 0; /* Remove padding */
}

.folder img {
    width: 100%; /* Make images fill the container */
    height: auto; /* Maintain aspect ratio */
    object-fit: cover;
}

.folder p {
    margin: 10px 0 0; /* Add spacing above the text */
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

a {
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Inherit text color */
}

.images {
    /* Replaced flexbox with CSS Columns for masonry layout */
    column-count: 3; /* Adjust number of columns as needed */
    column-gap: 20px; /* Spacing between columns */
    padding: 0; /* Removed padding, handled by container */
}

.image { /* Style the container div for each image */
    break-inside: avoid; /* Prevent images from breaking across columns */
    margin-bottom: 20px; /* Vertical spacing between images */
    display: inline-block; /* Needed for break-inside */
    width: 100%; /* Ensure it takes full column width */
}

.image img {
    width: 100%; /* Make image fill its container (column width) */
    height: auto; /* Maintain aspect ratio */
    object-fit: cover;
    cursor: pointer;
    display: block; /* Remove potential extra space below image */
}

.carousel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.carousel {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden; /* Hide the edges of other images */
    display: flex;
    flex-direction: column; /* Stack items vertically */
    justify-content: center;
    align-items: center;
}

.carousel-images {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%; /* Ensure the images take up the full width of the carousel */
    align-items: center; /* Vertically center images in the flex container */
    flex-grow: 1; /* Allow images container to grow */
}

.carousel-images img {
    width: 100%; /* Make each image take up the full width of the carousel */
    max-height: calc(90vh - 100px); /* Limit height based on viewport, accounting for EXIF data height */
    flex-shrink: 0;
    object-fit: contain; /* Ensure the entire image is visible without distortion */
}

.carousel-buttons {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 1; /* Ensure buttons are above EXIF data */
}

.carousel-buttons button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
}

.exif-data-display {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    box-sizing: border-box;
    text-align: left;
    font-size: 0.9em;
    flex-shrink: 0; /* Prevent it from shrinking */
    margin-top: auto; /* Push to the bottom of the flex container */
    margin-bottom: auto;
}

.exif-data-display h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.exif-data-display p {
    margin: 0px 0;
}

.carousel-buttons button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.close-carousel {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
}
