.menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
}

.worldGroup {
    display: flex;
    flex-direction: column;
}

.storiesList {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
    margin-left: 10px;
    margin-bottom: 4px;
}

.storyItem {
    padding-left: 4px;
}

.worldTitle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.expandButton {
    flex-shrink: 0;
    padding: 4px 3px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 2px;
    display: flex;
    align-items: center;

    &:hover {
        background: var(--bg-hover);
        color: var(--text);
    }
}

.emptyStories {
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.newButton {
    width: 100%;
    padding: 6px 8px;
    text-align: left;
    font-size: 13px;
    color: var(--accent-alt);

    &:hover {
        color: var(--accent-alt);
        background: var(--bg-hover);
    }
}

.list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.itemWrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;

    &.active {
        background: var(--bg-active);
        border-radius: 4px;
    }
}

.item {
    flex: 1;
    padding: 6px 8px;
    text-align: left;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    color: inherit;

    &:hover {
        background: var(--bg-hover);
    }
}

.active .item {
    background: transparent;

    &:hover {
        background: var(--bg-hover);
    }
}

.actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.1s;

    .itemWrapper:hover & {
        opacity: 1;
    }

    .active & {
        opacity: 1;
    }
}

.actionButton {
    padding: 4px 6px;
    font-size: 12px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 2px;

    &:hover {
        background: var(--bg-hover);
        color: var(--text);
    }
}

.input {
    flex: 1;
    padding: 6px 8px;
    font-size: 13px;
    background: var(--bg-hover);
    border: none;
    outline: none;
    color: var(--text);
    border-radius: 4px;
}

.settingsButton {
    padding: 6px 8px;
    font-size: 13px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    text-align: left;
    border-radius: 4px;

    &:hover {
        color: var(--text);
        background: var(--bg-hover);
    }
}

.bottomButtons {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
