#gallery-tree {
    display: flex;
    flex-wrap: wrap; /* Changed from wrap to nowrap to align items in a single row */
    gap: 100px;
    padding-left: 10px;
    overflow-x: auto; /* Added to enable horizontal scrolling if content overflows */
}

.folder {
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 2px solid #444;
    transition: background 0.2s;
}

.folder:hover {
    background-color: #1a1a1a;
}

.folder img {
    display: block;
    margin-top: 5px;
    max-width: 180px;
    height: auto;
}

.folder:not(:has(img)) {
    background-color: #1a1a1a;
    font-style: bold;
}

.folder-entry {
    flex: 0 0 auto; /* Changed to prevent stretching and allow natural width */
    max-width: 220px;
    box-sizing: border-box;
}
