#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

#overlay.active {
    display: block;
}

#sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: black;
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

@media (min-width: 768px) {
    #sidebar {
        right: -66%;
        width: 66%;
    }
}

@media (min-width: 1280px) {
    #sidebar {
        width: 50%;
        right: -50%;
    }
}

#sidebar.active {
    right: 0;
}
