.sidebar {
    position: fixed;
    top: 0;
    left: -300px; /* Hidden by default */
    width: 300px;
    height: 100%;
    background: #a04f6b;
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    z-index: 101;
    transition: left 0.3s ease-in-out;
}
.sidebar.open {
    left: 0;
}
.sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}
.sidebar ul {
    list-style: none;
    padding: 0;
    overflow-y: auto;
}
.sidebar li {
    padding: 0.3em;
    padding-left: 0.5em;
    padding-right: 0.5em;
    background: #c46788;
    margin-bottom: 0.4em;
    cursor: pointer;
    border-radius: 0.4em;
    text-align: center;
    transition: background 0.3s;
}
.sidebar li:hover {
    background: #e08baf;
}

/* Sidebar toggle buttons */
.toggle-sidebar {
    position: absolute;
    /* left: 15px; */
    background: #c46788;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
    transition: background 0.3s;
}
.toggle-sidebar:hover {
    background: #e08baf;
}

/* Outside button (always visible) */
.toggle-sidebar.outside {
    top: 15px;
    z-index: 25;
}

/* Inside button (appears when sidebar is open) */
.toggle-sidebar.inside {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 21;
}

/* Show inside button when sidebar opens */
.sidebar.open .toggle-sidebar.inside {
    display: block;
}

.clear-history {
    margin-top: auto;
    background: red;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
    transition: background 0.3s;
}
.clear-history:hover {
    background: darkred;
}

.history-item {
    background: #c46788;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: background 0.3s;
    cursor: pointer;
    padding: 0;
}

.history-item:hover {
    background: #e08baf;
}

.history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    padding: 1%;
}

.history-icon {
    /* width: 15%; */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.4em;
}

.history-icon-img {
    width: 1.5em;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.history-username {
    /* width: 70%; */
    word-break: break-word;
    font-size: 0.95rem;
    text-align: center;
    color: white;
}

.remove-wrapper {
    /* width: 15%; */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.remove-wrapper:hover {
    background-color: #ff5c7a;
}

.remove-entry {
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    user-select: none;
}


/* Fullscreen sidebar for screens <= 1024px */
@media (max-width: 1024px) {
    .sidebar {
        width: 100%;
        left: -100%;
    }
    .sidebar.open {
        left: 0;
    }
}
