#tab-ui {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px; /* keep your bar height */
    display: flex;
    color: #ccc;
    font-family: sans-serif;
    z-index: 999;
    pointer-events: auto;
}

#tab-sidebar {
    width: 45%;              /* keep sidebar 1/5 width */
    background: #000;
    display: flex;
    flex-direction: row;      /* buttons in a line */
    align-items: center;      /* center vertically */
    justify-content: space-around; /* spread buttons evenly */
    border-right: 1px solid #222;
}

#tab-sidebar .tab-btn {
	background: rgba(0,0,0,0.5);
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #aaa;
    padding: 8px 12px;
    text-align: center;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

#tab-sidebar .tab-btn:hover {
    color: #fff;
    background: #111;
}

#tab-sidebar .tab-btn.active {
    color: #fff;
    background: #222;
}

#tab-content {
    width: 80%;                /* rest of the screen */
    padding: 8px;
    background: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

#tab-content .tab-panel {
    display: none;
}

#tab-content .tab-panel.active {
    display: block;
}

#tab-content button {
    background: transparent;   /* keep transparent */
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    color: #aaa;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

#tab-content button:hover {
    color: #fff;
    background: rgba(17,17,17,0.4);
}

#tab-content button.active {
    color: #fff;
    background: rgba(34,34,34,0.6);
}


@media (max-width: 800px) {
    #tab-ui {
        flex-direction: column;
        height: auto;
    }
    #tab-sidebar {
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        border-right: none;
        border-bottom: 1px solid #222;
    }
    #tab-content {
        width: 100%;
    }
}
