.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 20px; /* Adjust the margin values as needed */
}


#search-albums {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 200px; /* Adjust the width as needed */
    margin-left: auto; /* Push the search bar to the right */
}

.popup {
    display: none;
    position: fixed; /* Change this from "absolute" to "fixed" */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Add a higher z-index to make it appear on top */
}

.popup-content {
    background-color: #fff;
    padding: 20px;
    max-width: 500px;
    margin: 100px auto;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    position: relative; /* Add this to establish a new stacking context */
    text-align: center; /* Center the content horizontally */
}

/* Styles for the close button in the popup form */
.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: black;
}

.add-album-btn {
    background-color: #007bff; /* Change the background color as desired */
    color: #fff; /* Change the text color as desired */
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center; /* Center the button text */
    margin-left: 100px; 
    text-decoration: none; /* Remove underline */
}

.add-album-btn:hover {
    background-color: #0056b3; /* Change the background color on hover */
}


.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* Add a gap between the albums */
    max-width: 1200px; /* Adjust the max-width as per your preference */
    margin: 0 auto; /* This will center the .gallery-grid container on the page */
}

.album {
    text-align: center;
    padding: 10px;
    border: 2px solid #333;
    width: calc(20% - 20px); /* Calculate the width for each album with gaps */
    margin: 20px; /* Add margin to create gaps between albums */
    position: relative;
}

.album-row {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

.album a {
    text-decoration: none;
    color: #333;
}

.album img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border: 1px solid #333;
}

.album-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.album-header {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.options-btn {
    background: transparent;
    border: none;
    color: #333;
    font-size: 18px;
    cursor: pointer;
}

.event-date {
    margin-top: 5px; /* Add some spacing between the album name and event date */
    font-size: 13px;
}

.form-group {
    width: 100%; /* Set the width to 100% to fit within the form */
    margin-bottom: 10px; /* Add some margin at the bottom of each form group */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the form groups vertically */
}

.form-group label {
    display: block; /* Ensure the label takes full width */
    font-weight: bold; /* Optionally, make the labels bold */
    text-align: center; /* Center the label text */
}

.form-group input {
    width: 80%; /* Extend the input field size, adjust as needed */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-group input[type="submit"] {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center; /* Center the button text */
    margin-top: 10px; /* Add some margin at the top of the submit button */
    width: 70%; /* Set the width to control the size of the button */
    margin-left: auto; /* Center the button horizontally */
    margin-right: auto;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="password"] {
    width: 90%; /* Extend the input field size, adjust as needed */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

@media only screen and (min-width: 601px) and (max-width: 984px) {
    .header-container {
        flex-direction: row; /* Keep items in a column on smaller screens */
        justify-content: center; /* Center items horizontally */
        align-items: center; /* Center items vertically */
        margin-bottom: 5px;
    }

    .album h2 {
        font-size: 16px; /* Adjust font size for smaller screens */
        margin: 10px 0; /* Add margin for spacing, 10px at the top and bottom */
    }
    
    .gallery-grid {
        justify-content: center; /* Center albums on the page when minimized */
    }

    #search-albums {
        width: 40%;
        margin: 10px 0;
        margin-left: 10px;
    }

    .album {
        flex-basis: calc(50% - 40px);
    }
    
    main {
        max-height: calc(100vh - 100px); /* Adjust the max height as needed */
        overflow-y: auto;
    }
}

@media only screen and (max-width: 600px) {
    .header-container {
        flex-direction: row; /* Display items side by side on smaller screens */
        justify-content: space-between; /* Adjust spacing between items */
        margin-bottom: 10px;
    }
    
    .album h2 {
        font-size: 12px;
        margin: 0;
    }

    .add-album-btn {
        font-size: 12px; /* Adjust the font size for smaller screens */
        margin-bottom: 10px; /* Add margin below the button */
    }

    #search-albums {
        width: 60%;
        margin-left: 10px;
    }

    .album {
        flex-basis: calc(50% - 20px); /* Display two albums side by side */
        margin-bottom: 10px; /* Add margin to create space between albums */
    }

    main {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
}
