#page-outline {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(20px);
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    color: white;
    border-radius: 0 12px 12px 0;
    max-width: calc(calc(100% - 1040px)/2);
    overflow: hidden;
    z-index: 3;
    transition: all 0.2s ease;
}

#page-outline.hide {
    background: transparent;
    overflow: visible;
    max-width: 0;
}

#page-outline.hide button {
    text-shadow: 1px 1px 2px black, 0 0 1px black, 0 0 5px black;
    overflow: visible; /* Required for ellipsis */
    white-space: nowrap; /* Prevent text wrapping */
    max-width: 0; /* Constrain button width */
}

#page-outline.hide button:hover {
    color: red;
}

#page-outline button {
    background: none;
    color: white;
    border: none;
    cursor: pointer;
    padding: 0.5em;
    text-align: left;
    font-size: 0.9em;
    /*border-left: 3px solid rgba(255,255,255,0.5); !* Fixed border syntax *!*/
    transition: all 0.2s ease;
    border-radius: 0 6px 6px 0;
    text-overflow: ellipsis;
    overflow: hidden; /* Required for ellipsis */
    white-space: nowrap; /* Prevent text wrapping */
}

#page-outline button:hover {
    background: rgba(255,255,255,0.2);
    border-left: 3px solid white;
}

#page-outline button.active {
    background: white;
    color: black;
    border-left: 3px solid red;
}

@media (max-width: 1250px) {
    #page-outline {
        display: none;
    }
}

@media (max-width: 1500px) {
    #page-outline button {
        font-size: 0.7rem;
    }
}