body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-image: url("images/youtube_banner.png");
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.container {
    display: flex; 
    width: 100%;
    min-height: 100vh; 
    box-sizing: border-box; 
    justify-content: center; 
}

.sidebar {
    padding: 20px 10px;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 20%;
    min-width: 100px;
}

.main-content {
    padding: 40px 60px;
    background-color: #fcfff9; 
    overflow-y: auto;
    flex-grow: 0;
    flex-shrink: 1;
    flex-basis: 60%; 
    max-width: 1000px; 
}

.pic {
    float: right;
    width: 15vw;
    
}

.download-button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #3f51b5;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin-top: auto;
    margin-bottom: 5px;
}

.download-button:hover {
    background-color: #303f9f;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 5px;
}

.image-item {
    margin: 5px;
    flex-shrink: 1;    
    flex-grow: 1;
    
    text-align: center;
    border: 1px solid #ccc;
    padding: 5px;
    box-sizing: border-box; 
    
    display: flex;
    flex-direction: column;

    aspect-ratio: 1 / 1;
    height: auto; 
    overflow: hidden;
    background-color: #ffffff;
}

.image-filename {
    margin-top: 0; 
    margin-bottom: 5px;
    font-size: 0.9em;
    font-weight: bold;
    word-break: break-all;
}

.image-item img {
    width: 100%;
    height: 100%;
    max-height: 80%;
    object-fit: contain; 
    display: block;
    margin: 0 auto;
}

.no-sidebars-page .container {
    justify-content: flex-start; 
}

.no-sidebars-page .main-content {

    flex-grow: 1;
    flex-basis: 100%;
    max-width: none; 
    padding: 40px 20px; 
}

.lightbox-overlay {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center; 
    align-items: center;
}

#lightbox-image {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain; 
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}

.lightbox-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        justify-content: flex-start;
    }

    .sidebar {
        display: none; 
    }

    .main-content {
        flex-basis: auto;
        flex-grow: 1;
        flex-shrink: 1;
        width: 100%;
        padding: 20px;
    }
}